diff options
author | Jesse Wilson <jessewilson@google.com> | 2009-10-15 17:30:27 -0700 |
---|---|---|
committer | Jesse Wilson <jessewilson@google.com> | 2009-10-16 11:06:13 -0700 |
commit | 1c422fc0ab0692e10a05af6f48c6276c4dad4bea (patch) | |
tree | 739b04335314dc19b95612ecbcf487b78ba4d04d /text | |
parent | 16547435e99ef7d6d09c8d52768b1a8639bf05d3 (diff) | |
download | libcore-1c422fc0ab0692e10a05af6f48c6276c4dad4bea.zip libcore-1c422fc0ab0692e10a05af6f48c6276c4dad4bea.tar.gz libcore-1c422fc0ab0692e10a05af6f48c6276c4dad4bea.tar.bz2 |
Respond to impossible CloneNotSupportedExceptions with AssertionErrors.
See bug 2183132.
Diffstat (limited to 'text')
6 files changed, 6 insertions, 6 deletions
diff --git a/text/src/main/java/java/text/AttributedString.java b/text/src/main/java/java/text/AttributedString.java index 77bbf78..fe7aa0c 100644 --- a/text/src/main/java/java/text/AttributedString.java +++ b/text/src/main/java/java/text/AttributedString.java @@ -107,7 +107,7 @@ public class AttributedString { } return clone; } catch (CloneNotSupportedException e) { - return null; + throw new AssertionError(e); // android-changed } } diff --git a/text/src/main/java/java/text/BreakIterator.java b/text/src/main/java/java/text/BreakIterator.java index 3a08427..78870f0 100644 --- a/text/src/main/java/java/text/BreakIterator.java +++ b/text/src/main/java/java/text/BreakIterator.java @@ -524,7 +524,7 @@ public abstract class BreakIterator implements Cloneable { cloned.wrapped = (com.ibm.icu4jni.text.BreakIterator) wrapped.clone(); return cloned; } catch (CloneNotSupportedException e) { - throw new InternalError(e.getMessage()); + throw new AssertionError(e); // android-changed } } diff --git a/text/src/main/java/java/text/Collator.java b/text/src/main/java/java/text/Collator.java index 71ebb94..e954b8b 100644 --- a/text/src/main/java/java/text/Collator.java +++ b/text/src/main/java/java/text/Collator.java @@ -211,7 +211,7 @@ public abstract class Collator implements Comparator<Object>, Cloneable { clone.icuColl = (com.ibm.icu4jni.text.Collator) this.icuColl.clone(); return clone; } catch (CloneNotSupportedException e) { - return null; + throw new AssertionError(e); // android-changed } } diff --git a/text/src/main/java/java/text/DecimalFormatSymbols.java b/text/src/main/java/java/text/DecimalFormatSymbols.java index a71a4c6..46849ef 100644 --- a/text/src/main/java/java/text/DecimalFormatSymbols.java +++ b/text/src/main/java/java/text/DecimalFormatSymbols.java @@ -115,7 +115,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable { symbols.patternChars = patternChars.clone(); return symbols; } catch (CloneNotSupportedException e) { - return null; + throw new AssertionError(e); // android-changed } } diff --git a/text/src/main/java/java/text/Format.java b/text/src/main/java/java/text/Format.java index 3a6e49d..8abe605 100644 --- a/text/src/main/java/java/text/Format.java +++ b/text/src/main/java/java/text/Format.java @@ -84,7 +84,7 @@ public abstract class Format implements Serializable, Cloneable { try { return super.clone(); } catch (CloneNotSupportedException e) { - return null; + throw new AssertionError(e); // android-changed } } diff --git a/text/src/main/java/java/text/StringCharacterIterator.java b/text/src/main/java/java/text/StringCharacterIterator.java index 8ef0341..ea60180 100644 --- a/text/src/main/java/java/text/StringCharacterIterator.java +++ b/text/src/main/java/java/text/StringCharacterIterator.java @@ -105,7 +105,7 @@ public final class StringCharacterIterator implements CharacterIterator { try { return super.clone(); } catch (CloneNotSupportedException e) { - return null; + throw new AssertionError(e); // android-changed } } |