summaryrefslogtreecommitdiff
path: root/libjava/java/text/RuleBasedCollator.java
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-09-07 00:15:47 +0000
committerTom Tromey <tromey@gcc.gnu.org>2001-09-07 00:15:47 +0000
commit89066f10f5dbb9e6192cd2ae29ec0f6815ce1d60 (patch)
tree3b0e9627227e608f5c734780cbf7d70418dd82bb /libjava/java/text/RuleBasedCollator.java
parentcffb260138eff6ba20037f3017b24cbe4b0fae03 (diff)
downloadgcc-89066f10f5dbb9e6192cd2ae29ec0f6815ce1d60.tar.gz
RuleBasedCollator.java (clone): Rewrote.
* java/text/RuleBasedCollator.java (clone): Rewrote. (RuleBasedCollator(RuleBasedCollator)): Removed. * java/text/MessageFormat.java: Re-merged from Classpath. * java/text/DecimalFormat.java: Re-merged from Classpath. From-SVN: r45458
Diffstat (limited to 'libjava/java/text/RuleBasedCollator.java')
-rw-r--r--libjava/java/text/RuleBasedCollator.java18
1 files changed, 5 insertions, 13 deletions
diff --git a/libjava/java/text/RuleBasedCollator.java b/libjava/java/text/RuleBasedCollator.java
index dde09572923..e8662a827a6 100644
--- a/libjava/java/text/RuleBasedCollator.java
+++ b/libjava/java/text/RuleBasedCollator.java
@@ -1,6 +1,6 @@
// RuleBasedCollator.java - Concrete class for locale-based string compare.
-/* Copyright (C) 1999, 2000 Free Software Foundation
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation
This file is part of libgcj.
@@ -39,7 +39,10 @@ public class RuleBasedCollator extends Collator
{
public Object clone ()
{
- return new RuleBasedCollator (this);
+ RuleBasedCollator c = (RuleBasedCollator) super.clone ();
+ c.map = (Hashtable) map.clone ();
+ c.prefixes = (Hashtable) map.clone ();
+ return c;
}
// A helper for CollationElementIterator.next().
@@ -352,17 +355,6 @@ public class RuleBasedCollator extends Collator
}
}
- // This is a helper for clone.
- private RuleBasedCollator (RuleBasedCollator other)
- {
- frenchAccents = other.frenchAccents;
- rules = other.rules;
- decmp = other.decmp;
- strength = other.strength;
- map = other.map;
- prefixes = other.prefixes;
- }
-
// True if we are using French-style accent ordering.
private boolean frenchAccents;