]> granicus.if.org Git - icu/commitdiff
ICU-10399 Some updates for the eclipse plug-in version. Resolve some compiler warning...
authorYoshito Umaoka <y.umaoka@gmail.com>
Mon, 23 Sep 2013 18:14:29 +0000 (18:14 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Mon, 23 Sep 2013 18:14:29 +0000 (18:14 +0000)
X-SVN-Rev: 34456

icu4j/eclipse-build/build.properties
icu4j/main/classes/core/src/com/ibm/icu/impl/TimeZoneGenericNames.java
icu4j/main/classes/core/src/com/ibm/icu/text/TimeZoneFormat.java

index 4f57f498d76ee963c793acf7142119051231c4b8..2d41643a6a8dcd94ea7b10d92e87ea61d32cc204 100644 (file)
@@ -2,6 +2,6 @@
 #* Copyright (C) 2010-2013, International Business Machines Corporation and    *
 #* others. All Rights Reserved.                                                *
 #*******************************************************************************
-icu4j.plugin.impl.version.string=52.0.1
+icu4j.plugin.impl.version.string=52.1.0
 copyright.eclipse=Licensed Materials - Property of IBM \n (C) Copyright IBM Corp. 2000, 2013. All Rights Reserved. \n IBM is a registered trademark of IBM Corp.
 icu4j.data.version.number=52
index ffcaf78cf22ccddc96615578033392080e7c709e..e1c60830e91613b7643f41ccf048a8739788390e 100644 (file)
@@ -797,8 +797,9 @@ public class TimeZoneGenericNames implements Serializable, Freezable<TimeZoneGen
         case SHORT_GENERIC:
             nameType = GenericNameType.SHORT;
             break;
+        default:
+            throw new IllegalArgumentException("Unexpected MatchInfo name type - " + matchInfo.nameType());
         }
-        assert(nameType != null);
 
         String tzID = matchInfo.tzID();
         if (tzID == null) {
index 4191c7eedc596e1fcdce1a015b815ccb43e82ec7..7d488db29fee7dd1ae5042a90abae13ad90c2e72 100644 (file)
@@ -951,6 +951,12 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
             case ISO_EXTENDED_LOCAL_FULL:
                 result = formatOffsetISO8601Extended(offset, false, false, false);
                 break;
+
+            default:
+                // Other cases are handled earlier and never comes into this
+                // switch statement.
+                assert false;
+                break;
             }
             // time type
             if (timeType != null) {
@@ -1189,6 +1195,10 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
                 case GENERIC_SHORT:
                     genericNameTypes = EnumSet.of(GenericNameType.SHORT, GenericNameType.LOCATION);
                     break;
+                default:
+                    // style cannot be other than above cases
+                    assert false;
+                    break;
                 }
                 GenericMatchInfo bestGeneric = getTimeZoneGenericNames().findBestMatch(text, startIdx, genericNameTypes);
                 if (bestGeneric != null && (startIdx + bestGeneric.matchLength() > parsedPos)) {
@@ -1787,8 +1797,10 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
         case LONG_DAYLIGHT:
         case SHORT_DAYLIGHT:
             return TimeType.DAYLIGHT;
+
+        default:
+            return TimeType.UNKNOWN;
         }
-        return TimeType.UNKNOWN;
     }
 
     /**