From 0b345a6aeeac9d6c92f4e1a67d426193cb6f841e Mon Sep 17 00:00:00 2001 From: Jim Blake Date: Thu, 15 May 2014 10:42:37 -0400 Subject: [PATCH] VIVO-766 modify test so it will not fail under Java 8. --- .../cornell/mannlib/vitro/webapp/web/ContentTypeTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webapp/test/edu/cornell/mannlib/vitro/webapp/web/ContentTypeTest.java b/webapp/test/edu/cornell/mannlib/vitro/webapp/web/ContentTypeTest.java index 8424fd483..b22c27ff0 100644 --- a/webapp/test/edu/cornell/mannlib/vitro/webapp/web/ContentTypeTest.java +++ b/webapp/test/edu/cornell/mannlib/vitro/webapp/web/ContentTypeTest.java @@ -45,12 +45,16 @@ public class ContentTypeTest { Assert.assertEquals("application/rdf+xml", ContentType.getBestContentType(clientAccepts, serverTypes)); } - + + /** + * Modified this, added q-factor to text/html, because otherwise the result is indeterminate, and the + * test fails in Java 8. + */ @Test public void testWeightedBestContentTypeForFirefox(){ //accept header from normal firefox Map clientAccepts = ContentType.getTypesAndQ( - "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); + "text/html;q=0.95,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); Map serverTypes = IndividualController.ACCEPTED_CONTENT_TYPES;