@Test(enabled = false) public void canfindByMultipleMethodsNull() throws Exception { MantaHttpHeaders headers = new MantaHttpHeaders(EXAMPLE_HEADERS); File temp = File.createTempFile("upload", ".unknown"); FileUtils.forceDeleteOnExit(temp); Assert.assertNull(ContentTypeLookup.findOrDefaultContentType(null, "/stor/unknown", temp, null)); temp = File.createTempFile("upload", ".unknown"); FileUtils.forceDeleteOnExit(temp); Assert.assertNull(ContentTypeLookup.findOrDefaultContentType(headers, "/stor/unknown", temp, null)); }
public static ContentType findOrDefaultContentType(final MantaHttpHeaders headers, final ContentType defaultContentType) { if (headers == null || headers.getContentType() == null) { return defaultContentType; } else { return ContentType.parse(headers.getContentType()); } }
ContentTypeLookup { public static ContentType findOrDefaultContentType(final MantaHttpHeaders headers, final ContentType defaultContentType) { if (headers == null || headers.getContentType() == null) { return defaultContentType; } else { return ContentType.parse(headers.getContentType()); } } }
ContentTypeLookup { public static ContentType findOrDefaultContentType(final MantaHttpHeaders headers, final ContentType defaultContentType) { if (headers == null || headers.getContentType() == null) { return defaultContentType; } else { return ContentType.parse(headers.getContentType()); } } private  ContentTypeLookup(); }
ContentTypeLookup { public static ContentType findOrDefaultContentType(final MantaHttpHeaders headers, final ContentType defaultContentType) { if (headers == null || headers.getContentType() == null) { return defaultContentType; } else { return ContentType.parse(headers.getContentType()); } } private  ContentTypeLookup(); static ContentType findOrDefaultContentType(final MantaHttpHeaders headers,
                                                       final ContentType defaultContentType); static ContentType findOrDefaultContentType(final MantaHttpHeaders headers,
                                                       final String filename,
                                                       final File file,
                                                       final ContentType defaultContentType); static ContentType findOrDefaultContentType(final MantaHttpHeaders headers,
                                                       final String filename,
                                                       final ContentType defaultContentType); }
ContentTypeLookup { public static ContentType findOrDefaultContentType(final MantaHttpHeaders headers, final ContentType defaultContentType) { if (headers == null || headers.getContentType() == null) { return defaultContentType; } else { return ContentType.parse(headers.getContentType()); } } private  ContentTypeLookup(); static ContentType findOrDefaultContentType(final MantaHttpHeaders headers,
                                                       final ContentType defaultContentType); static ContentType findOrDefaultContentType(final MantaHttpHeaders headers,
                                                       final String filename,
                                                       final File file,
                                                       final ContentType defaultContentType); static ContentType findOrDefaultContentType(final MantaHttpHeaders headers,
                                                       final String filename,
                                                       final ContentType defaultContentType);  }