WICKET-6614 upperCase and lowerCase with root locale

for locale insentive conversion


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/138abdd0
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/138abdd0
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/138abdd0

Branch: refs/heads/WICKET-6563
Commit: 138abdd0ecb05947d42385db22982f3a42439e16
Parents: 7cfa536
Author: Sven Meier <svenme...@apache.org>
Authored: Mon Nov 19 13:56:06 2018 +0100
Committer: Sven Meier <svenme...@apache.org>
Committed: Wed Nov 21 10:49:22 2018 +0100

----------------------------------------------------------------------
 pom.xml                                           | 18 ++++++++++++++++++
 .../bean/validation/DefaultPropertyResolver.java  |  5 +++--
 .../wicket/cdi/testapp/TestConversationPage.java  |  5 +++--
 .../cdi/testapp/TestConversationalPage.java       |  3 ++-
 .../apache/wicket/DefaultMarkupIdGenerator.java   |  4 +++-
 .../java/org/apache/wicket/MarkupContainer.java   |  5 +++--
 .../form/AjaxFormComponentUpdatingBehavior.java   |  4 +++-
 .../wicket/core/util/string/ComponentStrings.java |  4 +++-
 .../wicket/markup/head/OnEventHeaderItem.java     |  2 +-
 .../wicket/markup/html/PackageResourceGuard.java  |  3 ++-
 .../org/apache/wicket/markup/html/form/Form.java  |  4 ++--
 .../org/apache/wicket/markup/parser/TagStack.java |  3 ++-
 .../wicket/markup/parser/XmlPullParser.java       |  5 +++--
 .../parser/filter/HeadForceTagIdHandler.java      |  3 ++-
 .../wicket/markup/parser/filter/HtmlHandler.java  |  3 ++-
 .../markup/parser/filter/HtmlProblemFinder.java   |  3 ++-
 .../parser/filter/OpenCloseTagExpander.java       |  3 ++-
 .../parser/filter/WicketNamespaceHandler.java     |  3 ++-
 .../markup/parser/filter/WicketTagIdentifier.java |  6 +++---
 .../wicket/model/LoadableDetachableModel.java     |  4 +++-
 .../http/CsrfPreventionRequestCycleListener.java  |  6 +++---
 .../wicket/protocol/http/WebApplication.java      |  2 +-
 .../http/mock/MockHttpServletRequest.java         |  8 ++++----
 .../protocol/http/request/WebClientInfo.java      |  3 ++-
 .../org/apache/wicket/protocol/https/Scheme.java  |  4 +++-
 .../wicket/request/resource/AbstractResource.java |  3 ++-
 .../request/resource/ResourceReference.java       |  2 +-
 .../org/apache/wicket/resource/ResourceUtil.java  |  2 +-
 .../wicket/util/tester/BaseWicketTester.java      |  2 +-
 .../validator/AbstractRangeValidator.java         |  3 ++-
 .../validation/validator/StringValidator.java     |  2 +-
 .../wicket/markup/outputTransformer/Page_1.java   |  4 +++-
 .../wicket/markup/outputTransformer/Page_2.java   |  4 +++-
 .../wicket/markup/outputTransformer/Page_3.java   |  4 +++-
 .../wicket/protocol/http/WicketFilterTest.java    |  4 ++--
 .../wicket/util/lang/PropertyResolverTest.java    |  2 +-
 .../examples/ajax/builtin/AutoCompletePage.java   |  2 +-
 .../ajax/builtin/OnChangeAjaxBehaviorPage.java    |  2 +-
 .../wicket/examples/source/SourcesPage.java       |  3 ++-
 .../java/org/apache/wicket/examples/tree/Foo.java |  5 +++--
 .../wicket/http2/markup/head/PushHeaderItem.java  |  3 ++-
 .../extensions/ajax/AjaxDownloadBehavior.java     |  2 +-
 .../org/apache/wicket/util/io/ByteOrderMark.java  |  3 ++-
 .../parse/metapattern/parsers/TagNameParser.java  |  4 +++-
 .../wicket/util/string/StringEscapeUtils.java     |  2 +-
 .../org/apache/wicket/util/string/Strings.java    |  4 ++--
 .../org/apache/wicket/util/time/AbstractTime.java |  2 +-
 .../java/org/apache/wicket/util/time/Time.java    |  2 +-
 48 files changed, 117 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e052298..223d80b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -138,6 +138,7 @@
                <aspectj.version>1.9.1</aspectj.version>
                <metrics.version>4.0.3</metrics.version>
                <weld.version>3.0.4.Final</weld.version>
+               <forbiddenapis.version>2.6</forbiddenapis.version>
        </properties>
 
        <dependencyManagement>
@@ -695,10 +696,27 @@
                                <artifactId>maven-javadoc-plugin</artifactId>
                                <inherited>true</inherited>
                        </plugin>
+                       <plugin>
+                               <groupId>de.thetaphi</groupId>
+                               <artifactId>forbiddenapis</artifactId>
+                       </plugin>
                </plugins>
                <pluginManagement>
                        <plugins>
                                <plugin>
+                                       <groupId>de.thetaphi</groupId>
+                                       <artifactId>forbiddenapis</artifactId>
+                                       
<version>${forbiddenapis.version}</version>
+                                       <configuration>
+                                               
<failOnUnsupportedJava>false</failOnUnsupportedJava>
+                                               <signatures><![CDATA[
+                                                       @defaultMessage Specify 
Locale.ROOT to ensure locale insensitive conversion
+                                                       
java.lang.String#toLowerCase() 
+                                                       
java.lang.String#toUpperCase()
+                                               ]]></signatures>
+                                       </configuration>
+                               </plugin>
+                               <plugin>
                                        <groupId>net.alchim31.maven</groupId>
                                        
