src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ReferencePropertyInfoImpl.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
     1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ReferencePropertyInfoImpl.java	Thu Apr 04 19:05:24 2013 -0700
     1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ReferencePropertyInfoImpl.java	Tue Apr 09 14:51:13 2013 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -64,7 +64,7 @@
    1.11       * @see #getElements()
    1.12       */
    1.13      private Set<Element<T,C>> types;
    1.14 -    private Set<PropertyInfoImpl<T,C,F,M>> subTypes = new LinkedHashSet<PropertyInfoImpl<T,C,F,M>>();
    1.15 +    private Set<ReferencePropertyInfoImpl<T,C,F,M>> subTypes = new LinkedHashSet<ReferencePropertyInfoImpl<T,C,F,M>>();
    1.16  
    1.17      private final boolean isMixed;
    1.18  
    1.19 @@ -186,10 +186,7 @@
    1.20              }
    1.21          }
    1.22  
    1.23 -        Iterator<PropertyInfoImpl<T,C,F,M>> i = subTypes.iterator();
    1.24 -        while (i.hasNext()) {
    1.25 -
    1.26 -            ReferencePropertyInfoImpl<T,C,F,M> info = (ReferencePropertyInfoImpl<T, C, F, M>) i.next();
    1.27 +        for (ReferencePropertyInfoImpl<T, C, F, M> info : subTypes) {
    1.28              PropertySeed sd = info.seed;
    1.29              refs = sd.readAnnotation(XmlElementRefs.class);
    1.30              ref = sd.readAnnotation(XmlElementRef.class);
    1.31 @@ -377,7 +374,8 @@
    1.32      }
    1.33  
    1.34      public final void addType(PropertyInfoImpl<T,C,F,M> info) {
    1.35 -        subTypes.add(info);
    1.36 +        //noinspection unchecked
    1.37 +        subTypes.add((ReferencePropertyInfoImpl)info);
    1.38      }
    1.39  
    1.40      public final boolean isMixed() {

mercurial