More finality.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2729 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2010-02-09 21:29:01 +00:00
parent ddd0b0b72a
commit c9598b3110
9 changed files with 11 additions and 15 deletions
@@ -92,7 +92,7 @@ public class HTMLUtil
public static String simpleFormat (String text)
{
// first replace the image and other URLs
Matcher m = _url.matcher(text);
Matcher m = URL_PAT.matcher(text);
StringBuffer tbuf = new StringBuffer();
while (m.find()) {
String match = m.group();
@@ -239,6 +239,5 @@ public class HTMLUtil
return buf.toString();
}
protected static Pattern _url =
Pattern.compile("^http://\\S+", Pattern.MULTILINE);
protected static final Pattern URL_PAT = Pattern.compile("^http://\\S+", Pattern.MULTILINE);
}
@@ -410,5 +410,5 @@ public class ParameterUtil
}
/** We use this to parse dates in requireDateParameter(). */
protected static SimpleDateFormat _dparser = new SimpleDateFormat("yyyy-MM-dd");
protected static final SimpleDateFormat _dparser = new SimpleDateFormat("yyyy-MM-dd");
}
+1 -2
View File
@@ -342,6 +342,5 @@ public class IntField extends JTextField
protected int _minValue, _maxValue;
/** Formats and parses numbers with commas in them. */
protected static NumberFormat _formatter =
NumberFormat.getIntegerInstance();
protected static final NumberFormat _formatter = NumberFormat.getIntegerInstance();
}
@@ -642,7 +642,7 @@ public class SwingUtil
}
/** Used by {@link #addDebugBorders}. */
protected static Random _rando = new Random();
protected static final Random _rando = new Random();
/** Used by {@link #getDefaultTextAntialiasing}. */
protected static boolean _defaultTextAntialiasing;
+1 -1
View File
@@ -883,5 +883,5 @@ public class ArrayUtil
}
/** The default random object used when shuffling an array. */
protected static Random _rnd = new Random();
protected static final Random _rnd = new Random();
}
@@ -74,6 +74,6 @@ public class CurrencyUtil
}
/** A number format for formatting dollars. */
protected static NumberFormat _dollarFormatter =
protected static final NumberFormat _dollarFormatter =
NumberFormat.getCurrencyInstance(Locale.US);
}
+1 -1
View File
@@ -212,7 +212,7 @@ public class IntSets
return EMPTY_INTERATOR;
}
protected static Interator EMPTY_INTERATOR = new AbstractInterator() {
protected static final Interator EMPTY_INTERATOR = new AbstractInterator() {
public boolean hasNext () { return false; }
public int nextInt () { throw new NoSuchElementException(); }
};
+1 -1
View File
@@ -112,5 +112,5 @@ public class KeyUtil
}
/** Characters used in creating key strings. */
protected static String KEY_CHARS = "0123456789";
protected static final String KEY_CHARS = "0123456789";
}
@@ -22,6 +22,7 @@ package com.samskivert.util;
import java.awt.Color;
import java.util.HashMap;
import java.util.Map;
/**
* Provides a mechanism for converting a string representation of a value
@@ -56,11 +57,8 @@ public class ValueMarshaller
public Object parse (String source) throws Exception;
}
protected static HashMap<Class<?>,Parser> _parsers;
protected static Map<Class<?>,Parser> _parsers = new HashMap<Class<?>,Parser>();
static {
_parsers = new HashMap<Class<?>,Parser>();
// we can parse strings
_parsers.put(String.class, new Parser() {
public Object parse (String source) throws Exception {