<artifactId>yuicompressor-maven-plugin</artifactId>
                                        <version>1.5.1</version>

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
----------------------------------------------------------------------
diff --git 
a/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
 
b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
index 527a24f..4409208 100644
--- 
a/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
+++ 
b/wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/DefaultPropertyResolver.java
@@ -7,6 +7,7 @@ import org.apache.wicket.model.PropertyModel;
 
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
+import java.util.Locale;
 
 /**
  * Default property resolver. This resolver supports common Wicket models like 
the
@@ -34,12 +35,12 @@ public class DefaultPropertyResolver implements 
IPropertyResolver
                        String methodName = getter.getName();
                        if (methodName.startsWith("get"))
                        {
-                               name = methodName.substring(3, 4).toLowerCase() 
+
+                               name = methodName.substring(3, 
4).toLowerCase(Locale.ROOT) +
                                        methodName.substring(4);
                        }
                        else if (methodName.startsWith("is"))
                        {
-                               name = methodName.substring(2, 3).toLowerCase() 
+
+                               name = methodName.substring(2, 
3).toLowerCase(Locale.ROOT) +
                                                methodName.substring(3);
                        }
                        else

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestConversationPage.java
----------------------------------------------------------------------
diff --git 
a/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestConversationPage.java
 
b/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestConversationPage.java
index c6cc8bc..926a17e 100644
--- 
a/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestConversationPage.java
+++ 
b/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestConversationPage.java
@@ -19,6 +19,7 @@ package org.apache.wicket.cdi.testapp;
 import javax.enterprise.context.Conversation;
 import javax.inject.Inject;
 
+import java.util.Locale;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.link.Link;
@@ -71,9 +72,9 @@ public class TestConversationPage extends WebPage
                        public void onClick()
                        {
                                String pageType = 
parameters.get("pageType").toString("nonbookmarkable");
-                               if 
("bookmarkable".equals(pageType.toLowerCase()))
+                               if 
("bookmarkable".equals(pageType.toLowerCase(Locale.ROOT)))
                                        
setResponsePage(TestNonConversationalPage.class);
-                               else if 
("hybrid".equals(pageType.toLowerCase()))
+                               else if 
("hybrid".equals(pageType.toLowerCase(Locale.ROOT)))
                                        
setResponsePage(TestConversationPage.this);
                                else
                                        setResponsePage(new 
TestNonConversationalPage());

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestConversationalPage.java
----------------------------------------------------------------------
diff --git 
a/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestConversationalPage.java
 
b/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestConversationalPage.java
index 5e41fd5..93c7ce8 100644
--- 
a/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestConversationalPage.java
+++ 
b/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestConversationalPage.java
@@ -18,6 +18,7 @@ package org.apache.wicket.cdi.testapp;
 
 import javax.inject.Inject;
 
+import java.util.Locale;
 import org.apache.wicket.cdi.ConversationalComponent;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.basic.Label;
@@ -68,7 +69,7 @@ public class TestConversationalPage extends WebPage 
implements ConversationalCom
                        public void onClick()
                        {
                                String pageType = 
pp.get("pageType").toString("nonbookmarkable");
-                               if 
("bookmarkable".equals(pageType.toLowerCase()))
+                               if 
("bookmarkable".equals(pageType.toLowerCase(Locale.ROOT)))
                                        
setResponsePage(TestNonConversationalPage.class);
                                else
                                        setResponsePage(new 
TestNonConversationalPage());

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/DefaultMarkupIdGenerator.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/DefaultMarkupIdGenerator.java 
b/wicket-core/src/main/java/org/apache/wicket/DefaultMarkupIdGenerator.java
index 7be2d52..1a62943 100644
--- a/wicket-core/src/main/java/org/apache/wicket/DefaultMarkupIdGenerator.java
+++ b/wicket-core/src/main/java/org/apache/wicket/DefaultMarkupIdGenerator.java
@@ -16,6 +16,8 @@
  */
 package org.apache.wicket;
 
+import java.util.Locale;
+
 import org.apache.wicket.util.string.Strings;
 
 /**
@@ -63,7 +65,7 @@ public class DefaultMarkupIdGenerator implements 
IMarkupIdGenerator
                        markupIdPrefix = component.getId();
                }
 
-               String markupIdPostfix = 
Integer.toHexString(generatedMarkupId).toLowerCase();
+               String markupIdPostfix = 
Integer.toHexString(generatedMarkupId).toLowerCase(Locale.ROOT);
 
                String markupId = markupIdPrefix + markupIdPostfix;
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 038585d..329e503 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -25,6 +25,7 @@ import java.util.Deque;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Spliterators;
 import java.util.stream.Stream;
@@ -1559,8 +1560,8 @@ public abstract class MarkupContainer extends Component 
implements Iterable<Comp
                                @Override
                                public void component(Component component, 
IVisit<Void> visit)
                                {
-                                       if 
(Strings.getLevenshteinDistance(id.toLowerCase(), component.getId()
-                                               .toLowerCase()) < 3)
+                                       if 
(Strings.getLevenshteinDistance(id.toLowerCase(Locale.ROOT), component.getId()
+                                               .toLowerCase(Locale.ROOT)) < 3)
                                        {
                                                
names.add(component.getPageRelativePath());
                                        }

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
index a6d5952..7d6eeab 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java
@@ -16,6 +16,8 @@
  */
 package org.apache.wicket.ajax.form;
 
+import java.util.Locale;
+
 import org.apache.wicket.Application;
 import org.apache.wicket.Component;
 import org.apache.wicket.WicketRuntimeException;
