elharo commented on code in PR #345:
URL: 
https://github.com/apache/maven-javadoc-plugin/pull/345#discussion_r1869472540


##########
src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java:
##########
@@ -427,31 +428,31 @@ public void testCustomConfiguration() throws Exception {
         // read the contents of the html files based on some of the parameter 
values
         // author == false
         String str = 
readFile(apidocs.resolve("custom/configuration/AppSample.html"));
-        assertFalse(str.toLowerCase().contains("author"));
+        assertFalse(str.toLowerCase(Locale.ENGLISH).contains("author"));
 
         // bottom
-        assertTrue(str.toUpperCase().contains("SAMPLE BOTTOM CONTENT"));
+        assertTrue(str.toUpperCase(Locale.ENGLISH).contains("SAMPLE BOTTOM 
CONTENT"));
 
         // offlineLinks
         if (JavaVersion.JAVA_VERSION.isBefore("11.0.2")) {
             assertThat(str)
                     
.containsIgnoringCase("href=\"http://java.sun.com/j2se/1.4.2/docs/api/java/lang/string.html";);
         } else {
-            assertTrue(str.toLowerCase()
+            assertTrue(str.toLowerCase(Locale.ENGLISH)
                     
.contains("href=\"http://java.sun.com/j2se/1.4.2/docs/api/java.base/java/lang/string.html";));
         }
 
         // header
-        assertTrue(str.toUpperCase().contains("MAVEN JAVADOC PLUGIN TEST"));
+        assertTrue(str.toUpperCase(Locale.ENGLISH).contains("MAVEN JAVADOC 
PLUGIN TEST"));
 
         // footer
         if (JavaVersion.JAVA_VERSION.isBefore("16-ea")
                 && !System.getProperty("java.vm.name").contains("OpenJ9")) {
-            assertTrue(str.toUpperCase().contains("MAVEN JAVADOC PLUGIN TEST 
FOOTER"));
+            assertTrue(str.toUpperCase(Locale.ENGLISH).contains("MAVEN JAVADOC 
PLUGIN TEST FOOTER"));
         }
 
         // nohelp == true
-        assertFalse(str.toUpperCase().contains("/HELP-DOC.HTML"));
+        
assertFalse(str.toUpperCase(Locale.ENGLISH).contains("/HELP-DOC.HTML"));

Review Comment:
   Could go either way. 
   
   assertFalse(str.toLowerCase(Locale.ENGLISH).contains("/help-doc.html"));
   
   is semantically equivalent. Probably just the preference of whoever first 
wrote this line of code. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to