Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimone Bordet2016-02-09 12:12:04 -0500
committerSimone Bordet2016-02-09 12:12:04 -0500
commit6306f06e2f877b165452b32a719331ad52d682e2 (patch)
treeaad4378caeb6364fce868cbb95414c9e9a382143 /jetty-quickstart
parent1ed327ecceb9ab343b790efe14d23a5efdebaebf (diff)
parent145e4bee7139125408acc7388bf58531e96ae3d7 (diff)
downloadorg.eclipse.jetty.project-6306f06e2f877b165452b32a719331ad52d682e2.tar.gz
org.eclipse.jetty.project-6306f06e2f877b165452b32a719331ad52d682e2.tar.xz
org.eclipse.jetty.project-6306f06e2f877b165452b32a719331ad52d682e2.zip
Merged branch 'jetty-9.2.x' into 'jetty-9.3.x'.
Diffstat (limited to 'jetty-quickstart')
-rw-r--r--jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/PreconfigureQuickStartWar.java4
-rw-r--r--jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/QuickStartWebApp.java21
2 files changed, 9 insertions, 16 deletions
diff --git a/jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/PreconfigureQuickStartWar.java b/jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/PreconfigureQuickStartWar.java
index 2884ba90e7..d231ac88e0 100644
--- a/jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/PreconfigureQuickStartWar.java
+++ b/jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/PreconfigureQuickStartWar.java
@@ -18,6 +18,8 @@
package org.eclipse.jetty.quickstart;
+import java.util.Locale;
+
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
@@ -101,7 +103,7 @@ public class PreconfigureQuickStartWar
if (xml != null)
{
- if (xml.isDirectory() || !xml.toString().toLowerCase().endsWith(".xml"))
+ if (xml.isDirectory() || !xml.toString().toLowerCase(Locale.ENGLISH).endsWith(".xml"))
error("Bad context.xml: "+xml);
XmlConfiguration xmlConfiguration = new XmlConfiguration(xml.getURL());
xmlConfiguration.configure(webapp);
diff --git a/jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/QuickStartWebApp.java b/jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/QuickStartWebApp.java
index e0ecb69f5c..5116620109 100644
--- a/jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/QuickStartWebApp.java
+++ b/jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/QuickStartWebApp.java
@@ -19,6 +19,7 @@
package org.eclipse.jetty.quickstart;
import java.io.FileOutputStream;
+import java.util.Locale;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
@@ -28,14 +29,11 @@ import org.eclipse.jetty.webapp.WebAppContext;
/**
* QuickStartWar
- *
*/
public class QuickStartWebApp extends WebAppContext
{
private static final Logger LOG = Log.getLogger(QuickStartWebApp.class);
-
-
public static final String[] __configurationClasses = new String[]
{
org.eclipse.jetty.quickstart.QuickStartConfiguration.class.getCanonicalName(),
@@ -44,13 +42,11 @@ public class QuickStartWebApp extends WebAppContext
org.eclipse.jetty.webapp.JettyWebXmlConfiguration.class.getCanonicalName()
};
-
private boolean _preconfigure=false;
private boolean _autoPreconfigure=false;
private boolean _startWebapp=false;
private PreconfigureDescriptorProcessor _preconfigProcessor;
-
public static final String[] __preconfigurationClasses = new String[]
{
org.eclipse.jetty.webapp.WebInfConfiguration.class.getCanonicalName(),
@@ -74,8 +70,8 @@ public class QuickStartWebApp extends WebAppContext
return _preconfigure;
}
- /* ------------------------------------------------------------ */
- /** Preconfigure webapp
+ /**
+ * Preconfigure webapp
* @param preconfigure If true, then starting the webapp will generate
* the WEB-INF/quickstart-web.xml rather than start the webapp.
*/
@@ -104,8 +100,6 @@ public class QuickStartWebApp extends WebAppContext
super.startWebapp();
}
-
-
@Override
protected void stopWebapp() throws Exception
{
@@ -114,7 +108,7 @@ public class QuickStartWebApp extends WebAppContext
super.stopWebapp();
}
-
+
@Override
protected void doStart() throws Exception
{
@@ -128,7 +122,7 @@ public class QuickStartWebApp extends WebAppContext
if (base.isDirectory())
dir=base;
- else if (base.toString().toLowerCase().endsWith(".war"))
+ else if (base.toString().toLowerCase(Locale.ENGLISH).endsWith(".war"))
{
war=base;
String w=war.toString();
@@ -176,7 +170,6 @@ public class QuickStartWebApp extends WebAppContext
super.doStart();
}
-
public void generateQuickstartWebXml(String extraXML) throws Exception
{
Resource descriptor = getWebInf().addPath(QuickStartDescriptorGenerator.DEFAULT_QUICKSTART_DESCRIPTOR_NAME);
@@ -187,7 +180,5 @@ public class QuickStartWebApp extends WebAppContext
{
generator.generateQuickStartWebXml(fos);
}
- }
-
-
+ }
}

Back to the top