@@ -136,7 +138,7 @@ public abstract class AjaxFormComponentUpdatingBehavior 
extends AjaxEventBehavio
        {
                final FormComponent<?> formComponent = getFormComponent();
 
-               if ("blur".equals(getEvent().toLowerCase()) && 
disableFocusOnBlur())
+               if ("blur".equals(getEvent().toLowerCase(Locale.ROOT)) && 
disableFocusOnBlur())
                {
                        target.focusComponent(null);
                }

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/core/util/string/ComponentStrings.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/string/ComponentStrings.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/string/ComponentStrings.java
index 118368c..edf5259 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/string/ComponentStrings.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/string/ComponentStrings.java
@@ -16,6 +16,8 @@
  */
 package org.apache.wicket.core.util.string;
 
+import java.util.Locale;
+
 import org.apache.wicket.Component;
 import org.apache.wicket.util.string.AppendingStringBuffer;
 
@@ -60,7 +62,7 @@ public class ComponentStrings
                // create a user friendly message, using the location's message 
as a
                // differentiator for the message (e.g. "component foo was 
***added***"
                // or "component foo was ***created***")
-               AppendingStringBuffer sb = new AppendingStringBuffer("The " + 
componentType.toLowerCase() +
+               AppendingStringBuffer sb = new AppendingStringBuffer("The " + 
componentType.toLowerCase(Locale.ROOT) +
                        " with id '" + component.getId() + "' that failed to 
render was " +
                        location.getMessage() + "\n");
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/markup/head/OnEventHeaderItem.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/head/OnEventHeaderItem.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/head/OnEventHeaderItem.java
index 1bc16e2..fd1bf60 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/head/OnEventHeaderItem.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/head/OnEventHeaderItem.java
@@ -84,7 +84,7 @@ public class OnEventHeaderItem extends HeaderItem
                this.target = Args.notEmpty(target, "target");
 
                Args.notEmpty(event, "event");
-               event = event.toLowerCase(Locale.ENGLISH);
+               event = event.toLowerCase(Locale.ROOT);
                this.event = event;
                this.javaScript = javaScript;
        }

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/markup/html/PackageResourceGuard.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/PackageResourceGuard.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/PackageResourceGuard.java
index 1381b6b..4cf4e40 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/PackageResourceGuard.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/PackageResourceGuard.java
@@ -18,6 +18,7 @@ package org.apache.wicket.markup.html;
 
 import java.io.File;
 import java.util.HashSet;
+import java.util.Locale;
 import java.util.Set;
 
 import org.apache.wicket.Application;
@@ -78,7 +79,7 @@ public class PackageResourceGuard implements 
IPackageResourceGuard
                }
                else
                {
-                       ext = path.substring(ixExtension + 
1).toLowerCase().trim();
+                       ext = path.substring(ixExtension + 
1).toLowerCase(Locale.ROOT).trim();
                }
 
                if ("html".equals(ext))

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
index 3dffbde..86ba60f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
@@ -1543,7 +1543,7 @@ public class Form<T> extends WebMarkupContainer
 
                if (isRootForm())
                {
-                       String method = getMethod().toLowerCase(Locale.ENGLISH);
+                       String method = getMethod().toLowerCase(Locale.ROOT);
                        tag.put("method", method);
                        String url = getActionUrl().toString();
                        if (encodeUrlInHiddenFields())
@@ -1567,7 +1567,7 @@ public class Form<T> extends WebMarkupContainer
                                {
                                        log.warn("Form with id '{}' is 
multipart. It should use method 'POST'!",
                                                getId());
-                                       tag.put("method", 
METHOD_POST.toLowerCase(Locale.ENGLISH));
+                                       tag.put("method", 
METHOD_POST.toLowerCase(Locale.ROOT));
                                }
 
                                tag.put("enctype", ENCTYPE_MULTIPART_FORM_DATA);

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/markup/parser/TagStack.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/TagStack.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/TagStack.java
index 2f4ccb6..bc8da04 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/parser/TagStack.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/parser/TagStack.java
@@ -20,6 +20,7 @@ import java.text.ParseException;
 import java.util.ArrayDeque;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Locale;
 import java.util.Map;
 
 import org.apache.wicket.markup.ComponentTag;
@@ -201,7 +202,7 @@ public class TagStack
         */
        public static boolean requiresCloseTag(final String name)
        {
-               return doesNotRequireCloseTag.get(name.toLowerCase()) == null;
+               return 
doesNotRequireCloseTag.get(name.toLowerCase(Locale.ROOT)) == null;
        }
 
        /**

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlPullParser.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlPullParser.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlPullParser.java
index 6d52cde..a0aee99 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlPullParser.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlPullParser.java
@@ -21,6 +21,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringReader;
 import java.text.ParseException;
+import java.util.Locale;
 
 import org.apache.wicket.markup.parser.XmlTag.TagType;
 import org.apache.wicket.markup.parser.XmlTag.TextSegment;
@@ -256,7 +257,7 @@ public final class XmlPullParser implements IXmlPullParser
                        if ((tagText.length() > STYLE.length()) &&
                                ((tagText.charAt(0) == 's') || 
(tagText.charAt(0) == 'S')))
                        {
-                               final String lowerCase = tagText.toLowerCase();
+                               final String lowerCase = 
tagText.toLowerCase(Locale.ROOT);
                                if (lowerCase.startsWith(SCRIPT))
                                {
                                        String typeAttr = "type=";
@@ -400,7 +401,7 @@ public final class XmlPullParser implements IXmlPullParser
                if (tagText.startsWith("!["))
                {
                        final String startText = (tagText.length() <= 8 ? 
tagText : tagText.substring(0, 8));
-                       if (startText.toUpperCase().equals("![CDATA["))
+                       if 
(startText.toUpperCase(Locale.ROOT).equals("![CDATA["))
                        {
                                int pos1 = openBracketIndex;
                                do

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HeadForceTagIdHandler.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HeadForceTagIdHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HeadForceTagIdHandler.java
index 2a5338d..7e53424 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HeadForceTagIdHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HeadForceTagIdHandler.java
@@ -17,6 +17,7 @@
 package org.apache.wicket.markup.parser.filter;
 
 import java.text.ParseException;
+import java.util.Locale;
 
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.MarkupElement;
@@ -103,7 +104,7 @@ public class HeadForceTagIdHandler extends 
AbstractMarkupFilter
         */
        private boolean needId(final ComponentTag tag)
        {
-               final String name = tag.getName().toLowerCase();
+               final String name = tag.getName().toLowerCase(Locale.ROOT);
                if (name.equals("script") && 
tag.getAttributes().containsKey("src") == false)
                {
                        return true;

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlHandler.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlHandler.java
index 8b95d73..2ba4e8e 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlHandler.java
@@ -19,6 +19,7 @@ package org.apache.wicket.markup.parser.filter;
 import java.text.ParseException;
 import java.util.ArrayDeque;
 import java.util.HashMap;
+import java.util.Locale;
 import java.util.Map;
 
 import org.apache.wicket.markup.ComponentTag;
@@ -200,7 +201,7 @@ public final class HtmlHandler extends AbstractMarkupFilter
         */
        public static boolean requiresCloseTag(final String name)
        {
-               return doesNotRequireCloseTag.get(name.toLowerCase()) == null;
+               return 
doesNotRequireCloseTag.get(name.toLowerCase(Locale.ROOT)) == null;
        }
 
        /**

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlProblemFinder.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlProblemFinder.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlProblemFinder.java
index 9d79e1f..83b7e44 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlProblemFinder.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/HtmlProblemFinder.java
@@ -17,6 +17,7 @@
 package org.apache.wicket.markup.parser.filter;
 
 import java.text.ParseException;
+import java.util.Locale;
 
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.MarkupElement;
@@ -99,7 +100,7 @@ public final class HtmlProblemFinder extends 
AbstractMarkupFilter
                {
                        if (key != null)
                        {
-                               key = key.toLowerCase();
+                               key = key.toLowerCase(Locale.ROOT);
                                String namespaceDot = getWicketNamespace() + 
'.';
                                if (key.startsWith(namespaceDot))
                                {

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
index f89a11b..bf60c6c 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/OpenCloseTagExpander.java
@@ -19,6 +19,7 @@ package org.apache.wicket.markup.parser.filter;
 import java.text.ParseException;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Locale;
 
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.MarkupElement;
@@ -130,6 +131,6 @@ public class OpenCloseTagExpander extends 
AbstractMarkupFilter
         */
        protected boolean contains(final String name)
        {
-               return REPLACE_FOR_TAGS.contains(name.toLowerCase());
+               return REPLACE_FOR_TAGS.contains(name.toLowerCase(Locale.ROOT));
        }
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/WicketNamespaceHandler.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/WicketNamespaceHandler.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/WicketNamespaceHandler.java
index 2f60fa7..751705f 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/WicketNamespaceHandler.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/WicketNamespaceHandler.java
@@ -17,6 +17,7 @@
 package org.apache.wicket.markup.parser.filter;
 
 import java.text.ParseException;
+import java.util.Locale;
 import java.util.Map;
 
 import org.apache.wicket.Application;
@@ -59,7 +60,7 @@ public final class WicketNamespaceHandler extends 
AbstractMarkupFilter
        @Override
        protected final MarkupElement onComponentTag(ComponentTag tag) throws 
ParseException
        {
-               if (tag.isOpen() && "html".equals(tag.getName().toLowerCase()))
+               if (tag.isOpen() && 
"html".equals(tag.getName().toLowerCase(Locale.ROOT)))
                {
                        final String namespace = determineWicketNamespace(tag);
                        if (namespace != null)

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/WicketTagIdentifier.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/WicketTagIdentifier.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/WicketTagIdentifier.java
index 301321f..01f3c74 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/WicketTagIdentifier.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/WicketTagIdentifier.java
@@ -169,7 +169,7 @@ public final class WicketTagIdentifier extends 
AbstractMarkupFilter
         */
        public static void registerWellKnownTagName(final String name)
        {
-               String lowerCaseName = name.toLowerCase(Locale.ENGLISH);
+               String lowerCaseName = name.toLowerCase(Locale.ROOT);
                WELL_KNOWN_TAG_NAMES.add(lowerCaseName);
        }
 
@@ -180,7 +180,7 @@ public final class WicketTagIdentifier extends 
AbstractMarkupFilter
         */
        private boolean isWellKnown(final ComponentTag tag)
        {
-               String lowerCaseTagName = 
tag.getName().toLowerCase(Locale.ENGLISH);
+               String lowerCaseTagName = 
tag.getName().toLowerCase(Locale.ROOT);
                return WELL_KNOWN_TAG_NAMES.contains(lowerCaseTagName);
        }
 
@@ -191,7 +191,7 @@ public final class WicketTagIdentifier extends 
AbstractMarkupFilter
         */
        private boolean isRaw(final ComponentTag tag)
        {
-               String lowerCaseTagName = 
tag.getName().toLowerCase(Locale.ENGLISH);
+               String lowerCaseTagName = 
tag.getName().toLowerCase(Locale.ROOT);
                return RAW_TAG_NAMES.contains(lowerCaseTagName);
        }
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/model/LoadableDetachableModel.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/model/LoadableDetachableModel.java
 
b/wicket-core/src/main/java/org/apache/wicket/model/LoadableDetachableModel.java
index 0c294d0..58a691b 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/model/LoadableDetachableModel.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/model/LoadableDetachableModel.java
@@ -16,6 +16,8 @@
  */
 package org.apache.wicket.model;
 
+import java.util.Locale;
+
 import org.danekja.java.util.function.serializable.SerializableSupplier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -63,7 +65,7 @@ public abstract class LoadableDetachableModel<T> implements 
IModel<T>
                @Override
                public String toString()
                {
-                       return name().toLowerCase();
+                       return name().toLowerCase(Locale.ROOT);
                }
        }
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/protocol/http/CsrfPreventionRequestCycleListener.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/CsrfPreventionRequestCycleListener.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/CsrfPreventionRequestCycleListener.java
index 63cdc88..de60a39 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/CsrfPreventionRequestCycleListener.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/CsrfPreventionRequestCycleListener.java
@@ -419,7 +419,7 @@ public class CsrfPreventionRequestCycleListener implements 
IRequestCycleListener
                        }
                        return;
                }
-               sourceUri = sourceUri.toLowerCase();
+               sourceUri = sourceUri.toLowerCase(Locale.ROOT);
 
                // if the origin is a know and trusted origin, don't check any 
further but allow the request
                if (isWhitelistedHost(sourceUri))
@@ -539,7 +539,7 @@ public class CsrfPreventionRequestCycleListener implements 
IRequestCycleListener
                        }
                        else
                        {
-                               scheme = scheme.toLowerCase(Locale.ENGLISH);
+                               scheme = scheme.toLowerCase(Locale.ROOT);
                        }
 
                        target.append(scheme);
@@ -590,7 +590,7 @@ public class CsrfPreventionRequestCycleListener implements 
IRequestCycleListener
                }
                else
                {
-                       scheme = scheme.toLowerCase(Locale.ENGLISH);
+                       scheme = scheme.toLowerCase(Locale.ROOT);
                }
                target.append(scheme);
                target.append("://");

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
index 59cb318..503f793 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
@@ -830,7 +830,7 @@ public abstract class WebApplication extends Application
                        {
                                try
                                {
-                                       configurationType = 
RuntimeConfigurationType.valueOf(result.toUpperCase());
+                                       configurationType = 
RuntimeConfigurationType.valueOf(result.toUpperCase(Locale.ROOT));
                                }
                                catch (IllegalArgumentException e)
                                {

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletRequest.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletRequest.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletRequest.java
index 5ca94b2..2c42cd9 100755
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletRequest.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletRequest.java
@@ -689,10 +689,10 @@ public class MockHttpServletRequest implements 
HttpServletRequest
                        return null;
                }
 
-               final String language = bits[0].toLowerCase();
+               final String language = bits[0].toLowerCase(Locale.ROOT);
                if (bits.length > 1)
                {
-                       final String country = bits[1].toUpperCase();
+                       final String country = bits[1].toUpperCase(Locale.ROOT);
                        return new Locale(language, country);
                }
                else
@@ -1524,8 +1524,8 @@ public class MockHttpServletRequest implements 
HttpServletRequest
                addHeader("Accept", 
"text/xml,application/xml,application/xhtml+xml,"
                        + 
"text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5");
                addHeader("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7");
-               addHeader("Accept-Language", l.getLanguage().toLowerCase() + "-"
-                       + l.getCountry().toLowerCase() + "," + 
l.getLanguage().toLowerCase() + ";q=0.5");
+               addHeader("Accept-Language", 
l.getLanguage().toLowerCase(Locale.ROOT) + "-"
+                       + l.getCountry().toLowerCase(Locale.ROOT) + "," + 
l.getLanguage().toLowerCase(Locale.ROOT) + ";q=0.5");
                addHeader("User-Agent",
                        "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) 
Gecko/20100101 Firefox/41.0");
        }

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java
index e73bcdd..b5d0544 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java
@@ -18,6 +18,7 @@ package org.apache.wicket.protocol.http.request;
 
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.util.Locale;
 
 import javax.servlet.http.HttpServletRequest;
 
@@ -135,7 +136,7 @@ public class WebClientInfo extends ClientInfo
         */
        private String getUserAgentStringLc()
        {
-               return (getUserAgent() != null) ? getUserAgent().toLowerCase() 
: "";
+               return (getUserAgent() != null) ? 
getUserAgent().toLowerCase(Locale.ROOT) : "";
        }
 
        /**

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/protocol/https/Scheme.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/https/Scheme.java 
b/wicket-core/src/main/java/org/apache/wicket/protocol/https/Scheme.java
index 2332085..43cb6e8 100644
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/https/Scheme.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/https/Scheme.java
@@ -16,6 +16,8 @@
  */
 package org.apache.wicket.protocol.https;
 
+import java.util.Locale;
+
 /**
  * Url scheme
  * 
@@ -83,7 +85,7 @@ public enum Scheme {
         */
        public String urlName()
        {
-               return name().toLowerCase();
+               return name().toLowerCase(Locale.ROOT);
        }
 
        /**

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
 
b/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
index fe32cab..1fbb2ec 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/request/resource/AbstractResource.java
@@ -19,6 +19,7 @@ package org.apache.wicket.request.resource;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.HashSet;
+import java.util.Locale;
 import java.util.Set;
 
 import javax.servlet.http.HttpServletResponse;
@@ -691,7 +692,7 @@ public abstract class AbstractResource implements IResource
         */
        private void checkHeaderAccess(String name)
        {
-               name = Args.notEmpty(name.trim().toLowerCase(), "name");
+               name = Args.notEmpty(name.trim().toLowerCase(Locale.ROOT), 
"name");
 
                if (INTERNAL_HEADERS.contains(name))
                {

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/request/resource/ResourceReference.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/request/resource/ResourceReference.java
 
b/wicket-core/src/main/java/org/apache/wicket/request/resource/ResourceReference.java
index cadfd21..4812f19 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/request/resource/ResourceReference.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/request/resource/ResourceReference.java
@@ -152,7 +152,7 @@ public abstract class ResourceReference implements 
IClusterable
                }
 
                // return extension
-               return name.substring(extPos + 1).toLowerCase();
+               return name.substring(extPos + 1).toLowerCase(Locale.ROOT);
        }
 
        /**

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/resource/ResourceUtil.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/resource/ResourceUtil.java 
b/wicket-core/src/main/java/org/apache/wicket/resource/ResourceUtil.java
index 3f4ff08..2ac0e96 100644
--- a/wicket-core/src/main/java/org/apache/wicket/resource/ResourceUtil.java
+++ b/wicket-core/src/main/java/org/apache/wicket/resource/ResourceUtil.java
@@ -189,7 +189,7 @@ public class ResourceUtil
                }
                else
                {
-                       String parts[] = locale.toLowerCase().split("_", 3);
+                       String parts[] = 
locale.toLowerCase(Locale.ROOT).split("_", 3);
                        if (parts.length == 1)
                        {
                                return new Locale(parts[0]);

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java 
b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
index ce09dd9..4871252 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
@@ -2151,7 +2151,7 @@ public class BaseWicketTester
        {
                List<Serializable> messages = getMessages(level);
                return isTrue(String.format("expected no %s message, but 
contains\n%s",
-                       new FeedbackMessage(null, "", 
level).getLevelAsString().toLowerCase(Locale.ENGLISH),
+                       new FeedbackMessage(null, "", 
level).getLevelAsString().toLowerCase(Locale.ROOT),
                        WicketTesterHelper.asLined(messages)), 
messages.isEmpty());
        }
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/validation/validator/AbstractRangeValidator.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/validation/validator/AbstractRangeValidator.java
 
b/wicket-core/src/main/java/org/apache/wicket/validation/validator/AbstractRangeValidator.java
index c954368..6a2475b 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/validation/validator/AbstractRangeValidator.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/validation/validator/AbstractRangeValidator.java
@@ -17,6 +17,7 @@
 package org.apache.wicket.validation.validator;
 
 import java.io.Serializable;
+import java.util.Locale;
 
 import org.apache.wicket.behavior.Behavior;
 import org.apache.wicket.validation.IValidatable;
@@ -206,7 +207,7 @@ public abstract class AbstractRangeValidator<R extends 
Comparable<? super R> & S
 
                public String getVariation()
                {
-                       return name().toLowerCase();
+                       return name().toLowerCase(Locale.ROOT);
                }
        }
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/main/java/org/apache/wicket/validation/validator/StringValidator.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/validation/validator/StringValidator.java
 
b/wicket-core/src/main/java/org/apache/wicket/validation/validator/StringValidator.java
index 646ce76..dedae59 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/validation/validator/StringValidator.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/validation/validator/StringValidator.java
@@ -106,7 +106,7 @@ public class StringValidator extends 
AbstractRangeValidator<Integer, String>
        {
                super.onComponentTag(component, tag);
 
-               String tagName = tag.getName().toLowerCase(Locale.ENGLISH);
+               String tagName = tag.getName().toLowerCase(Locale.ROOT);
                boolean hasLengthAttribute = hasLengthAttribute(tagName);
 
                Integer maximum = getMaximum();

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_1.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_1.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_1.java
index 8316b2c..2bbb7b2 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_1.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_1.java
@@ -16,6 +16,8 @@
  */
 package org.apache.wicket.markup.outputTransformer;
 
+import java.util.Locale;
+
 import org.apache.wicket.AttributeModifier;
 import org.apache.wicket.Component;
 import org.apache.wicket.MarkupContainer;
@@ -82,7 +84,7 @@ public class Page_1 extends WebPage
                        public CharSequence transform(Component component, 
CharSequence output)
                        {
                                // Convert all text to uppercase
-                               return output.toString().toUpperCase();
+                               return 
output.toString().toUpperCase(Locale.ROOT);
                        }
                };
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_2.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_2.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_2.java
index 5101300..5f68a9b 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_2.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_2.java
@@ -16,6 +16,8 @@
  */
 package org.apache.wicket.markup.outputTransformer;
 
