- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Sun, 22 Feb 2009 15:16:20 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/util In directory hutz:/tmp/cvs-serv13876/css/util Modified Files: Date.java Messages.java Utf8Properties.java Warning.java Log Message: reformat + StringBuffer->StringBuilder Index: Date.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/util/Date.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Date.java 14 Sep 2005 15:15:32 -0000 1.4 +++ Date.java 22 Feb 2009 15:16:18 -0000 1.5 @@ -65,11 +65,11 @@ private void computeDate () { int day; int hr,mn,sec; - StringBuffer sbdate, ldate; + StringBuilder sbdate, ldate; Calendar cal; - sbdate = new StringBuffer(30); - ldate = new StringBuffer(30); + sbdate = new StringBuilder(30); + ldate = new StringBuilder(30); cal = new GregorianCalendar(tz, Locale.getDefault()); day = cal.get(Calendar.DAY_OF_MONTH); Index: Utf8Properties.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/util/Utf8Properties.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Utf8Properties.java 14 Sep 2005 15:15:32 -0000 1.2 +++ Utf8Properties.java 22 Feb 2009 15:16:18 -0000 1.3 @@ -141,11 +141,12 @@ * @return the converted line */ private String loadConversion(String line) { - StringBuffer val = new StringBuffer(line.length()); + StringBuilder val = new StringBuilder(line.length()); int index = 0; - // Replace all the "\." substrings with their corresponding escaped characters + // Replace all the "\." substrings with their corresponding + // escaped characters for(; index < line.length(); index++) { char currentChar = line.charAt(index); if(currentChar == '\\') { @@ -211,7 +212,7 @@ */ private String storeConversion(String line) { int length = line.length(); - StringBuffer outBuffer = new StringBuffer(length*2); + StringBuilder outBuffer = new StringBuilder(length*2); for(int i = 0; i < length; i++) { char currentChar = line.charAt(i); @@ -246,8 +247,10 @@ /** * Indicates wether the property continues on the next line or not - * @param line the beginning of the property that might be continued on the next line - * @return true if the propertiy continues on the following line, false otherwise + * @param line the beginning of the property that might be continued + * on the next line + * @return true if the propertiy continues on the following line, + * false otherwise */ private boolean continueLine(String line) { if(line != null && !line.equals("")) { Index: Warning.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/util/Warning.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Warning.java 13 Sep 2007 10:23:34 -0000 1.8 +++ Warning.java 22 Feb 2009 15:16:18 -0000 1.9 @@ -193,7 +193,7 @@ // replace all parameters. int j = 0; for (int i = 0; (i = str.indexOf("%s", i)) >= 0 && j < args.length; ) { - StringBuffer stb = new StringBuffer(str.substring(0, i)); + StringBuilder stb = new StringBuilder(str.substring(0, i)); str = stb.append(args[j++]).append(str.substring(i+2)).toString(); } return str; Index: Messages.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/util/Messages.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- Messages.java 12 Feb 2009 10:30:28 -0000 1.25 +++ Messages.java 22 Feb 2009 15:16:18 -0000 1.26 @@ -100,7 +100,7 @@ * the warning property. */ public String getWarningString(String message) { - return getString(new StringBuffer("warning.").append(message).toString()); + return getString("warning."+message); } /** @@ -110,7 +110,7 @@ * the warning property. */ public String getWarningLevelString(String message) { - return getString(new StringBuffer("warning.").append(message).append(".level").toString()); + return getString(new StringBuilder("warning.").append(message).append(".level").toString()); } /** @@ -120,7 +120,7 @@ * the error property. */ public String getErrorString(String message) { - return getString(new StringBuffer("error.").append(message).toString()); + return getString("error."+message); } /** @@ -130,7 +130,7 @@ * the generator property. */ public String getGeneratorString(String message) { - return getString(new StringBuffer("generator.").append(message).toString()); + return getString("generator."+message); } /** @@ -140,7 +140,7 @@ * the generator property. */ public String getGeneratorString(String message, String param) { - String str = getString(new StringBuffer("generator.").append(message).toString()); + String str = getString("generator."+message); // replace all parameters int i = str.indexOf("%s"); @@ -157,7 +157,7 @@ * the generator property. */ public String getServletString(String message) { - return getString(new StringBuffer("servlet.").append(message).toString()); + return getString("servlet."+message); } static { @@ -389,7 +389,5 @@ System.err.println("org.w3c.css.util.Messages: " + "couldn't load properties cn"); System.err.println(" " + e.toString()); } - } - }
Received on Sunday, 22 February 2009 15:16:29 UTC