Project

Profile

Help

Revision 4d11bb62

Added by Michael Kay over 1 year ago

Fixes for failing collection() tests

View differences:

latest10/hej/net/sf/saxon/resource/AbstractResourceCollection.java
206 206
            inputDetails.resourceUri = resourceURI;
207 207
            URI uri = new URI(resourceURI);
208 208
            if ("file".equals(uri.getScheme())) {
209
                if (params.getContentType() != null) {
209
                if (params != null && params.getContentType() != null) {
210 210
                    inputDetails.contentType = params.getContentType();
211 211
                } else {
212 212
                    inputDetails.contentType = guessContentTypeFromName(resourceURI);
latest10/hej/net/sf/saxon/resource/JarCollection.java
304 304
                        }
305 305
                        InputDetails details = new InputDetails();
306 306
                        details.binaryContent = output.toByteArray();
307
                        details.contentType = params.getContentType();
308
                        if (details.contentType == null) {
307
                        if (params != null && params.getContentType() != null) {
308
                            details.contentType = params.getContentType();
309
                        } else {
309 310
                            details.contentType = guessContentTypeFromName(entry.getName());
310 311
                        }
311 312
                        if (details.contentType == null) {

Also available in: Unified diff