+import java.util.Locale;
+
 import org.apache.wicket.AttributeModifier;
 import org.apache.wicket.Component;
 import org.apache.wicket.MarkupContainer;
@@ -74,7 +76,7 @@ public class Page_2 extends WebPage
                        public CharSequence transform(Component component, 
CharSequence output)
                        {
                                // Convert all text to uppercase
-                               return output.toString().toUpperCase();
+                               return 
output.toString().toUpperCase(Locale.ROOT);
                        }
                };
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_3.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_3.java
 
b/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_3.java
index 3491895..8b79c7b 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_3.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/outputTransformer/Page_3.java
@@ -16,6 +16,8 @@
  */
 package org.apache.wicket.markup.outputTransformer;
 
+import java.util.Locale;
+
 import org.apache.wicket.Component;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.transformer.AbstractTransformerBehavior;
@@ -49,7 +51,7 @@ public class Page_3 extends WebPage
                                throws Exception
                        {
                                // Convert all text to uppercase
-                               return output.toString().toUpperCase();
+                               return 
output.toString().toUpperCase(Locale.ROOT);
                        }
                });
        }

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
index 5b4db27..7d75bab 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/protocol/http/WicketFilterTest.java
@@ -318,8 +318,8 @@ public class WicketFilterTest
                        assertEquals(HttpServletResponse.SC_OK, 
response.getStatus());
                        assertEquals("0", response.getHeader("Content-Length"));
                        
