mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 05:52:26 +00:00
[HUDSON-5391] Fixed the infamous Turkish bug.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@26650 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
af12705d7a
commit
1b3c1f92fd
15 files changed
+31
-17
No files matched your search
@@ -46,6 +46,7 @@ import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
@@ -99,7 +100,7 @@ public class LogRecorder extends AbstractModelObject implements Saveable {
|
||||
|
||||
@DataBoundConstructor
|
||||
public Target(String name, String level) {
|
||||
this(name,Level.parse(level.toUpperCase()));
|
||||
this(name,Level.parse(level.toUpperCase(Locale.ENGLISH)));
|
||||
}
|
||||
|
||||
public Level getLevel() {
|
||||
|
||||
@@ -49,6 +49,7 @@ import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
@@ -123,7 +124,7 @@ public class LogRecorderManager extends AbstractModelObject {
|
||||
if(level.equals("inherit"))
|
||||
lv = null;
|
||||
else
|
||||
lv = Level.parse(level.toUpperCase());
|
||||
lv = Level.parse(level.toUpperCase(Locale.ENGLISH));
|
||||
Logger.getLogger(name).setLevel(lv);
|
||||
return new HttpRedirect("levels");
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import hudson.util.KeyedDataStorage;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
@@ -77,7 +78,7 @@ public final class FingerprintMap extends KeyedDataStorage<Fingerprint,Fingerpri
|
||||
// sanity check
|
||||
if(md5sum.length()!=32)
|
||||
return null; // illegal input
|
||||
md5sum = md5sum.toLowerCase();
|
||||
md5sum = md5sum.toLowerCase(Locale.ENGLISH);
|
||||
|
||||
return super.get(md5sum,createIfNotExist,createParams);
|
||||
}
|
||||
|
||||
@@ -196,6 +196,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.Map.Entry;
|
||||
import java.util.Properties;
|
||||
@@ -3293,7 +3294,7 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
|
||||
|
||||
public static boolean isDarwin() {
|
||||
// according to http://developer.apple.com/technotes/tn2002/tn2110.html
|
||||
return System.getProperty("os.name").toLowerCase().startsWith("mac");
|
||||
return System.getProperty("os.name").toLowerCase(Locale.ENGLISH).startsWith("mac");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,6 +35,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import java.awt.*;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.jfree.data.category.DefaultCategoryDataset;
|
||||
import org.jfree.chart.JFreeChart;
|
||||
@@ -178,7 +179,7 @@ public class MultiStageTimeSeries {
|
||||
*/
|
||||
public static TimeScale parse(String type) {
|
||||
if(type==null) return TimeScale.MIN;
|
||||
return Enum.valueOf(TimeScale.class, type.toUpperCase());
|
||||
return Enum.valueOf(TimeScale.class, type.toUpperCase(Locale.ENGLISH));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.kohsuke.stapler.export.ExportedBean;
|
||||
import org.kohsuke.stapler.export.Exported;
|
||||
@@ -106,7 +107,7 @@ import org.kohsuke.stapler.export.Exported;
|
||||
* If failed to parse.
|
||||
*/
|
||||
public static DiskSpace parse(String size) throws ParseException {
|
||||
size = size.toUpperCase().trim();
|
||||
size = size.toUpperCase(Locale.ENGLISH).trim();
|
||||
if (size.endsWith("B")) // cut off 'B' from KB, MB, etc.
|
||||
size = size.substring(0,size.length()-1);
|
||||
|
||||
|
||||
@@ -423,7 +423,7 @@ public class JDKInstaller extends ToolInstaller {
|
||||
}
|
||||
|
||||
public static Platform current() throws DetectionFailedException {
|
||||
String arch = System.getProperty("os.name").toLowerCase();
|
||||
String arch = System.getProperty("os.name").toLowerCase(Locale.ENGLISH);
|
||||
if(arch.contains("linux")) return LINUX;
|
||||
if(arch.contains("windows")) return WINDOWS;
|
||||
if(arch.contains("sun") || arch.contains("solaris")) return SOLARIS;
|
||||
@@ -480,7 +480,7 @@ public class JDKInstaller extends ToolInstaller {
|
||||
* http://lopica.sourceforge.net/os.html was useful in writing this code.
|
||||
*/
|
||||
public static CPU current() throws DetectionFailedException {
|
||||
String arch = System.getProperty("os.arch").toLowerCase();
|
||||
String arch = System.getProperty("os.arch").toLowerCase(Locale.ENGLISH);
|
||||
if(arch.contains("sparc")) return Sparc;
|
||||
if(arch.contains("ia64")) return Itanium;
|
||||
if(arch.contains("amd64") || arch.contains("86_64")) return amd64;
|
||||
|
||||
@@ -42,6 +42,7 @@ import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
@@ -295,7 +296,7 @@ public abstract class FormFieldValidator {
|
||||
*/
|
||||
private String getCharset(URLConnection con) {
|
||||
for( String t : con.getContentType().split(";") ) {
|
||||
t = t.trim().toLowerCase();
|
||||
t = t.trim().toLowerCase(Locale.ENGLISH);
|
||||
if(t.startsWith("charset="))
|
||||
return t.substring(8);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Represents the result of the form field validation.
|
||||
@@ -189,7 +190,7 @@ public abstract class FormValidation extends IOException implements HttpResponse
|
||||
return new FormValidation(kind) {
|
||||
public String renderHtml() {
|
||||
// 1x16 spacer needed for IE since it doesn't support min-height
|
||||
return "<div class="+ kind.name().toLowerCase() +"><img src='"+
|
||||
return "<div class="+ kind.name().toLowerCase(Locale.ENGLISH) +"><img src='"+
|
||||
Stapler.getCurrentRequest().getContextPath()+ Hudson.RESOURCE_PATH+"/images/none.gif' height=16 width=1>"+
|
||||
message+"</div>";
|
||||
}
|
||||
@@ -403,7 +404,7 @@ public abstract class FormValidation extends IOException implements HttpResponse
|
||||
*/
|
||||
private String getCharset(URLConnection con) {
|
||||
for( String t : con.getContentType().split(";") ) {
|
||||
t = t.trim().toLowerCase();
|
||||
t = t.trim().toLowerCase(Locale.ENGLISH);
|
||||
if(t.startsWith("charset="))
|
||||
return t.substring(8);
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.xml.sax.Attributes;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.apache.commons.jelly.XMLOutput;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Stack;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
@@ -71,7 +72,7 @@ public class TableNestChecker extends XMLFilterImpl {
|
||||
|
||||
@Override
|
||||
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
|
||||
String tagName = localName.toUpperCase();
|
||||
String tagName = localName.toUpperCase(Locale.ENGLISH);
|
||||
|
||||
// make sure that this tag occurs in the proper context
|
||||
if(!elements.peek().isAllowed(tagName))
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
*/
|
||||
package hudson.util;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
/**
|
||||
@@ -78,7 +79,7 @@ public class VersionNumber implements Comparable<VersionNumber> {
|
||||
|
||||
int i=0;
|
||||
while( tokens.hasMoreTokens() ) {
|
||||
String token = tokens.nextToken().toLowerCase();
|
||||
String token = tokens.nextToken().toLowerCase(Locale.ENGLISH);
|
||||
if(token.equals("*")) {
|
||||
digits[i++] = 1000;
|
||||
} else
|
||||
|
||||
Reference in new issue
Block a user