From 1e3e09232681ba840b4d17a47960cca3f4aa1ddd Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Thu, 23 Feb 2012 14:03:58 -0600 Subject: [PATCH] Fix unchecked warnings in clone() --- runtime/Java/src/org/antlr/v4/runtime/misc/OrderedHashSet.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/Java/src/org/antlr/v4/runtime/misc/OrderedHashSet.java b/runtime/Java/src/org/antlr/v4/runtime/misc/OrderedHashSet.java index 9eddf5f79..8b88529e2 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/misc/OrderedHashSet.java +++ b/runtime/Java/src/org/antlr/v4/runtime/misc/OrderedHashSet.java @@ -114,8 +114,9 @@ public class OrderedHashSet extends LinkedHashSet { @Override public Object clone() { + @SuppressWarnings("unchecked") OrderedHashSet dup = (OrderedHashSet)super.clone(); - dup.elements = (ArrayList)this.elements.clone(); + dup.elements = new ArrayList(this.elements); return dup; }