assertFalse(Strings.isEmpty(response.getHeader("Allow")));
-                       
assertTrue(response.getHeader("Allow").toUpperCase().contains("GET"));
-                       
assertTrue(response.getHeader("Allow").toUpperCase().contains("POST"));
+                       
assertTrue(response.getHeader("Allow").toUpperCase(Locale.ROOT).contains("GET"));
+                       
assertTrue(response.getHeader("Allow").toUpperCase(Locale.ROOT).contains("POST"));
 
                        // try with a GET request to make sure we fail correctly
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyResolverTest.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyResolverTest.java
 
b/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyResolverTest.java
index 0f11b13..0fb33ba 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyResolverTest.java
+++ 
b/wicket-core/src/test/java/org/apache/wicket/util/lang/PropertyResolverTest.java
@@ -673,7 +673,7 @@ public class PropertyResolverTest extends WicketTestCase
                }
                catch (ConversionException e)
                {
-                       
assertTrue(e.getMessage().toLowerCase().contains("name"));
+                       
assertTrue(e.getMessage().toLowerCase(Locale.ROOT).contains("name"));
                }
        }
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AutoCompletePage.java
----------------------------------------------------------------------
diff --git 
a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AutoCompletePage.java
 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AutoCompletePage.java
index ae31064..7e2aecd 100644
--- 
a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AutoCompletePage.java
+++ 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AutoCompletePage.java
@@ -88,7 +88,7 @@ public class AutoCompletePage extends BasePage
                                {
                                        final String country = 
locale.getDisplayCountry();
 
-                                       if 
(country.toUpperCase().startsWith(input.toUpperCase()))
+                                       if 
(country.toUpperCase(Locale.ROOT).startsWith(input.toUpperCase(Locale.ROOT)))
                                        {
                                                choices.add(country);
                                                if (choices.size() == 10)

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/OnChangeAjaxBehaviorPage.java
----------------------------------------------------------------------
diff --git 
a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/OnChangeAjaxBehaviorPage.java
 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/OnChangeAjaxBehaviorPage.java
index a363654..aa89bf4 100644
--- 
a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/OnChangeAjaxBehaviorPage.java
+++ 
b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/OnChangeAjaxBehaviorPage.java
@@ -47,7 +47,7 @@ public class OnChangeAjaxBehaviorPage extends BasePage
                {
                        final String country = locale.getDisplayCountry();
 
-                       if 
(country.toUpperCase().startsWith(input.toUpperCase()))
+                       if 
(country.toUpperCase(Locale.ROOT).startsWith(input.toUpperCase(Locale.ROOT)))
                        {
                                buffer.append(country);
                                buffer.append(' ');

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java
----------------------------------------------------------------------
diff --git 
a/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java
 
b/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java
index 1f411f8..1f95f08 100644
--- 
a/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java
+++ 
b/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java
@@ -29,6 +29,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.List;
+import java.util.Locale;
 import java.util.Optional;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
@@ -216,7 +217,7 @@ public class SourcesPage extends WebPage
                                                        String jarZipPart = 
uri.getSchemeSpecificPart();
                                                        // lowercased for 
testing if jar/zip, but leave the
                                                        // real filespec 
unchanged
-                                                       String lowerJarZipPart 
= jarZipPart.toLowerCase();
+                                                       String lowerJarZipPart 
= jarZipPart.toLowerCase(Locale.ROOT);
                                                        int index = 
lowerJarZipPart.indexOf(".zip");
                                                        if (index == -1)
                                                                index = 
lowerJarZipPart.indexOf(".jar");

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-examples/src/main/java/org/apache/wicket/examples/tree/Foo.java
----------------------------------------------------------------------
diff --git 
a/wicket-examples/src/main/java/org/apache/wicket/examples/tree/Foo.java 
b/wicket-examples/src/main/java/org/apache/wicket/examples/tree/Foo.java
index fa85944..a7d04f1 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/tree/Foo.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/tree/Foo.java
@@ -20,6 +20,7 @@ import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.Locale;
 
 /**
  * @author Sven Meier
@@ -46,8 +47,8 @@ public class Foo implements Serializable
        public Foo(String id)
        {
                this.id = id;
-               bar = id.toLowerCase() + "Bar";
-               baz = id.toLowerCase() + "Baz";
+               bar = id.toLowerCase(Locale.ROOT) + "Bar";
+               baz = id.toLowerCase(Locale.ROOT) + "Baz";
        }
 
        public Foo(Foo parent, String name)

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
----------------------------------------------------------------------
diff --git 
a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
 
b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
index cb7aa44..85b27c3 100644
--- 
a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
+++ 
b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
@@ -24,6 +24,7 @@ import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeParseException;
 import java.util.Date;
 import java.util.List;
+import java.util.Locale;
 import java.util.Objects;
 import java.util.Set;
 import java.util.TreeSet;
@@ -419,7 +420,7 @@ public class PushHeaderItem extends HeaderItem
        public boolean isHttp2(HttpServletRequest request)
        {
                // detects http/2 and http/2.0
-               return 
request.getProtocol().toLowerCase().contains(HTTP2_PROTOCOL);
+               return 
request.getProtocol().toLowerCase(Locale.ROOT).contains(HTTP2_PROTOCOL);
        }
 
        /**

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/AjaxDownloadBehavior.java
----------------------------------------------------------------------
diff --git 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/AjaxDownloadBehavior.java
 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/AjaxDownloadBehavior.java
index 0b613db..4b2a217 100644
--- 
a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/AjaxDownloadBehavior.java
+++ 
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/AjaxDownloadBehavior.java
@@ -238,7 +238,7 @@ public class AjaxDownloadBehavior extends 
AbstractDefaultAjaxBehavior
                settings.put("attributes", new 
JSONFunction(renderAjaxAttributes(getComponent())));
                settings.put("name", getName());
                settings.put("downloadUrl", url);
-               settings.put("method", 
getLocation().name().toLowerCase(Locale.ENGLISH));
+               settings.put("method", 
getLocation().name().toLowerCase(Locale.ROOT));
 
                
target.appendJavaScript(String.format("Wicket.AjaxDownload.initiate(%s);", 
settings));
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-util/src/main/java/org/apache/wicket/util/io/ByteOrderMark.java
----------------------------------------------------------------------
diff --git 
a/wicket-util/src/main/java/org/apache/wicket/util/io/ByteOrderMark.java 
b/wicket-util/src/main/java/org/apache/wicket/util/io/ByteOrderMark.java
index e1ee046..c798632 100644
--- a/wicket-util/src/main/java/org/apache/wicket/util/io/ByteOrderMark.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/io/ByteOrderMark.java
@@ -17,6 +17,7 @@
 package org.apache.wicket.util.io;
 
 import java.io.Serializable;
+import java.util.Locale;
 
 /**
  * Byte Order Mark (BOM) representation - see {@link BOMInputStream}.
@@ -182,7 +183,7 @@ public class ByteOrderMark implements Serializable {
                 builder.append(",");
             }
             builder.append("0x");
-            builder.append(Integer.toHexString(0xFF & bytes[i]).toUpperCase());
+            builder.append(Integer.toHexString(0xFF & 
bytes[i]).toUpperCase(Locale.ROOT));
         }
         builder.append(']');
         return builder.toString();

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-util/src/main/java/org/apache/wicket/util/parse/metapattern/parsers/TagNameParser.java
----------------------------------------------------------------------
diff --git 
a/wicket-util/src/main/java/org/apache/wicket/util/parse/metapattern/parsers/TagNameParser.java
 
b/wicket-util/src/main/java/org/apache/wicket/util/parse/metapattern/parsers/TagNameParser.java
index 6fadf9a..2be8aba 100644
--- 
a/wicket-util/src/main/java/org/apache/wicket/util/parse/metapattern/parsers/TagNameParser.java
+++ 
b/wicket-util/src/main/java/org/apache/wicket/util/parse/metapattern/parsers/TagNameParser.java
@@ -16,6 +16,8 @@
  */
 package org.apache.wicket.util.parse.metapattern.parsers;
 
+import java.util.Locale;
+
 import org.apache.wicket.util.parse.metapattern.Group;
 import org.apache.wicket.util.parse.metapattern.MetaPattern;
 import org.apache.wicket.util.parse.metapattern.OptionalMetaPattern;
@@ -61,7 +63,7 @@ public final class TagNameParser extends MetaPatternParser
                final String namespace = namespaceGroup.get(matcher());
                if (namespace != null)
                {
-                       return namespace.toLowerCase();
+                       return namespace.toLowerCase(Locale.ROOT);
                }
                return namespace;
        }

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-util/src/main/java/org/apache/wicket/util/string/StringEscapeUtils.java
----------------------------------------------------------------------
diff --git 
a/wicket-util/src/main/java/org/apache/wicket/util/string/StringEscapeUtils.java
 
b/wicket-util/src/main/java/org/apache/wicket/util/string/StringEscapeUtils.java
index 306afbc..9c9a3b3 100755
--- 
a/wicket-util/src/main/java/org/apache/wicket/util/string/StringEscapeUtils.java
+++ 
b/wicket-util/src/main/java/org/apache/wicket/util/string/StringEscapeUtils.java
@@ -81,7 +81,7 @@ class StringEscapeUtils
         */
        private static String hex(char ch)
        {
-               return Integer.toHexString(ch).toUpperCase(Locale.ENGLISH);
+               return Integer.toHexString(ch).toUpperCase(Locale.ROOT);
        }
 
        // HTML and XML

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-util/src/main/java/org/apache/wicket/util/string/Strings.java
----------------------------------------------------------------------
diff --git 
a/wicket-util/src/main/java/org/apache/wicket/util/string/Strings.java 
b/wicket-util/src/main/java/org/apache/wicket/util/string/Strings.java
index 8b80dbb..52c9c5c 100755
--- a/wicket-util/src/main/java/org/apache/wicket/util/string/Strings.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/string/Strings.java
@@ -946,7 +946,7 @@ public final class Strings
                }
 
                // http://.../abc;jsessionid=...?param=...
-               int ixSemiColon = 
url.toLowerCase(Locale.ENGLISH).indexOf(SESSION_ID_PARAM);
+               int ixSemiColon = 
url.toLowerCase(Locale.ROOT).indexOf(SESSION_ID_PARAM);
                if (ixSemiColon == -1)
                {
                        return url;
@@ -1371,7 +1371,7 @@ public final class Strings
                }
                else
                {
-                       return 
str.toLowerCase().startsWith(prefix.toLowerCase());
+                       return 
str.toLowerCase(Locale.ROOT).startsWith(prefix.toLowerCase(Locale.ROOT));
                }
        }
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-util/src/main/java/org/apache/wicket/util/time/AbstractTime.java
----------------------------------------------------------------------
diff --git 
a/wicket-util/src/main/java/org/apache/wicket/util/time/AbstractTime.java 
b/wicket-util/src/main/java/org/apache/wicket/util/time/AbstractTime.java
index d000efb..e22bc89 100755
--- a/wicket-util/src/main/java/org/apache/wicket/util/time/AbstractTime.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/time/AbstractTime.java
@@ -100,7 +100,7 @@ abstract class AbstractTime extends AbstractTimeValue
                        synchronized (calendar)
                        {
                                timeFormat.setCalendar(calendar);
-                               return timeFormat.format(new 
Date(getMilliseconds())).toLowerCase();
+                               return timeFormat.format(new 
Date(getMilliseconds())).toLowerCase(Locale.ROOT);
                        }
                }
        }

http://git-wip-us.apache.org/repos/asf/wicket/blob/138abdd0/wicket-util/src/main/java/org/apache/wicket/util/time/Time.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/main/java/org/apache/wicket/util/time/Time.java 
b/wicket-util/src/main/java/org/apache/wicket/util/time/Time.java
index a4497c6..21a8abc 100755
--- a/wicket-util/src/main/java/org/apache/wicket/util/time/Time.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/time/Time.java
@@ -505,7 +505,7 @@ public final class Time extends AbstractTime
                        {
                                dateFormat.setCalendar(calendar);
 
-                               return dateFormat.format(new 
Date(getMilliseconds())).toLowerCase();
+                               return dateFormat.format(new 
Date(getMilliseconds())).toLowerCase(Locale.ROOT);
                        }
                }
        }

Reply via email to