import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.Locale;
import java.util.Map;
import javax.servlet.MultipartConfigElement;
String fileName = null;
String cd = getHeader("Content-Disposition");
if (cd != null) {
- String cdl = cd.toLowerCase();
+ String cdl = cd.toLowerCase(Locale.ENGLISH);
if (cdl.startsWith("form-data") || cdl.startsWith("attachment")) {
ParameterParser paramParser = new ParameterParser();
paramParser.setLowerCaseNames(true);
*/
package org.apache.catalina.core;
+import java.util.Locale;
+
import org.apache.catalina.Container;
import org.apache.catalina.Engine;
import org.apache.catalina.Host;
if (host == null) {
this.defaultHost = null;
} else {
- this.defaultHost = host.toLowerCase();
+ this.defaultHost = host.toLowerCase(Locale.ENGLISH);
}
support.firePropertyChange("defaultHost", oldDefaultHost,
this.defaultHost);
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.WeakHashMap;
throw new IllegalArgumentException
(sm.getString("standardHost.nullName"));
- name = name.toLowerCase(); // Internally all names are lower case
+ name = name.toLowerCase(Locale.ENGLISH); // Internally all names are lower case
String oldName = this.name;
this.name = name;
*/
public void addAlias(String alias) {
- alias = alias.toLowerCase();
+ alias = alias.toLowerCase(Locale.ENGLISH);
synchronized (aliasesLock) {
// Skip duplicate aliases
*/
public void removeAlias(String alias) {
- alias = alias.toLowerCase();
+ alias = alias.toLowerCase(Locale.ENGLISH);
synchronized (aliasesLock) {
import org.apache.catalina.util.RequestUtil;
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.Locale;
import javax.servlet.DispatcherType;
* representing the state of when filters should be applied.
*/
public void setDispatcher(String dispatcherString) {
- String dispatcher = dispatcherString.toUpperCase();
+ String dispatcher = dispatcherString.toUpperCase(Locale.ENGLISH);
if (dispatcher.equals(DispatcherType.FORWARD.name())) {
// apply FORWARD to the global dispatcherMapping.
import java.util.Date;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.TreeMap;
}
filename =
extractFilename(warPart.getHeader("Content-Disposition"));
- if (!filename.toLowerCase().endsWith(".war")) {
+ if (!filename.toLowerCase(Locale.ENGLISH).endsWith(".war")) {
message = sm.getString(
"htmlManagerServlet.deployUploadNotWar", filename);
break;
// Identify the appBase of the owning Host of this Context
// (if any)
basename = filename.substring(0,
- filename.toLowerCase().indexOf(".war"));
+ filename.toLowerCase(Locale.ENGLISH).indexOf(".war"));
File file = new File(getAppBase(), filename);
if (file.exists()) {
message = sm.getString(
private String extractFilename(String cd) {
String fileName = null;
if (cd != null) {
- String cdl = cd.toLowerCase();
+ String cdl = cd.toLowerCase(Locale.ENGLISH);
if (cdl.startsWith("form-data") || cdl.startsWith("attachment")) {
ParameterParser parser = new ParameterParser();
parser.setLowerCaseNames(true);
locale = (Locale) obj;
break;
}
- obj = in_session.getAttribute(LOCALE_TEST_ATTRIBUTES[i].toLowerCase());
+ obj = in_session.getAttribute(LOCALE_TEST_ATTRIBUTES[i].toLowerCase(Locale.ENGLISH));
if (null != obj && obj instanceof Locale) {
locale = (Locale) obj;
break;
}
- obj = in_session.getAttribute(LOCALE_TEST_ATTRIBUTES[i].toUpperCase());
+ obj = in_session.getAttribute(LOCALE_TEST_ATTRIBUTES[i].toUpperCase(Locale.ENGLISH));
if (null != obj && obj instanceof Locale) {
locale = (Locale) obj;
break;
user = obj;
break;
}
- obj = httpSession.getAttribute(USER_TEST_ATTRIBUTES[i].toLowerCase());
+ obj = httpSession.getAttribute(USER_TEST_ATTRIBUTES[i].toLowerCase(Locale.ENGLISH));
if (null != obj) {
user = obj;
break;
}
- obj = httpSession.getAttribute(USER_TEST_ATTRIBUTES[i].toUpperCase());
+ obj = httpSession.getAttribute(USER_TEST_ATTRIBUTES[i].toUpperCase(Locale.ENGLISH));
if (null != obj) {
user = obj;
break;
String header = null;
while (headers.hasMoreElements()) {
header = null;
- header = headers.nextElement().toUpperCase();
+ header = headers.nextElement().toUpperCase(Locale.ENGLISH);
//REMIND: rewrite multiple headers as if received as single
//REMIND: change character set
//REMIND: I forgot what the previous REMIND means
import java.util.Date;
import java.util.Enumeration;
import java.util.Hashtable;
+import java.util.Locale;
import java.util.Stack;
import java.util.TimeZone;
import java.util.Vector;
if (path.endsWith("/"))
path = path.substring(0, path.length() - 1);
- if ((path.toUpperCase().startsWith("/WEB-INF")) ||
- (path.toUpperCase().startsWith("/META-INF"))) {
+ if ((path.toUpperCase(Locale.ENGLISH).startsWith("/WEB-INF")) ||
+ (path.toUpperCase(Locale.ENGLISH).startsWith("/META-INF"))) {
resp.sendError(WebdavStatus.SC_FORBIDDEN);
return;
}
String path = getRelativePath(req);
- if ((path.toUpperCase().startsWith("/WEB-INF")) ||
- (path.toUpperCase().startsWith("/META-INF"))) {
+ if ((path.toUpperCase(Locale.ENGLISH).startsWith("/WEB-INF")) ||
+ (path.toUpperCase(Locale.ENGLISH).startsWith("/META-INF"))) {
resp.sendError(WebdavStatus.SC_FORBIDDEN);
return;
}
if (debug > 0)
log("Dest path :" + destinationPath);
- if ((destinationPath.toUpperCase().startsWith("/WEB-INF")) ||
- (destinationPath.toUpperCase().startsWith("/META-INF"))) {
+ if ((destinationPath.toUpperCase(Locale.ENGLISH).startsWith("/WEB-INF")) ||
+ (destinationPath.toUpperCase(Locale.ENGLISH).startsWith("/META-INF"))) {
resp.sendError(WebdavStatus.SC_FORBIDDEN);
return false;
}
String path = getRelativePath(req);
- if ((path.toUpperCase().startsWith("/WEB-INF")) ||
- (path.toUpperCase().startsWith("/META-INF"))) {
+ if ((path.toUpperCase(Locale.ENGLISH).startsWith("/WEB-INF")) ||
+ (path.toUpperCase(Locale.ENGLISH).startsWith("/META-INF"))) {
resp.sendError(WebdavStatus.SC_FORBIDDEN);
return false;
}
HttpServletResponse resp, boolean setStatus)
throws IOException {
- if ((path.toUpperCase().startsWith("/WEB-INF")) ||
- (path.toUpperCase().startsWith("/META-INF"))) {
+ if ((path.toUpperCase(Locale.ENGLISH).startsWith("/WEB-INF")) ||
+ (path.toUpperCase(Locale.ENGLISH).startsWith("/META-INF"))) {
resp.sendError(WebdavStatus.SC_FORBIDDEN);
return false;
}
if (debug > 1)
log("Delete:" + path);
- if ((path.toUpperCase().startsWith("/WEB-INF")) ||
- (path.toUpperCase().startsWith("/META-INF"))) {
+ if ((path.toUpperCase(Locale.ENGLISH).startsWith("/WEB-INF")) ||
+ (path.toUpperCase(Locale.ENGLISH).startsWith("/META-INF"))) {
errorList.put(path, new Integer(WebdavStatus.SC_FORBIDDEN));
return;
}
// Exclude any resource in the /WEB-INF and /META-INF subdirectories
// (the "toUpperCase()" avoids problems on Windows systems)
- if (path.toUpperCase().startsWith("/WEB-INF") ||
- path.toUpperCase().startsWith("/META-INF"))
+ if (path.toUpperCase(Locale.ENGLISH).startsWith("/WEB-INF") ||
+ path.toUpperCase(Locale.ENGLISH).startsWith("/META-INF"))
return;
CacheEntry cacheEntry = resources.lookupCache(path);
// Exclude any resource in the /WEB-INF and /META-INF subdirectories
// (the "toUpperCase()" avoids problems on Windows systems)
- if (path.toUpperCase().startsWith("/WEB-INF") ||
- path.toUpperCase().startsWith("/META-INF"))
+ if (path.toUpperCase(Locale.ENGLISH).startsWith("/WEB-INF") ||
+ path.toUpperCase(Locale.ENGLISH).startsWith("/META-INF"))
return;
// Retrieving the lock associated with the lock-null resource
@Override
public void addDateHeader(String name, long value) {
super.addDateHeader(name, value);
- String lname = name.toLowerCase();
+ String lname = name.toLowerCase(Locale.ENGLISH);
if (lname.equals(LAST_MODIFIED)) {
lastModified = value;
}
@Override
public void addHeader(String name, String value) {
super.addHeader(name, value);
- String lname = name.toLowerCase();
+ String lname = name.toLowerCase(Locale.ENGLISH);
if (lname.equals(LAST_MODIFIED)) {
try {
synchronized(RFC1123_FORMAT) {
@Override
public void setDateHeader(String name, long value) {
super.setDateHeader(name, value);
- String lname = name.toLowerCase();
+ String lname = name.toLowerCase(Locale.ENGLISH);
if (lname.equals(LAST_MODIFIED)) {
lastModified = value;
}
@Override
public void setHeader(String name, String value) {
super.setHeader(name, value);
- String lname = name.toLowerCase();
+ String lname = name.toLowerCase(Locale.ENGLISH);
if (lname.equals(LAST_MODIFIED)) {
try {
synchronized(RFC1123_FORMAT) {
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.Locale;
import java.util.Set;
import java.util.TimeZone;
import org.apache.catalina.util.DateTool;
public String getVariableValue(String variableName, String encoding) {
- String lowerCaseVariableName = variableName.toLowerCase();
+ String lowerCaseVariableName = variableName.toLowerCase(Locale.ENGLISH);
String variableValue = null;
if (!isNameReserved(lowerCaseVariableName)) {
//Try getting it externally first, if it fails, try getting the
// value
variableValue = ssiExternalResolver.getVariableValue(variableName);
if (variableValue == null) {
- variableName = variableName.toUpperCase();
+ variableName = variableName.toUpperCase(Locale.ENGLISH);
variableValue = ssiExternalResolver
.getVariableValue(className + "." + variableName);
}
import java.io.Reader;
import java.io.StringWriter;
import java.util.HashMap;
+import java.util.Locale;
import java.util.StringTokenizer;
import org.apache.catalina.util.IOTools;
/**
// during the loop
String configErrMsg = ssiMediator.getConfigErrMsg();
SSICommand ssiCommand =
- commands.get(strCmd.toLowerCase());
+ commands.get(strCmd.toLowerCase(Locale.ENGLISH));
String errorMessage = null;
if (ssiCommand == null) {
errorMessage = "Unknown command: " + strCmd;
import java.io.StringWriter;
import java.net.URL;
import java.net.URLConnection;
+import java.util.Locale;
+
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
+ path + "'");
// Exclude any resource in the /WEB-INF and /META-INF subdirectories
// (the "toUpperCase()" avoids problems on Windows systems)
- if (path == null || path.toUpperCase().startsWith("/WEB-INF")
- || path.toUpperCase().startsWith("/META-INF")) {
+ if (path == null || path.toUpperCase(Locale.ENGLISH).startsWith("/WEB-INF")
+ || path.toUpperCase(Locale.ENGLISH).startsWith("/META-INF")) {
res.sendError(HttpServletResponse.SC_NOT_FOUND, path);
log("Can't serve file: " + path);
return;
import java.util.Collection;
import java.util.Date;
import java.util.Enumeration;
+import java.util.Locale;
+
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
protected String getCGIVariable(String name) {
String retVal = null;
- String[] nameParts = name.toUpperCase().split("_");
+ String[] nameParts = name.toUpperCase(Locale.ENGLISH).split("_");
int requiredParts = 2;
if (nameParts.length == 1) {
if (nameParts[0].equals("PATH")) {
import java.io.File;
import java.net.URL;
import java.util.LinkedHashSet;
+import java.util.Locale;
import java.util.Set;
import org.apache.catalina.loader.StandardClassLoader;
continue;
String filenames[] = directory.list();
for (int j = 0; j < filenames.length; j++) {
- String filename = filenames[j].toLowerCase();
+ String filename = filenames[j].toLowerCase(Locale.ENGLISH);
if (!filename.endsWith(".jar"))
continue;
File file = new File(directory, filenames[j]);
+ directory.getAbsolutePath());
String filenames[] = directory.list();
for (int j = 0; j < filenames.length; j++) {
- String filename = filenames[j].toLowerCase();
+ String filename = filenames[j].toLowerCase(Locale.ENGLISH);
if (!filename.endsWith(".jar"))
continue;
File file = new File(directory, filenames[j]);
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
+import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
// Context path must start with '/'
pathName = pathName.substring(1).replace('/', '#');
}
- if (docBase.toLowerCase().endsWith(".war") && !file.isDirectory() && unpackWARs) {
+ if (docBase.toLowerCase(Locale.ENGLISH).endsWith(".war") && !file.isDirectory() && unpackWARs) {
URL war = new URL("jar:" + (new File(docBase)).toURI().toURL() + "!/");
docBase = ExpandWar.expand(host, war, pathName);
file = new File(docBase);
if (context instanceof StandardContext) {
((StandardContext) context).setOriginalDocBase(origDocBase);
}
- } else if (docBase.toLowerCase().endsWith(".war") &&
+ } else if (docBase.toLowerCase(Locale.ENGLISH).endsWith(".war") &&
!file.isDirectory() && !unpackWARs) {
URL war =
new URL("jar:" + (new File (docBase)).toURI().toURL() + "!/");
}
File file = null;
- if (docBase.toLowerCase().endsWith(".war")) {
+ if (docBase.toLowerCase(Locale.ENGLISH).endsWith(".war")) {
file = new File(System.getProperty("java.io.tmpdir"),
deploymentCount++ + "-" + docBase + ".war");
} else {
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
+import java.util.Locale;
import java.util.Set;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
for (int i = 0; i < files.length; i++) {
File contextXml = new File(configBase, files[i]);
- if (files[i].toLowerCase().endsWith(".xml")) {
+ if (files[i].toLowerCase(Locale.ENGLISH).endsWith(".xml")) {
// Calculate the context path and make sure it is unique
String nameTmp = files[i].substring(0, files[i].length() - 4);
(contextXml.getAbsolutePath(), new Long(contextXml.lastModified()));
deployedApp.redeployResources.put(docBase.getAbsolutePath(),
new Long(docBase.lastModified()));
- if (docBase.getAbsolutePath().toLowerCase().endsWith(".war")) {
+ if (docBase.getAbsolutePath().toLowerCase(Locale.ENGLISH).endsWith(".war")) {
isExternalWar = true;
}
} else {
if (files[i].equalsIgnoreCase("WEB-INF"))
continue;
File dir = new File(appBase, files[i]);
- if (files[i].toLowerCase().endsWith(".war") && dir.isFile()
+ if (files[i].toLowerCase(Locale.ENGLISH).endsWith(".war") && dir.isFile()
&& !invalidWars.contains(files[i]) ) {
// Calculate the context path and make sure it is unique
}
deployedApp.redeployResources.put(docBase.getAbsolutePath(),
new Long(docBase.lastModified()));
- if (docBase.getAbsolutePath().toLowerCase().endsWith(".war")) {
+ if (docBase.getAbsolutePath().toLowerCase(Locale.ENGLISH).endsWith(".war")) {
isWar = true;
}
}
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.Locale;
import java.util.NoSuchElementException;
import java.util.StringTokenizer;
import java.util.jar.JarInputStream;
// build a list of jar files in the classpath
while (strTok.hasMoreTokens()) {
String classpathItem = strTok.nextToken();
- if (classpathItem.toLowerCase().endsWith(".jar")) {
+ if (classpathItem.toLowerCase(Locale.ENGLISH).endsWith(".jar")) {
File item = new File(classpathItem);
if (item.isFile()) {
try {
NamingEnumeration<Binding> wne =
dirContext.listBindings("/META-INF/");
Binding binding = wne.nextElement();
- if (binding.getName().toUpperCase().equals("MANIFEST.MF")) {
+ if (binding.getName().toUpperCase(Locale.ENGLISH).equals("MANIFEST.MF")) {
Resource resource = (Resource)dirContext.lookup
("/META-INF/" + binding.getName());
inputStream = resource.streamContent();
ne = dirContext.listBindings("WEB-INF/lib/");
while ((ne != null) && ne.hasMoreElements()) {
Binding binding = ne.nextElement();
- if (!binding.getName().toLowerCase().endsWith(".jar")) {
+ if (!binding.getName().toLowerCase(Locale.ENGLISH).endsWith(".jar")) {
continue;
}
Object obj =
}
File[] files = targetDir.listFiles();
for (int i = 0; i < files.length; i++) {
- if (files[i].getName().toLowerCase().endsWith(".jar") &&
+ if (files[i].getName().toLowerCase(Locale.ENGLISH).endsWith(".jar") &&
files[i].isFile()) {
try {
addSystemResource(files[i]);
* @see #reverse
*/
public static String convert(String mimeCharsetName) {
- return s_enchash.get(mimeCharsetName.toUpperCase());
+ return s_enchash.get(mimeCharsetName.toUpperCase(Locale.ENGLISH));
}
/**
* @see #convert
*/
public static String reverse(String encoding) {
- return s_revhash.get(encoding.toUpperCase());
+ return s_revhash.get(encoding.toUpperCase(Locale.ENGLISH));
}
}
import java.io.Serializable;
import java.io.IOException;
+import java.util.Locale;
/**
* This class is used to represent a subarray of bytes in an HTTP message.
public int indexOfIgnoreCase(String s, int starting) {
toString();
- String upper=strValue.toUpperCase();
- String sU=s.toUpperCase();
+ String upper=strValue.toUpperCase(Locale.ENGLISH);
+ String sU=s.toUpperCase(Locale.ENGLISH);
return upper.indexOf( sU, starting );
}
qIndex < equalIndex) {
String qValueStr = language.substring(qValueIndex + 1);
language = language.substring(0, qValueIndex);
- qValueStr = qValueStr.trim().toLowerCase();
+ qValueStr = qValueStr.trim().toLowerCase(Locale.ENGLISH);
qValueIndex = qValueStr.indexOf('=');
qValue = new Double(0);
if (qValueStr.startsWith("q") &&
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
private final List<String> headerNameList = new ArrayList<String>();
public String getHeader(String name) {
- String nameLower = name.toLowerCase();
+ String nameLower = name.toLowerCase(Locale.ENGLISH);
List<String> headerValueList = headerNameToValueListMap.get(nameLower);
if (null == headerValueList) {
return null;
}
public Iterator<String> getHeaders(String name) {
- String nameLower = name.toLowerCase();
+ String nameLower = name.toLowerCase(Locale.ENGLISH);
List<String> headerValueList = headerNameToValueListMap.get(nameLower);
if (null == headerValueList) {
return Collections.<String>emptyList().iterator();
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.NoSuchElementException;
if (contentType == null) {
return false;
}
- if (contentType.toLowerCase().startsWith(MULTIPART)) {
+ if (contentType.toLowerCase(Locale.ENGLISH).startsWith(MULTIPART)) {
return true;
}
return false;
private String getFileName(String pContentDisposition) {
String fileName = null;
if (pContentDisposition != null) {
- String cdl = pContentDisposition.toLowerCase();
+ String cdl = pContentDisposition.toLowerCase(Locale.ENGLISH);
if (cdl.startsWith(FORM_DATA) || cdl.startsWith(ATTACHMENT)) {
ParameterParser parser = new ParameterParser();
parser.setLowerCaseNames(true);
private String getFieldName(String pContentDisposition) {
String fieldName = null;
if (pContentDisposition != null
- && pContentDisposition.toLowerCase().startsWith(FORM_DATA)) {
+ && pContentDisposition.toLowerCase(Locale.ENGLISH).startsWith(FORM_DATA)) {
ParameterParser parser = new ParameterParser();
parser.setLowerCaseNames(true);
// Parameter parser can handle null input
String contentType = ctx.getContentType();
if ((null == contentType)
- || (!contentType.toLowerCase().startsWith(MULTIPART))) {
+ || (!contentType.toLowerCase(Locale.ENGLISH).startsWith(MULTIPART))) {
throw new InvalidContentTypeException(
"the request doesn't contain a "
+ MULTIPART_FORM_DATA
if (fieldName != null) {
String subContentType = headers.getHeader(CONTENT_TYPE);
if (subContentType != null
- && subContentType.toLowerCase()
+ && subContentType.toLowerCase(Locale.ENGLISH)
.startsWith(MULTIPART_MIXED)) {
currentFieldName = fieldName;
// Multiple files associated with this field name
package org.apache.tomcat.util.http.fileupload;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
/**
}
if ((paramName != null) && (paramName.length() > 0)) {
if (this.lowerCaseNames) {
- paramName = paramName.toLowerCase();
+ paramName = paramName.toLowerCase(Locale.ENGLISH);
}
params.put(paramName, paramValue);
}
import java.io.IOException;
import java.util.List;
+import java.util.Locale;
import javax.servlet.http.HttpServletRequest;
*/
public static final boolean isMultipartContent(
HttpServletRequest request) {
- if (!"post".equals(request.getMethod().toLowerCase())) {
+ if (!"post".equals(request.getMethod().toLowerCase(Locale.ENGLISH))) {
return false;
}
String contentType = request.getContentType();
if (contentType == null) {
return false;
}
- if (contentType.toLowerCase().startsWith(MULTIPART)) {
+ if (contentType.toLowerCase(Locale.ENGLISH).startsWith(MULTIPART)) {
return true;
}
return false;
package org.apache.tomcat.util.modeler;
+import java.util.Locale;
+
import javax.management.MBeanOperationInfo;
import javax.management.MBeanParameterInfo;
if (impact == null)
this.impact = null;
else
- this.impact = impact.toUpperCase();
+ this.impact = impact.toUpperCase(Locale.ENGLISH);
}
import java.io.Serializable;
import java.net.MalformedURLException;
+import java.util.Locale;
/**
for (i = start; !aRef && (i < limit) ; i++) {
c = spec.charAt(i);
if (c == ':') {
- String s = spec.substring(start, i).toLowerCase();
+ String s = spec.substring(start, i).toLowerCase(Locale.ENGLISH);
// Assume all protocols are valid
newProtocol = s;
start = i + 1;
import java.security.cert.PKIXBuilderParameters;
import java.security.cert.X509CertSelector;
import java.util.Collection;
+import java.util.Locale;
import java.util.Vector;
import javax.net.ssl.CertPathTrustManagerParameters;
if (keyAlias != null) {
String alias = keyAlias;
if (JSSESocketFactory.defaultKeystoreType.equals(keystoreType)) {
- alias = alias.toLowerCase();
+ alias = alias.toLowerCase(Locale.ENGLISH);
}
for(int i=0; i<kms.length; i++) {
kms[i] = new JSSEKeyManager((X509KeyManager)kms[i], alias);
import javax.servlet.jsp.tagext.*;
import java.io.*;
+import java.util.Locale;
/**
* Display the sources of the JSP file.
@Override
public int doEndTag() throws JspException {
if ((jspFile.indexOf( ".." ) >= 0) ||
- (jspFile.toUpperCase().indexOf("/WEB-INF/") != 0) ||
- (jspFile.toUpperCase().indexOf("/META-INF/") != 0))
+ (jspFile.toUpperCase(Locale.ENGLISH).indexOf("/WEB-INF/") != 0) ||
+ (jspFile.toUpperCase(Locale.ENGLISH).indexOf("/META-INF/") != 0))
throw new JspTagException("Invalid JSP file " + jspFile);
InputStream in
*/
package jsp2.examples.el;
+import java.util.Locale;
+
/**
* Defines the functions for the jsp2 example tag library.
*
}
public static String caps( String text ) {
- return text.toUpperCase();
+ return text.toUpperCase(Locale.ENGLISH);
}
}