src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ReferencePropertyInfoImpl.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -62,11 +62,11 @@
/**
* Lazily computed.
* @see #getElements()
*/
private Set<Element<T,C>> types;
- private Set<PropertyInfoImpl<T,C,F,M>> subTypes = new LinkedHashSet<PropertyInfoImpl<T,C,F,M>>();
+ private Set<ReferencePropertyInfoImpl<T,C,F,M>> subTypes = new LinkedHashSet<ReferencePropertyInfoImpl<T,C,F,M>>();
private final boolean isMixed;
private final WildcardMode wildcard;
private final C domHandler;
@@ -184,14 +184,11 @@
return;
}
}
}
- Iterator<PropertyInfoImpl<T,C,F,M>> i = subTypes.iterator();
- while (i.hasNext()) {
-
- ReferencePropertyInfoImpl<T,C,F,M> info = (ReferencePropertyInfoImpl<T, C, F, M>) i.next();
+ for (ReferencePropertyInfoImpl<T, C, F, M> info : subTypes) {
PropertySeed sd = info.seed;
refs = sd.readAnnotation(XmlElementRefs.class);
ref = sd.readAnnotation(XmlElementRef.class);
if (refs != null && ref != null) {
@@ -375,11 +372,12 @@
calcTypes(true);
}
public final void addType(PropertyInfoImpl<T,C,F,M> info) {
- subTypes.add(info);
+ //noinspection unchecked
+ subTypes.add((ReferencePropertyInfoImpl)info);
}
public final boolean isMixed() {
return isMixed;
}