From a40f35bba55c4a19a19d5e1ede6f2dde26382fb2 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Tue, 9 Sep 2014 21:40:40 +0000 Subject: [PATCH] ICU-10911 removed unnecessary try-catch, fixed Eclipse warnings (better no @param than empty), removed @deprecated from impl class method X-SVN-Rev: 36411 --- .../com/ibm/icu/impl/UPropertyAliases.java | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/UPropertyAliases.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/UPropertyAliases.java index dfb4d9d5b1c..151dca2d4f4 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/impl/UPropertyAliases.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/UPropertyAliases.java @@ -305,30 +305,23 @@ public final class UPropertyAliases { // where the first word is the BytesTrie offset. return getPropertyOrValueEnum(valueMaps[valueMapIndex], alias); } - + /** * Returns a value enum given a property enum and one of its value names. Does not throw. * @return value enum, or UProperty.UNDEFINED if not defined for that property - * @internal - * @deprecated This API is ICU internal only. */ - @Deprecated public int getPropertyValueEnumNoThrow(int property, CharSequence alias) { - try { - int valueMapIndex=findProperty(property); - if(valueMapIndex==0) { - return UProperty.UNDEFINED; - } - valueMapIndex=valueMaps[valueMapIndex+1]; - if(valueMapIndex==0) { - return UProperty.UNDEFINED; - } - // valueMapIndex is the start of the property's valueMap, - // where the first word is the BytesTrie offset. - return getPropertyOrValueEnum(valueMaps[valueMapIndex], alias); - } catch (Exception e) { + int valueMapIndex=findProperty(property); + if(valueMapIndex==0) { return UProperty.UNDEFINED; } + valueMapIndex=valueMaps[valueMapIndex+1]; + if(valueMapIndex==0) { + return UProperty.UNDEFINED; + } + // valueMapIndex is the start of the property's valueMap, + // where the first word is the BytesTrie offset. + return getPropertyOrValueEnum(valueMaps[valueMapIndex], alias); } /** -- 2.40.0