Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jetty-deploy/src')
-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
4 files changed, 12 insertions, 8 deletions
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");
}
}

Back to the top