Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2012-11-01 20:55:00 -0400
committerGreg Wilkins2012-11-01 20:55:00 -0400
commit65202e9abe2c56a05b45140e46c70a94b4119cbb (patch)
tree2941254168c68ed4416df8cf8bfdd9eec5467204
parentba06103442f221f1a1e680f25a3de1f91b157683 (diff)
downloadorg.eclipse.jetty.project-65202e9abe2c56a05b45140e46c70a94b4119cbb.tar.gz
org.eclipse.jetty.project-65202e9abe2c56a05b45140e46c70a94b4119cbb.tar.xz
org.eclipse.jetty.project-65202e9abe2c56a05b45140e46c70a94b4119cbb.zip
393363 Use Locale.ENGLISH for all toUpperCase and toLowerCase calls
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java5
-rw-r--r--jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ResourceAnnotationHandler.java3
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/SslHttpExchangeTest.java4
-rw-r--r--jetty-client/src/test/java/org/eclipse/jetty/client/SslSecurityListenerTest.java3
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/WebAppDeployer.java3
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ContextProvider.java3
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java7
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/util/FileID.java7
-rw-r--r--jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java2
-rw-r--r--jetty-http/src/test/java/org/eclipse/jetty/http/HttpFieldsTest.java19
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java3
-rw-r--r--jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MBeanContainer.java3
-rw-r--r--jetty-jmx/src/main/java/org/eclipse/jetty/jmx/ObjectMBean.java2
-rw-r--r--jetty-plus/src/main/java/org/eclipse/jetty/plus/annotation/Injection.java3
-rw-r--r--jetty-plus/src/main/java/org/eclipse/jetty/plus/jaas/spi/LdapLoginModule.java9
-rw-r--r--jetty-plus/src/main/java/org/eclipse/jetty/plus/security/DataSourceLoginService.java7
-rw-r--r--jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/ProxyRule.java5
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/authentication/FormAuthenticator.java7
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/CookieCutter.java4
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java7
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/SelectChannelTimeoutTest.java7
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/handler/AbstractConnectHandlerTest.java3
-rw-r--r--jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java3
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Invoker.java3
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/CGI.java5
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java5
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/MultiPartFilter.java3
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java3
-rw-r--r--jetty-servlets/src/test/java/org/eclipse/jetty/servlets/PutFilterTest.java3
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Headers.java17
-rw-r--r--jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/HeadersBlockGenerator.java3
-rw-r--r--jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategy.java3
-rw-r--r--jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYAsyncConnection.java3
-rw-r--r--jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPSPDYAsyncConnection.java3
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Config.java9
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Main.java9
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java5
-rwxr-xr-xjetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONObjectConvertor.java5
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONPojoConvertor.java5
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JarScanner.java3
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java3
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java5
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java7
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java3
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java5
-rw-r--r--jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java7
-rw-r--r--test-jetty-webapp/src/main/java/com/acme/Dump.java2
47 files changed, 142 insertions, 96 deletions
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java
index 781cac429f..bd362f033c 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java
@@ -29,6 +29,7 @@ import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.jar.JarEntry;
@@ -580,7 +581,7 @@ public class AnnotationParser
try
{
String name = entry.getName();
- if (name.toLowerCase().endsWith(".class"))
+ if (name.toLowerCase(Locale.ENGLISH).endsWith(".class"))
{
String shortName = name.replace('/', '.').substring(0,name.length()-6);
if ((resolver == null)
@@ -624,7 +625,7 @@ public class AnnotationParser
try
{
String name = entry.getName();
- if (name.toLowerCase().endsWith(".class"))
+ if (name.toLowerCase(Locale.ENGLISH).endsWith(".class"))
{
String shortName = name.replace('/', '.').substring(0,name.length()-6);
diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ResourceAnnotationHandler.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ResourceAnnotationHandler.java
index 4f2dd12857..af2d8aeb0e 100644
--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ResourceAnnotationHandler.java
+++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ResourceAnnotationHandler.java
@@ -21,6 +21,7 @@ package org.eclipse.jetty.annotations;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
+import java.util.Locale;
import javax.annotation.Resource;
import javax.naming.InitialContext;
@@ -262,7 +263,7 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
//default name is the javabean property name
String name = method.getName().substring(3);
- name = name.substring(0,1).toLowerCase()+name.substring(1);
+ name = name.substring(0,1).toLowerCase(Locale.ENGLISH)+name.substring(1);
name = clazz.getCanonicalName()+"/"+name;
name = (resource.name()!=null && !resource.name().trim().equals("")? resource.name(): name);
diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/SslHttpExchangeTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/SslHttpExchangeTest.java
index 0aa29202d7..93b1c2b7f5 100644
--- a/jetty-client/src/test/java/org/eclipse/jetty/client/SslHttpExchangeTest.java
+++ b/jetty-client/src/test/java/org/eclipse/jetty/client/SslHttpExchangeTest.java
@@ -21,6 +21,8 @@ package org.eclipse.jetty.client;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.not;
+import java.util.Locale;
+
import org.eclipse.jetty.client.helperClasses.ServerAndClientCreator;
import org.eclipse.jetty.client.helperClasses.SslServerAndClientCreator;
import org.eclipse.jetty.server.Connector;
@@ -51,7 +53,7 @@ public class SslHttpExchangeTest extends HttpExchangeTest
{
// Use Junit 4.x to flag test as ignored if encountering IBM JVM
// Will show up in various junit reports as an ignored test as well.
- Assume.assumeThat(System.getProperty("java.vendor").toLowerCase(),not(containsString("ibm")));
+ Assume.assumeThat(System.getProperty("java.vendor").toLowerCase(Locale.ENGLISH),not(containsString("ibm")));
}
/* ------------------------------------------------------------ */
diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/SslSecurityListenerTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/SslSecurityListenerTest.java
index 0e4183ad01..56d7363801 100644
--- a/jetty-client/src/test/java/org/eclipse/jetty/client/SslSecurityListenerTest.java
+++ b/jetty-client/src/test/java/org/eclipse/jetty/client/SslSecurityListenerTest.java
@@ -28,6 +28,7 @@ import java.io.OutputStream;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
+import java.util.Locale;
import java.util.Set;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.TimeUnit;
@@ -126,7 +127,7 @@ public class SslSecurityListenerTest
public void testSslGet() throws Exception
{
// TODO Resolve problems on IBM JVM https://bugs.eclipse.org/bugs/show_bug.cgi?id=304532
- if (System.getProperty("java.vendor").toLowerCase().indexOf("ibm")>=0)
+ if (System.getProperty("java.vendor").toLowerCase(Locale.ENGLISH).indexOf("ibm")>=0)
{
LOG.warn("Skipped SSL testSslGet on IBM JVM");
return;
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/WebAppDeployer.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/WebAppDeployer.java
index 759c31cce3..6c841f173b 100644
--- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/WebAppDeployer.java
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/WebAppDeployer.java
@@ -19,6 +19,7 @@
package org.eclipse.jetty.deploy;
import java.util.ArrayList;
+import java.util.Locale;
import org.eclipse.jetty.deploy.providers.ScanningAppProvider;
import org.eclipse.jetty.server.Handler;
@@ -223,7 +224,7 @@ public class WebAppDeployer extends AbstractLifeCycle
Resource app=r.addPath(r.encode(context));
- if (context.toLowerCase().endsWith(".war")||context.toLowerCase().endsWith(".jar"))
+ if (context.toLowerCase(Locale.ENGLISH).endsWith(".war")||context.toLowerCase(Locale.ENGLISH).endsWith(".jar"))
{
context=context.substring(0,context.length()-4);
Resource unpacked=r.addPath(context);
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ContextProvider.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ContextProvider.java
index f9e0dea5d0..2e4af29098 100644
--- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ContextProvider.java
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ContextProvider.java
@@ -20,6 +20,7 @@ package org.eclipse.jetty.deploy.providers;
import java.io.File;
import java.io.FilenameFilter;
+import java.util.Locale;
import org.eclipse.jetty.deploy.App;
import org.eclipse.jetty.deploy.ConfigurationManager;
@@ -45,7 +46,7 @@ public class ContextProvider extends ScanningAppProvider
{
if (!dir.exists())
return false;
- String lowername = name.toLowerCase();
+ String lowername = name.toLowerCase(Locale.ENGLISH);
if (lowername.startsWith("."))
return false;
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java
index fbad5325c5..f27a84548a 100644
--- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java
@@ -22,6 +22,7 @@ import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.net.MalformedURLException;
+import java.util.Locale;
import org.eclipse.jetty.deploy.App;
import org.eclipse.jetty.deploy.util.FileID;
@@ -59,7 +60,7 @@ public class WebAppProvider extends ScanningAppProvider
{
return false;
}
- String lowername = name.toLowerCase();
+ String lowername = name.toLowerCase(Locale.ENGLISH);
File file = new File(dir,name);
// is it not a directory and not a war ?
@@ -279,9 +280,9 @@ public class WebAppProvider extends ScanningAppProvider
{
context = URIUtil.SLASH;
}
- else if (context.toLowerCase().startsWith("root-"))
+ else if (context.toLowerCase(Locale.ENGLISH).startsWith("root-"))
{
- int dash=context.toLowerCase().indexOf('-');
+ int dash=context.toLowerCase(Locale.ENGLISH).indexOf('-');
String virtual = context.substring(dash+1);
wah.setVirtualHosts(new String[]{virtual});
context = URIUtil.SLASH;
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/util/FileID.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/util/FileID.java
index cda1fe21a8..7df726926f 100644
--- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/util/FileID.java
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/util/FileID.java
@@ -19,6 +19,7 @@
package org.eclipse.jetty.deploy.util;
import java.io.File;
+import java.util.Locale;
/**
* Simple, yet surprisingly common utility methods for identifying various file types commonly seen and worked with in a
@@ -38,7 +39,7 @@ public class FileID
{
if (path.isFile())
{
- String name = path.getName().toLowerCase();
+ String name = path.getName().toLowerCase(Locale.ENGLISH);
return (name.endsWith(".war") || name.endsWith(".jar"));
}
@@ -62,7 +63,7 @@ public class FileID
return false;
}
- String name = path.getName().toLowerCase();
+ String name = path.getName().toLowerCase(Locale.ENGLISH);
return (name.endsWith(".war") || name.endsWith(".jar"));
}
@@ -73,7 +74,7 @@ public class FileID
return false;
}
- String name = path.getName().toLowerCase();
+ String name = path.getName().toLowerCase(Locale.ENGLISH);
return name.endsWith(".xml");
}
}
diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java
index 89a004f710..a0a117c661 100644
--- a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java
+++ b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java
@@ -959,7 +959,7 @@ public class HttpFields
{
hasDomain = true;
buf.append(";Domain=");
- QuotedStringTokenizer.quoteIfNeeded(buf,domain.toLowerCase(),delim);
+ QuotedStringTokenizer.quoteIfNeeded(buf,domain.toLowerCase(Locale.ENGLISH),delim);
}
if (maxAge >= 0)
diff --git a/jetty-http/src/test/java/org/eclipse/jetty/http/HttpFieldsTest.java b/jetty-http/src/test/java/org/eclipse/jetty/http/HttpFieldsTest.java
index 3e26687ec4..20cf89c222 100644
--- a/jetty-http/src/test/java/org/eclipse/jetty/http/HttpFieldsTest.java
+++ b/jetty-http/src/test/java/org/eclipse/jetty/http/HttpFieldsTest.java
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertTrue;
import java.util.Enumeration;
import java.util.HashSet;
+import java.util.Locale;
import java.util.Set;
import org.eclipse.jetty.io.Buffer;
@@ -312,8 +313,8 @@ public class HttpFieldsTest
s=enum2set(fields.getFieldNames());
assertEquals(3,s.size());
assertTrue(s.contains("message-id"));
- assertEquals("value",fields.getStringField("message-id").toLowerCase());
- assertEquals("value",fields.getStringField("Message-ID").toLowerCase());
+ assertEquals("value",fields.getStringField("message-id").toLowerCase(Locale.ENGLISH));
+ assertEquals("value",fields.getStringField("Message-ID").toLowerCase(Locale.ENGLISH));
fields.clear();
@@ -323,8 +324,8 @@ public class HttpFieldsTest
s=enum2set(fields.getFieldNames());
assertEquals(3,s.size());
assertTrue(s.contains("message-id"));
- assertEquals("value",fields.getStringField("Message-ID").toLowerCase());
- assertEquals("value",fields.getStringField("message-id").toLowerCase());
+ assertEquals("value",fields.getStringField("Message-ID").toLowerCase(Locale.ENGLISH));
+ assertEquals("value",fields.getStringField("message-id").toLowerCase(Locale.ENGLISH));
fields.clear();
@@ -334,8 +335,8 @@ public class HttpFieldsTest
s=enum2set(fields.getFieldNames());
assertEquals(3,s.size());
assertTrue(s.contains("message-id"));
- assertEquals("value",fields.getStringField("message-id").toLowerCase());
- assertEquals("value",fields.getStringField("Message-ID").toLowerCase());
+ assertEquals("value",fields.getStringField("message-id").toLowerCase(Locale.ENGLISH));
+ assertEquals("value",fields.getStringField("Message-ID").toLowerCase(Locale.ENGLISH));
fields.clear();
@@ -345,8 +346,8 @@ public class HttpFieldsTest
s=enum2set(fields.getFieldNames());
assertEquals(3,s.size());
assertTrue(s.contains("message-id"));
- assertEquals("value",fields.getStringField("Message-ID").toLowerCase());
- assertEquals("value",fields.getStringField("message-id").toLowerCase());
+ assertEquals("value",fields.getStringField("Message-ID").toLowerCase(Locale.ENGLISH));
+ assertEquals("value",fields.getStringField("message-id").toLowerCase(Locale.ENGLISH));
}
@Test
@@ -458,7 +459,7 @@ public class HttpFieldsTest
{
Set<String> s=new HashSet<String>();
while(e.hasMoreElements())
- s.add(e.nextElement().toLowerCase());
+ s.add(e.nextElement().toLowerCase(Locale.ENGLISH));
return s;
}
diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java
index bc6ada8bd9..4c09ccd80f 100644
--- a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java
+++ b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java
@@ -23,6 +23,7 @@ import java.nio.channels.ClosedChannelException;
import java.nio.channels.SelectableChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.SocketChannel;
+import java.util.Locale;
import org.eclipse.jetty.io.AsyncEndPoint;
import org.eclipse.jetty.io.Buffer;
@@ -42,7 +43,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
{
public static final Logger LOG=Log.getLogger("org.eclipse.jetty.io.nio");
- private final boolean WORK_AROUND_JVM_BUG_6346658 = System.getProperty("os.name").toLowerCase().contains("win");
+ private final boolean WORK_AROUND_JVM_BUG_6346658 = System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("win");
private final SelectorManager.SelectSet _selectSet;
private final SelectorManager _manager;
private SelectionKey _key;
diff --git a/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MBeanContainer.java b/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MBeanContainer.java
index 2bde7f9e30..dd97554b3e 100644
--- a/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MBeanContainer.java
+++ b/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MBeanContainer.java
@@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
@@ -251,7 +252,7 @@ public class MBeanContainer extends AbstractLifeCycle implements Container.Liste
//no override mbean object name, so make a generic one
if (oname == null)
{
- String type = obj.getClass().getName().toLowerCase();
+ String type = obj.getClass().getName().toLowerCase(Locale.ENGLISH);
int dot = type.lastIndexOf('.');
if (dot >= 0)
type = type.substring(dot + 1);
diff --git a/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/ObjectMBean.java b/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/ObjectMBean.java
index 0123a4bcb7..b526599e93 100644
--- a/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/ObjectMBean.java
+++ b/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/ObjectMBean.java
@@ -564,7 +564,7 @@ public class ObjectMBean implements DynamicMBean
}
- String uName = name.substring(0, 1).toUpperCase() + name.substring(1);
+ String uName = name.substring(0, 1).toUpperCase(Locale.ENGLISH) + name.substring(1);
Class oClass = onMBean ? this.getClass() : _managed.getClass();
if (LOG.isDebugEnabled())
diff --git a/jetty-plus/src/main/java/org/eclipse/jetty/plus/annotation/Injection.java b/jetty-plus/src/main/java/org/eclipse/jetty/plus/annotation/Injection.java
index 68310ee2b7..79ec710e77 100644
--- a/jetty-plus/src/main/java/org/eclipse/jetty/plus/annotation/Injection.java
+++ b/jetty-plus/src/main/java/org/eclipse/jetty/plus/annotation/Injection.java
@@ -21,6 +21,7 @@ package org.eclipse.jetty.plus.annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
+import java.util.Locale;
import javax.naming.InitialContext;
import javax.naming.NamingException;
@@ -141,7 +142,7 @@ public class Injection
_resourceClass = resourceType;
//first look for a javabeans style setter matching the targetName
- String setter = "set"+target.substring(0,1).toUpperCase()+target.substring(1);
+ String setter = "set"+target.substring(0,1).toUpperCase(Locale.ENGLISH)+target.substring(1);
try
{
LOG.debug("Looking for method for setter: "+setter+" with arg "+_resourceClass);
diff --git a/jetty-plus/src/main/java/org/eclipse/jetty/plus/jaas/spi/LdapLoginModule.java b/jetty-plus/src/main/java/org/eclipse/jetty/plus/jaas/spi/LdapLoginModule.java
index db9e8f9f55..f2a20b0fe2 100644
--- a/jetty-plus/src/main/java/org/eclipse/jetty/plus/jaas/spi/LdapLoginModule.java
+++ b/jetty-plus/src/main/java/org/eclipse/jetty/plus/jaas/spi/LdapLoginModule.java
@@ -22,6 +22,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Properties;
@@ -653,12 +654,12 @@ public class LdapLoginModule extends AbstractLoginModule
public static String convertCredentialJettyToLdap(String encryptedPassword)
{
- if ("MD5:".startsWith(encryptedPassword.toUpperCase()))
+ if ("MD5:".startsWith(encryptedPassword.toUpperCase(Locale.ENGLISH)))
{
return "{MD5}" + encryptedPassword.substring("MD5:".length(), encryptedPassword.length());
}
- if ("CRYPT:".startsWith(encryptedPassword.toUpperCase()))
+ if ("CRYPT:".startsWith(encryptedPassword.toUpperCase(Locale.ENGLISH)))
{
return "{CRYPT}" + encryptedPassword.substring("CRYPT:".length(), encryptedPassword.length());
}
@@ -673,12 +674,12 @@ public class LdapLoginModule extends AbstractLoginModule
return encryptedPassword;
}
- if ("{MD5}".startsWith(encryptedPassword.toUpperCase()))
+ if ("{MD5}".startsWith(encryptedPassword.toUpperCase(Locale.ENGLISH)))
{
return "MD5:" + encryptedPassword.substring("{MD5}".length(), encryptedPassword.length());
}
- if ("{CRYPT}".startsWith(encryptedPassword.toUpperCase()))
+ if ("{CRYPT}".startsWith(encryptedPassword.toUpperCase(Locale.ENGLISH)))
{
return "CRYPT:" + encryptedPassword.substring("{CRYPT}".length(), encryptedPassword.length());
}
diff --git a/jetty-plus/src/main/java/org/eclipse/jetty/plus/security/DataSourceLoginService.java b/jetty-plus/src/main/java/org/eclipse/jetty/plus/security/DataSourceLoginService.java
index a350764ae6..a6673385ae 100644
--- a/jetty-plus/src/main/java/org/eclipse/jetty/plus/security/DataSourceLoginService.java
+++ b/jetty-plus/src/main/java/org/eclipse/jetty/plus/security/DataSourceLoginService.java
@@ -26,6 +26,7 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
import javax.naming.InitialContext;
import javax.naming.NameNotFoundException;
@@ -414,7 +415,7 @@ public class DataSourceLoginService extends MappedLoginService
DatabaseMetaData metaData = connection.getMetaData();
//check if tables exist
- String tableName = (metaData.storesLowerCaseIdentifiers()? _userTableName.toLowerCase(): (metaData.storesUpperCaseIdentifiers()?_userTableName.toUpperCase(): _userTableName));
+ String tableName = (metaData.storesLowerCaseIdentifiers()? _userTableName.toLowerCase(Locale.ENGLISH): (metaData.storesUpperCaseIdentifiers()?_userTableName.toUpperCase(Locale.ENGLISH): _userTableName));
ResultSet result = metaData.getTables(null, null, tableName, null);
if (!result.next())
{
@@ -432,7 +433,7 @@ public class DataSourceLoginService extends MappedLoginService
result.close();
- tableName = (metaData.storesLowerCaseIdentifiers()? _roleTableName.toLowerCase(): (metaData.storesUpperCaseIdentifiers()?_roleTableName.toUpperCase(): _roleTableName));
+ tableName = (metaData.storesLowerCaseIdentifiers()? _roleTableName.toLowerCase(Locale.ENGLISH): (metaData.storesUpperCaseIdentifiers()?_roleTableName.toUpperCase(Locale.ENGLISH): _roleTableName));
result = metaData.getTables(null, null, tableName, null);
if (!result.next())
{
@@ -449,7 +450,7 @@ public class DataSourceLoginService extends MappedLoginService
result.close();
- tableName = (metaData.storesLowerCaseIdentifiers()? _userRoleTableName.toLowerCase(): (metaData.storesUpperCaseIdentifiers()?_userRoleTableName.toUpperCase(): _userRoleTableName));
+ tableName = (metaData.storesLowerCaseIdentifiers()? _userRoleTableName.toLowerCase(Locale.ENGLISH): (metaData.storesUpperCaseIdentifiers()?_userRoleTableName.toUpperCase(Locale.ENGLISH): _userRoleTableName));
result = metaData.getTables(null, null, tableName, null);
if (!result.next())
{
diff --git a/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/ProxyRule.java b/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/ProxyRule.java
index 67600700fe..657eead934 100644
--- a/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/ProxyRule.java
+++ b/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/ProxyRule.java
@@ -24,6 +24,7 @@ import java.io.OutputStream;
import java.net.MalformedURLException;
import java.util.Enumeration;
import java.util.HashSet;
+import java.util.Locale;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -229,7 +230,7 @@ public class ProxyRule extends PatternRule
@Override
protected void onResponseHeader(Buffer name, Buffer value) throws IOException
{
- String s = name.toString().toLowerCase();
+ String s = name.toString().toLowerCase(Locale.ENGLISH);
if (!_DontProxyHeaders.contains(s) || (HttpHeaders.CONNECTION_BUFFER.equals(name) && HttpHeaderValues.CLOSE_BUFFER.equals(value)))
{
if (debug != 0)
@@ -348,7 +349,7 @@ public class ProxyRule extends PatternRule
String connectionHdr = request.getHeader("Connection");
if (connectionHdr != null)
{
- connectionHdr = connectionHdr.toLowerCase();
+ connectionHdr = connectionHdr.toLowerCase(Locale.ENGLISH);
if (connectionHdr.indexOf("keep-alive") < 0 && connectionHdr.indexOf("close") < 0)
{
connectionHdr = null;
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/FormAuthenticator.java b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/FormAuthenticator.java
index 829a9d595b..26a080dbdb 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/FormAuthenticator.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/FormAuthenticator.java
@@ -21,6 +21,7 @@ package org.eclipse.jetty.security.authentication;
import java.io.IOException;
import java.util.Collections;
import java.util.Enumeration;
+import java.util.Locale;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
@@ -390,7 +391,7 @@ public class FormAuthenticator extends LoginAuthenticator
@Override
public long getDateHeader(String name)
{
- if (name.toLowerCase().startsWith("if-"))
+ if (name.toLowerCase(Locale.ENGLISH).startsWith("if-"))
return -1;
return super.getDateHeader(name);
}
@@ -398,7 +399,7 @@ public class FormAuthenticator extends LoginAuthenticator
@Override
public String getHeader(String name)
{
- if (name.toLowerCase().startsWith("if-"))
+ if (name.toLowerCase(Locale.ENGLISH).startsWith("if-"))
return null;
return super.getHeader(name);
}
@@ -412,7 +413,7 @@ public class FormAuthenticator extends LoginAuthenticator
@Override
public Enumeration getHeaders(String name)
{
- if (name.toLowerCase().startsWith("if-"))
+ if (name.toLowerCase(Locale.ENGLISH).startsWith("if-"))
return Collections.enumeration(Collections.EMPTY_LIST);
return super.getHeaders(name);
}
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/CookieCutter.java b/jetty-server/src/main/java/org/eclipse/jetty/server/CookieCutter.java
index eb3e39aa37..65c9351740 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/CookieCutter.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/CookieCutter.java
@@ -17,6 +17,8 @@
//
package org.eclipse.jetty.server;
+import java.util.Locale;
+
import javax.servlet.http.Cookie;
import org.eclipse.jetty.util.LazyList;
@@ -286,7 +288,7 @@ public class CookieCutter
{
if (name.startsWith("$"))
{
- String lowercaseName = name.toLowerCase();
+ String lowercaseName = name.toLowerCase(Locale.ENGLISH);
if ("$path".equals(lowercaseName))
{
if (cookie!=null)
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java
index 5ffb6dd9da..ecc84b22de 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java
@@ -34,6 +34,7 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;
@@ -124,7 +125,7 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
public DatabaseAdaptor (DatabaseMetaData dbMeta)
throws SQLException
{
- _dbName = dbMeta.getDatabaseProductName().toLowerCase();
+ _dbName = dbMeta.getDatabaseProductName().toLowerCase(Locale.ENGLISH);
LOG.debug ("Using database {}",_dbName);
_isLower = dbMeta.storesLowerCaseIdentifiers();
_isUpper = dbMeta.storesUpperCaseIdentifiers();
@@ -140,9 +141,9 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
public String convertIdentifier (String identifier)
{
if (_isLower)
- return identifier.toLowerCase();
+ return identifier.toLowerCase(Locale.ENGLISH);
if (_isUpper)
- return identifier.toUpperCase();
+ return identifier.toUpperCase(Locale.ENGLISH);
return identifier;
}
diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/SelectChannelTimeoutTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/SelectChannelTimeoutTest.java
index d61eb1920c..e44b9cdaf3 100644
--- a/jetty-server/src/test/java/org/eclipse/jetty/server/SelectChannelTimeoutTest.java
+++ b/jetty-server/src/test/java/org/eclipse/jetty/server/SelectChannelTimeoutTest.java
@@ -24,6 +24,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.Socket;
+import java.util.Locale;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.server.session.SessionHandler;
@@ -54,7 +55,7 @@ public class SelectChannelTimeoutTest extends ConnectorTimeoutTest
_handler.setSuspendFor(100);
_handler.setResumeAfter(25);
- assertTrue(process(null).toUpperCase().contains("RESUMED"));
+ assertTrue(process(null).toUpperCase(Locale.ENGLISH).contains("RESUMED"));
}
@Test
@@ -68,7 +69,7 @@ public class SelectChannelTimeoutTest extends ConnectorTimeoutTest
_server.start();
_handler.setSuspendFor(50);
- assertTrue(process(null).toUpperCase().contains("TIMEOUT"));
+ assertTrue(process(null).toUpperCase(Locale.ENGLISH).contains("TIMEOUT"));
}
@Test
@@ -83,7 +84,7 @@ public class SelectChannelTimeoutTest extends ConnectorTimeoutTest
_handler.setSuspendFor(100);
_handler.setCompleteAfter(25);
- assertTrue(process(null).toUpperCase().contains("COMPLETED"));
+ assertTrue(process(null).toUpperCase(Locale.ENGLISH).contains("COMPLETED"));
}
private synchronized String process(String content) throws UnsupportedEncodingException, IOException, InterruptedException
diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/AbstractConnectHandlerTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/AbstractConnectHandlerTest.java
index 1711fccce5..a597e7b801 100644
--- a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/AbstractConnectHandlerTest.java
+++ b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/AbstractConnectHandlerTest.java
@@ -24,6 +24,7 @@ import java.io.IOException;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.util.LinkedHashMap;
+import java.util.Locale;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -104,7 +105,7 @@ public abstract class AbstractConnectHandlerTest
assertTrue(header.lookingAt());
String headerName = header.group(1);
String headerValue = header.group(2);
- headers.put(headerName.toLowerCase(), headerValue.toLowerCase());
+ headers.put(headerName.toLowerCase(Locale.ENGLISH), headerValue.toLowerCase(Locale.ENGLISH));
}
StringBuilder body;
diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java
index dd9750300b..3bcf058d85 100644
--- a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java
+++ b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/IPAccessHandlerTest.java
@@ -30,6 +30,7 @@ import java.net.Socket;
import java.util.Arrays;
import java.util.Collection;
import java.util.LinkedHashMap;
+import java.util.Locale;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -152,7 +153,7 @@ public class IPAccessHandlerTest
assertTrue(header.lookingAt());
String headerName = header.group(1);
String headerValue = header.group(2);
- headers.put(headerName.toLowerCase(), headerValue.toLowerCase());
+ headers.put(headerName.toLowerCase(Locale.ENGLISH), headerValue.toLowerCase(Locale.ENGLISH));
}
StringBuilder body = new StringBuilder();
diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Invoker.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Invoker.java
index 999ebf3286..98ddb5fc22 100644
--- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Invoker.java
+++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Invoker.java
@@ -21,6 +21,7 @@ package org.eclipse.jetty.servlet;
import java.io.IOException;
import java.util.Enumeration;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
import javax.servlet.ServletContext;
@@ -91,7 +92,7 @@ public class Invoker extends HttpServlet
{
String param=(String)e.nextElement();
String value=getInitParameter(param);
- String lvalue=value.toLowerCase();
+ String lvalue=value.toLowerCase(Locale.ENGLISH);
if ("nonContextServlets".equals(param))
{
_nonContextServlets=value.length()>0 && lvalue.startsWith("t");
diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/CGI.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/CGI.java
index 7db012ab32..4c625088b7 100644
--- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/CGI.java
+++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/CGI.java
@@ -24,6 +24,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.util.Enumeration;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
import javax.servlet.ServletException;
@@ -139,7 +140,7 @@ public class CGI extends HttpServlet
if (!_env.envMap.containsKey("SystemRoot"))
{
String os = System.getProperty("os.name");
- if (os != null && os.toLowerCase().indexOf("windows") != -1)
+ if (os != null && os.toLowerCase(Locale.ENGLISH).indexOf("windows") != -1)
{
_env.set("SystemRoot","C:\\WINDOWS");
}
@@ -256,7 +257,7 @@ public class CGI extends HttpServlet
{
String name = (String)enm.nextElement();
String value = req.getHeader(name);
- env.set("HTTP_" + name.toUpperCase().replace('-','_'),value);
+ env.set("HTTP_" + name.toUpperCase(Locale.ENGLISH).replace('-','_'),value);
}
// these extra ones were from printenv on www.dev.nomura.co.uk
diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java
index 78d47cf2e8..27c930b204 100644
--- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java
+++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java
@@ -20,6 +20,7 @@ package org.eclipse.jetty.servlets;
import java.io.IOException;
import java.util.HashSet;
+import java.util.Locale;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.regex.Pattern;
@@ -278,7 +279,7 @@ public class GzipFilter extends UserAgentFilter
{
for (int i=0; i< encodings.length; i++)
{
- if (encodings[i].toLowerCase().contains(GZIP))
+ if (encodings[i].toLowerCase(Locale.ENGLISH).contains(GZIP))
{
if (isEncodingAcceptable(encodings[i]))
{
@@ -287,7 +288,7 @@ public class GzipFilter extends UserAgentFilter
}
}
- if (encodings[i].toLowerCase().contains(DEFLATE))
+ if (encodings[i].toLowerCase(Locale.ENGLISH).contains(DEFLATE))
{
if (isEncodingAcceptable(encodings[i]))
{
diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/MultiPartFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/MultiPartFilter.java
index 2584b2f9f5..bceb6b5efd 100644
--- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/MultiPartFilter.java
+++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/MultiPartFilter.java
@@ -36,6 +36,7 @@ import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import javax.servlet.Filter;
@@ -172,7 +173,7 @@ public class MultiPartFilter implements Filter
int c=line.indexOf(':',0);
if(c>0)
{
- String key=line.substring(0,c).trim().toLowerCase();
+ String key=line.substring(0,c).trim().toLowerCase(Locale.ENGLISH);
String value=line.substring(c+1,line.length()).trim();
if(key.equals("content-disposition"))
content_disposition=value;
diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java
index b908c5324f..53eada5e20 100644
--- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java
+++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java
@@ -30,6 +30,7 @@ import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.StringTokenizer;
@@ -489,7 +490,7 @@ public class ProxyServlet implements Servlet
protected void onResponseHeader(Buffer name, Buffer value) throws IOException
{
String nameString = name.toString();
- String s = nameString.toLowerCase();
+ String s = nameString.toLowerCase(Locale.ENGLISH);
if (!_DontProxyHeaders.contains(s) || (HttpHeaders.CONNECTION_BUFFER.equals(name) && HttpHeaderValues.CLOSE_BUFFER.equals(value)))
{
if (debug != 0)
diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/PutFilterTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/PutFilterTest.java
index 731a9794d2..300430791f 100644
--- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/PutFilterTest.java
+++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/PutFilterTest.java
@@ -28,6 +28,7 @@ import java.net.Socket;
import java.net.URL;
import java.util.Arrays;
import java.util.HashSet;
+import java.util.Locale;
import java.util.Set;
import javax.servlet.http.HttpServletResponse;
@@ -61,7 +62,7 @@ public class PutFilterTest
FilterHolder holder = tester.addFilter(PutFilter.class,"/*",0);
holder.setInitParameter("delAllowed","true");
// Bloody Windows does not allow file renaming
- if (!System.getProperty("os.name").toLowerCase().contains("windows"))
+ if (!System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("windows"))
holder.setInitParameter("putAtomic","true");
tester.start();
}
diff --git a/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Headers.java b/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Headers.java
index 25d3047efe..f5d434e133 100644
--- a/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Headers.java
+++ b/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Headers.java
@@ -23,6 +23,7 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
+import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -93,7 +94,7 @@ public class Headers implements Iterable<Headers.Header>
*/
public Header get(String name)
{
- return headers.get(name.trim().toLowerCase());
+ return headers.get(name.trim().toLowerCase(Locale.ENGLISH));
}
/**
@@ -106,7 +107,7 @@ public class Headers implements Iterable<Headers.Header>
{
name = name.trim();
Header header = new Header(name, value.trim());
- headers.put(name.toLowerCase(), header);
+ headers.put(name.toLowerCase(Locale.ENGLISH), header);
}
/**
@@ -117,7 +118,7 @@ public class Headers implements Iterable<Headers.Header>
public void put(Header header)
{
if (header != null)
- headers.put(header.name().toLowerCase(), header);
+ headers.put(header.name().toLowerCase(Locale.ENGLISH), header);
}
/**
@@ -130,16 +131,16 @@ public class Headers implements Iterable<Headers.Header>
public void add(String name, String value)
{
name = name.trim();
- Header header = headers.get(name.toLowerCase());
+ Header header = headers.get(name.toLowerCase(Locale.ENGLISH));
if (header == null)
{
header = new Header(name, value.trim());
- headers.put(name.toLowerCase(), header);
+ headers.put(name.toLowerCase(Locale.ENGLISH), header);
}
else
{
header = new Header(header.name(), header.value() + "," + value.trim());
- headers.put(name.toLowerCase(), header);
+ headers.put(name.toLowerCase(Locale.ENGLISH), header);
}
}
@@ -152,7 +153,7 @@ public class Headers implements Iterable<Headers.Header>
public Header remove(String name)
{
name = name.trim();
- return headers.remove(name.toLowerCase());
+ return headers.remove(name.toLowerCase(Locale.ENGLISH));
}
/**
@@ -229,7 +230,7 @@ public class Headers implements Iterable<Headers.Header>
@Override
public int hashCode()
{
- int result = name.toLowerCase().hashCode();
+ int result = name.toLowerCase(Locale.ENGLISH).hashCode();
result = 31 * result + Arrays.hashCode(values);
return result;
}
diff --git a/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/HeadersBlockGenerator.java b/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/HeadersBlockGenerator.java
index 3f78d1a928..c273ba3505 100644
--- a/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/HeadersBlockGenerator.java
+++ b/jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/HeadersBlockGenerator.java
@@ -21,6 +21,7 @@ package org.eclipse.jetty.spdy.generator;
import java.io.ByteArrayOutputStream;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
+import java.util.Locale;
import org.eclipse.jetty.spdy.CompressionDictionary;
import org.eclipse.jetty.spdy.CompressionFactory;
@@ -45,7 +46,7 @@ public class HeadersBlockGenerator
writeCount(version, buffer, headers.size());
for (Headers.Header header : headers)
{
- String name = header.name().toLowerCase();
+ String name = header.name().toLowerCase(Locale.ENGLISH);
byte[] nameBytes = name.getBytes(iso1);
writeNameLength(version, buffer, nameBytes.length);
buffer.write(nameBytes, 0, nameBytes.length);
diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategy.java b/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategy.java
index a193854841..5fc6085310 100644
--- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategy.java
+++ b/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategy.java
@@ -23,6 +23,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
+import java.util.Locale;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@@ -205,7 +206,7 @@ public class ReferrerPushStrategy implements PushStrategy
if (header == null)
return true;
- String contentType = header.value().toLowerCase();
+ String contentType = header.value().toLowerCase(Locale.ENGLISH);
for (String pushContentType : pushContentTypes)
if (contentType.startsWith(pushContentType))
return true;
diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYAsyncConnection.java b/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYAsyncConnection.java
index 01a82ca559..9eb4f2b8a9 100644
--- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYAsyncConnection.java
+++ b/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYAsyncConnection.java
@@ -24,6 +24,7 @@ import java.io.IOException;
import java.io.InterruptedIOException;
import java.nio.ByteBuffer;
import java.util.LinkedList;
+import java.util.Locale;
import java.util.Queue;
import java.util.Set;
import java.util.concurrent.BlockingQueue;
@@ -664,7 +665,7 @@ public class ServerHTTPSPDYAsyncConnection extends AbstractHttpConnection implem
for (int i = 0; i < fields.size(); ++i)
{
HttpFields.Field field = fields.getField(i);
- String name = field.getName().toLowerCase();
+ String name = field.getName().toLowerCase(Locale.ENGLISH);
String value = field.getValue();
headers.put(name, value);
logger.debug("HTTP < {}: {}", name, value);
diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPSPDYAsyncConnection.java b/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPSPDYAsyncConnection.java
index f9e1e0ff13..4274ac64e3 100644
--- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPSPDYAsyncConnection.java
+++ b/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/proxy/ProxyHTTPSPDYAsyncConnection.java
@@ -21,6 +21,7 @@ package org.eclipse.jetty.spdy.proxy;
import java.io.IOException;
import java.nio.ByteBuffer;
+import java.util.Locale;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -95,7 +96,7 @@ public class ProxyHTTPSPDYAsyncConnection extends AsyncHttpConnection
@Override
protected void parsedHeader(Buffer name, Buffer value) throws IOException
{
- String headerName = name.toString("UTF-8").toLowerCase();
+ String headerName = name.toString("UTF-8").toLowerCase(Locale.ENGLISH);
String headerValue = value.toString("UTF-8");
switch (headerName)
{
diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Config.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Config.java
index 0235a760cf..f6249ccaf6 100644
--- a/jetty-start/src/main/java/org/eclipse/jetty/start/Config.java
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Config.java
@@ -38,6 +38,7 @@ import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
@@ -269,7 +270,7 @@ public class Config
}
else
{
- String name = entry.getName().toLowerCase();
+ String name = entry.getName().toLowerCase(Locale.ENGLISH);
if (name.endsWith(".jar") || name.endsWith(".zip"))
{
String jar = entry.getCanonicalPath();
@@ -796,7 +797,7 @@ public class Config
}
// Add XML configuration
- if (subject.toLowerCase().endsWith(".xml"))
+ if (subject.toLowerCase(Locale.ENGLISH).endsWith(".xml"))
{
// Config file
File f = new File(fixPath(file));
@@ -807,7 +808,7 @@ public class Config
}
// Set the main class to execute (overrides any previously set)
- if (subject.toLowerCase().endsWith(".class"))
+ if (subject.toLowerCase(Locale.ENGLISH).endsWith(".class"))
{
// Class
String cn = expand(subject.substring(0,subject.length() - 6));
@@ -820,7 +821,7 @@ public class Config
}
// Add raw classpath entry
- if (subject.toLowerCase().endsWith(".path"))
+ if (subject.toLowerCase(Locale.ENGLISH).endsWith(".path"))
{
// classpath (jetty.class.path?) to add to runtime classpath
String cn = expand(subject.substring(0,subject.length() - 5));
diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
index 9726742630..dabd5385f6 100644
--- a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
@@ -46,6 +46,7 @@ import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
+import java.util.Locale;
import java.util.Properties;
import java.util.Set;
@@ -154,7 +155,7 @@ public class Main
{
public boolean accept(File dir, String name)
{
- return name.toLowerCase().endsWith(".ini");
+ return name.toLowerCase(Locale.ENGLISH).endsWith(".ini");
}
});
Arrays.sort(inis);
@@ -385,7 +386,7 @@ public class Main
return false;
}
- String name = path.getName().toLowerCase();
+ String name = path.getName(Locale.ENGLISH).toLowerCase();
return (name.startsWith("jetty") && name.endsWith(".xml"));
}
});
@@ -659,7 +660,7 @@ public class Main
private String resolveXmlConfig(String xmlFilename) throws FileNotFoundException
{
- if (!xmlFilename.toLowerCase().endsWith(".xml"))
+ if (!xmlFilename.toLowerCase(Locale.ENGLISH).endsWith(".xml"))
{
// Nothing to resolve.
return xmlFilename;
@@ -873,7 +874,7 @@ public class Main
if (element.isFile())
{
- String name = element.getName().toLowerCase();
+ String name = element.getName().toLowerCase(Locale.ENGLISH);
if (name.endsWith(".jar"))
{
return JarVersion.getVersion(element);
diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java
index a4d7ee7a13..fffada8bd3 100644
--- a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java
+++ b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java
@@ -27,6 +27,7 @@ import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
+import java.util.Locale;
import java.util.TimeZone;
import java.util.Timer;
import java.util.TimerTask;
@@ -221,7 +222,7 @@ public class RolloverFileOutputStream extends FilterOutputStream
// Is this a rollover file?
String filename=file.getName();
- int i=filename.toLowerCase().indexOf(YYYY_MM_DD);
+ int i=filename.toLowerCase(Locale.ENGLISH).indexOf(YYYY_MM_DD);
if (i>=0)
{
file=new File(dir,
@@ -258,7 +259,7 @@ public class RolloverFileOutputStream extends FilterOutputStream
File file= new File(_filename);
File dir = new File(file.getParent());
String fn=file.getName();
- int s=fn.toLowerCase().indexOf(YYYY_MM_DD);
+ int s=fn.toLowerCase(Locale.ENGLISH).indexOf(YYYY_MM_DD);
if (s<0)
return;
String prefix=fn.substring(0,s);
diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONObjectConvertor.java b/jetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONObjectConvertor.java
index 70e73e9778..f2e823deab 100755
--- a/jetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONObjectConvertor.java
+++ b/jetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONObjectConvertor.java
@@ -22,6 +22,7 @@ import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Arrays;
import java.util.HashSet;
+import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -89,9 +90,9 @@ public class JSONObjectConvertor implements JSON.Convertor
{
String name=m.getName();
if (name.startsWith("is"))
- name=name.substring(2,3).toLowerCase()+name.substring(3);
+ name=name.substring(2,3).toLowerCase(Locale.ENGLISH)+name.substring(3);
else if (name.startsWith("get"))
- name=name.substring(3,4).toLowerCase()+name.substring(4);
+ name=name.substring(3,4).toLowerCase(Locale.ENGLISH)+name.substring(4);
else
continue;
diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONPojoConvertor.java b/jetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONPojoConvertor.java
index d49d4cfe8e..ca2f5e93be 100644
--- a/jetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONPojoConvertor.java
+++ b/jetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONPojoConvertor.java
@@ -26,6 +26,7 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -122,9 +123,9 @@ public class JSONPojoConvertor implements JSON.Convertor
if(m.getReturnType()!=null)
{
if (name.startsWith("is") && name.length()>2)
- name=name.substring(2,3).toLowerCase()+name.substring(3);
+ name=name.substring(2,3).toLowerCase(Locale.ENGLISH)+name.substring(3);
else if (name.startsWith("get") && name.length()>3)
- name=name.substring(3,4).toLowerCase()+name.substring(4);
+ name=name.substring(3,4).toLowerCase(Locale.ENGLISH)+name.substring(4);
else
break;
if(includeField(name, m))
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JarScanner.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JarScanner.java
index 4528e16292..0dfa1eefb9 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JarScanner.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JarScanner.java
@@ -23,6 +23,7 @@ import java.io.InputStream;
import java.net.URI;
import java.net.URL;
import java.net.URLClassLoader;
+import java.util.Locale;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;
import java.util.regex.Pattern;
@@ -144,7 +145,7 @@ public abstract class JarScanner extends org.eclipse.jetty.util.PatternMatcher
throws Exception
{
LOG.debug("Search of {}",uri);
- if (uri.toString().toLowerCase().endsWith(".jar"))
+ if (uri.toString().toLowerCase(Locale.ENGLISH).endsWith(".jar"))
{
InputStream in = Resource.newResource(uri).getInputStream();
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java
index 4b9be461ce..2190c30050 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java
@@ -22,6 +22,7 @@ package org.eclipse.jetty.webapp;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
import java.util.jar.JarEntry;
import org.eclipse.jetty.util.log.Log;
@@ -125,7 +126,7 @@ public class MetaInfConfiguration extends AbstractConfiguration
}
else
{
- String lcname = name.toLowerCase();
+ String lcname = name.toLowerCase(Locale.ENGLISH);
if (lcname.endsWith(".tld"))
{
addResource(context,METAINF_TLDS,Resource.newResource("jar:"+jarUri+"!/"+name));
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java
index af737d78ab..cc308ed30f 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java
@@ -27,6 +27,7 @@ import java.util.EnumSet;
import java.util.EventListener;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import javax.servlet.ServletException;
@@ -320,7 +321,7 @@ public class StandardDescriptorProcessor extends IterativeDescriptorProcessor
XmlParser.Node startup = node.get("load-on-startup");
if (startup != null)
{
- String s = startup.toString(false, true).toLowerCase();
+ String s = startup.toString(false, true).toLowerCase(Locale.ENGLISH);
int order = 0;
if (s.startsWith("t"))
{
@@ -916,7 +917,7 @@ public class StandardDescriptorProcessor extends IterativeDescriptorProcessor
if (data != null)
{
data = data.get("transport-guarantee");
- String guarantee = data.toString(false, true).toUpperCase();
+ String guarantee = data.toString(false, true).toUpperCase(Locale.ENGLISH);
if (guarantee == null || guarantee.length() == 0 || "NONE".equals(guarantee))
scBase.setDataConstraint(Constraint.DC_NONE);
else if ("INTEGRAL".equals(guarantee))
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java
index 580f363f81..da47a9ab62 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java
@@ -28,6 +28,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -217,7 +218,7 @@ public class TagLibConfiguration extends AbstractConfiguration
while(iter.hasNext())
{
String location = iter.next();
- if (location!=null && location.toLowerCase().endsWith(".tld"))
+ if (location!=null && location.toLowerCase(Locale.ENGLISH).endsWith(".tld"))
{
if (!location.startsWith("/"))
location="/WEB-INF/"+location;
@@ -234,7 +235,7 @@ public class TagLibConfiguration extends AbstractConfiguration
String[] contents = web_inf.list();
for (int i=0;contents!=null && i<contents.length;i++)
{
- if (contents[i]!=null && contents[i].toLowerCase().endsWith(".tld"))
+ if (contents[i]!=null && contents[i].toLowerCase(Locale.ENGLISH).endsWith(".tld"))
{
Resource l=web_inf.addPath(contents[i]);
tlds.add(l);
@@ -249,7 +250,7 @@ public class TagLibConfiguration extends AbstractConfiguration
String[] contents = web_inf_tlds.list();
for (int i=0;contents!=null && i<contents.length;i++)
{
- if (contents[i]!=null && contents[i].toLowerCase().endsWith(".tld"))
+ if (contents[i]!=null && contents[i].toLowerCase(Locale.ENGLISH).endsWith(".tld"))
{
Resource l=web_inf_tlds.addPath(contents[i]);
tlds.add(l);
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java
index c78446ae70..a1f85963c5 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java
@@ -29,6 +29,7 @@ import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.List;
+import java.util.Locale;
import java.util.Set;
import java.util.StringTokenizer;
@@ -271,7 +272,7 @@ public class WebAppClassLoader extends URLClassLoader
try
{
Resource fn=lib.addPath(files[f]);
- String fnlc=fn.getName().toLowerCase();
+ String fnlc=fn.getName().toLowerCase(Locale.ENGLISH);
// don't check if this is a directory, see Bug 353165
if (isFileSupported(fnlc))
{
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java
index 0a30543d16..0d8865c3c4 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java
@@ -26,6 +26,7 @@ import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
import java.util.regex.Pattern;
import org.eclipse.jetty.server.Connector;
@@ -442,7 +443,7 @@ public class WebInfConfiguration extends AbstractConfiguration
{
// look for a sibling like "foo/" to a "foo.war"
File warfile=Resource.newResource(war).getFile();
- if (warfile!=null && warfile.getName().toLowerCase().endsWith(".war"))
+ if (warfile!=null && warfile.getName().toLowerCase(Locale.ENGLISH).endsWith(".war"))
{
File sibling = new File(warfile.getParent(),warfile.getName().substring(0,warfile.getName().length()-4));
if (sibling.exists() && sibling.isDirectory() && sibling.canWrite())
@@ -709,7 +710,7 @@ public class WebInfConfiguration extends AbstractConfiguration
try
{
Resource file = web_inf_lib.addPath(files[f]);
- String fnlc = file.getName().toLowerCase();
+ String fnlc = file.getName().toLowerCase(Locale.ENGLISH);
int dot = fnlc.lastIndexOf('.');
String extension = (dot < 0 ? null : fnlc.substring(dot));
if (extension != null && (extension.equals(".jar") || extension.equals(".zip")))
diff --git a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java
index 79ea21b8a6..66aa4ced6e 100644
--- a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java
+++ b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java
@@ -39,6 +39,7 @@ import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.Queue;
@@ -424,7 +425,7 @@ public class XmlConfiguration
private void set(Object obj, XmlParser.Node node) throws Exception
{
String attr = node.getAttribute("name");
- String name = "set" + attr.substring(0,1).toUpperCase() + attr.substring(1);
+ String name = "set" + attr.substring(0,1).toUpperCase(Locale.ENGLISH) + attr.substring(1);
Object value = value(obj,node);
Object[] arg =
{ value };
@@ -663,7 +664,7 @@ public class XmlConfiguration
try
{
// try calling a getXxx method.
- Method method = oClass.getMethod("get" + name.substring(0,1).toUpperCase() + name.substring(1),(java.lang.Class[])null);
+ Method method = oClass.getMethod("get" + name.substring(0,1).toUpperCase(Locale.ENGLISH) + name.substring(1),(java.lang.Class[])null);
obj = method.invoke(obj,(java.lang.Object[])null);
configure(obj,node,0);
}
@@ -1232,7 +1233,7 @@ public class XmlConfiguration
Object[] obj = new Object[args.length];
for (int i = 0; i < args.length; i++)
{
- if (args[i].toLowerCase().endsWith(".properties"))
+ if (args[i].toLowerCase(Locale.ENGLISH).endsWith(".properties"))
{
properties.load(Resource.newResource(args[i]).getInputStream());
}
diff --git a/test-jetty-webapp/src/main/java/com/acme/Dump.java b/test-jetty-webapp/src/main/java/com/acme/Dump.java
index 85b34911c8..c6ffe0ef7f 100644
--- a/test-jetty-webapp/src/main/java/com/acme/Dump.java
+++ b/test-jetty-webapp/src/main/java/com/acme/Dump.java
@@ -127,7 +127,7 @@ public class Dump extends HttpServlet
final boolean flush= request.getParameter("flush")!=null?Boolean.parseBoolean(request.getParameter("flush")):false;
- if(request.getPathInfo()!=null && request.getPathInfo().toLowerCase().indexOf("script")!=-1)
+ if(request.getPathInfo()!=null && request.getPathInfo().toLowerCase(Locale.ENGLISH).indexOf("script")!=-1)
{
response.sendRedirect(response.encodeRedirectURL(getServletContext().getContextPath() + "/dump/info"));
return;

Back to the top