A value is null-checked after it has already been dereferenced. If it was
null, it would never get to the check because of NullPointerException.
X-SVN-Rev: 30732
*/
static boolean parseCustomID(String id, int[] fields) {
NumberFormat numberFormat = null;
- String idUppercase = id.toUpperCase(Locale.ENGLISH);
if (id != null && id.length() > kGMT_ID.length() &&
- idUppercase.startsWith(kGMT_ID)) {
+ id.toUpperCase(Locale.ENGLISH).startsWith(kGMT_ID)) {
ParsePosition pos = new ParsePosition(kGMT_ID.length());
int sign = 1;
int hour = 0;
private int handlePrevious(short stateTable[]) {
+ if (fText == null || stateTable == null) {
+ return 0;
+ }
+
int state;
int category = 0;
int mode;
boolean lookAheadHardBreak =
(stateTable[RBBIDataWrapper.FLAGS+1] & RBBIDataWrapper.RBBI_LOOKAHEAD_HARD_BREAK) != 0;
-
- if (fText == null || stateTable == null) {
- return 0;
- }
// handlePrevious() never gets the rule status.
// Flag the status as invalid; if the user ever asks for status, we will need
// to back up, then re-find the break position using handleNext(), which does