Blame 0001-Avoid-unnecessary-dep-on-istack-commons.patch

b3e941f
From c8d1de91c950a80508e23b791c475bca9b377616 Mon Sep 17 00:00:00 2001
b3e941f
From: Mat Booth <mat.booth@redhat.com>
b3e941f
Date: Fri, 10 May 2019 10:40:17 +0100
b3e941f
Subject: [PATCH 1/2] Avoid unnecessary dep on istack-commons
b3e941f
b3e941f
---
b3e941f
 core/pom.xml                                  |   6 +-
b3e941f
 .../sun/xml/bind/marshaller/SAX2DOMEx.java    |   4 +-
b3e941f
 .../v2/model/annotation/AnnotationReader.java |   4 -
b3e941f
 .../xml/bind/v2/model/core/PropertyInfo.java  |   3 +-
b3e941f
 .../java/com/sun/xml/bind/api/Bridge.java     |  54 ++++----
b3e941f
 .../com/sun/xml/bind/api/ClassResolver.java   |   4 +-
b3e941f
 .../com/sun/xml/bind/api/JAXBRIContext.java   |  52 ++++---
b3e941f
 .../com/sun/xml/bind/v2/ContextFactory.java   |   6 +-
b3e941f
 .../v2/model/impl/ByteArrayDataSource.java    |  95 +++++++++++++
b3e941f
 .../xml/bind/v2/model/impl/ClassInfoImpl.java |   8 +-
b3e941f
 .../bind/v2/model/impl/ElementInfoImpl.java   |   6 +-
b3e941f
 .../model/impl/ElementPropertyInfoImpl.java   |   4 +-
b3e941f
 .../impl/RuntimeBuiltinLeafInfoImpl.java      |   1 -
b3e941f
 .../v2/model/impl/RuntimeClassInfoImpl.java   |   3 +-
b3e941f
 .../v2/model/impl/RuntimeModelBuilder.java    |   3 +-
b3e941f
 .../xml/bind/v2/runtime/BridgeAdapter.java    |  11 +-
b3e941f
 .../sun/xml/bind/v2/runtime/BridgeImpl.java   |   9 +-
b3e941f
 .../bind/v2/runtime/ClassBeanInfoImpl.java    |   6 +-
b3e941f
 .../v2/runtime/ContentHandlerAdaptor.java     |  14 +-
b3e941f
 .../xml/bind/v2/runtime/FilterTransducer.java |   3 +-
b3e941f
 .../v2/runtime/InlineBinaryTransducer.java    |   3 +-
b3e941f
 .../xml/bind/v2/runtime/JAXBContextImpl.java  |  16 +--
b3e941f
 .../sun/xml/bind/v2/runtime/JaxBeanInfo.java  |   3 +-
b3e941f
 .../bind/v2/runtime/NamespaceContext2.java    |   3 +-
b3e941f
 .../com/sun/xml/bind/v2/runtime/Pool.java     | 131 ++++++++++++++++++
b3e941f
 .../sun/xml/bind/v2/runtime/Transducer.java   |   7 +-
b3e941f
 .../v2/runtime/ValueListBeanInfoImpl.java     |   4 +-
b3e941f
 .../xml/bind/v2/runtime/XMLSerializer.java    |  12 +-
b3e941f
 .../bind/v2/runtime/output/C14nXmlOutput.java |   4 +-
b3e941f
 .../runtime/output/NamespaceContextImpl.java  |   6 +-
b3e941f
 .../xml/bind/v2/runtime/reflect/Accessor.java |   3 +-
b3e941f
 .../xml/bind/v2/runtime/reflect/Lister.java   |   4 +-
b3e941f
 .../runtime/reflect/TransducedAccessor.java   |  10 +-
b3e941f
 .../v2/runtime/unmarshaller/Base64Data.java   |   7 +-
b3e941f
 .../unmarshaller/UnmarshallingContext.java    |  12 +-
b3e941f
 .../runtime/unmarshaller/XsiTypeLoader.java   |   3 +-
b3e941f
 .../bind/v2/schemagen/XmlSchemaGenerator.java |   6 +-
b3e941f
 37 files changed, 359 insertions(+), 171 deletions(-)
b3e941f
 create mode 100644 runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ByteArrayDataSource.java
b3e941f
 create mode 100644 runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/Pool.java
b3e941f
b3e941f
diff --git a/core/pom.xml b/core/pom.xml
b3e941f
index 10be5d6..6330d8a 100644
b3e941f
--- a/core/pom.xml
b3e941f
+++ b/core/pom.xml
b3e941f
@@ -67,10 +67,6 @@ holder.
b3e941f
             <artifactId>txw2</artifactId>
b3e941f
             <version>${project.version}</version>
b3e941f
         </dependency>
b3e941f
-        <dependency>
b3e941f
-            <groupId>com.sun.istack</groupId>
b3e941f
-            <artifactId>istack-commons-runtime</artifactId>
b3e941f
-        </dependency>
b3e941f
     </dependencies>
b3e941f
 
b3e941f
-</project>
b3e941f
\ No newline at end of file
b3e941f
+</project>
b3e941f
diff --git a/core/src/main/java/com/sun/xml/bind/marshaller/SAX2DOMEx.java b/core/src/main/java/com/sun/xml/bind/marshaller/SAX2DOMEx.java
b3e941f
index fd63b6b..0b97a47 100644
b3e941f
--- a/core/src/main/java/com/sun/xml/bind/marshaller/SAX2DOMEx.java
b3e941f
+++ b/core/src/main/java/com/sun/xml/bind/marshaller/SAX2DOMEx.java
b3e941f
@@ -46,7 +46,7 @@ import javax.xml.parsers.DocumentBuilderFactory;
b3e941f
 import javax.xml.parsers.ParserConfigurationException;
b3e941f
 
b3e941f
 import com.sun.xml.bind.util.Which;
b3e941f
-import com.sun.istack.FinalArrayList;
b3e941f
+import java.util.ArrayList;
b3e941f
 
b3e941f
 import com.sun.xml.bind.v2.util.XmlFactory;
b3e941f
 import org.w3c.dom.Document;
b3e941f
@@ -68,7 +68,7 @@ public class SAX2DOMEx implements ContentHandler {
b3e941f
     private Node node = null;
b3e941f
     private boolean isConsolidate;
b3e941f
     protected final Stack<Node> nodeStack = new Stack<Node>();
b3e941f
-    private final FinalArrayList<String> unprocessedNamespaces = new FinalArrayList<String>();
b3e941f
+    private final ArrayList<String> unprocessedNamespaces = new ArrayList<String>();
b3e941f
     /**
b3e941f
      * Document object that owns the specified node.
b3e941f
      */
b3e941f
diff --git a/core/src/main/java/com/sun/xml/bind/v2/model/annotation/AnnotationReader.java b/core/src/main/java/com/sun/xml/bind/v2/model/annotation/AnnotationReader.java
b3e941f
index 744d806..a5e5623 100644
b3e941f
--- a/core/src/main/java/com/sun/xml/bind/v2/model/annotation/AnnotationReader.java
b3e941f
+++ b/core/src/main/java/com/sun/xml/bind/v2/model/annotation/AnnotationReader.java
b3e941f
@@ -44,7 +44,6 @@ import java.lang.annotation.Annotation;
b3e941f
 import java.lang.reflect.Field;
b3e941f
 import java.lang.reflect.Method;
b3e941f
 
b3e941f
-import com.sun.istack.Nullable;
b3e941f
 import com.sun.xml.bind.v2.model.core.ErrorHandler;
b3e941f
 
b3e941f
 /**
b3e941f
@@ -140,20 +139,17 @@ public interface AnnotationReader<T,C,F,M> {
b3e941f
      * @return null
b3e941f
      *      if the annotation was not found.
b3e941f
      */
b3e941f
-    @Nullable
b3e941f
      A getMethodParameterAnnotation(
b3e941f
             Class annotation, M method, int paramIndex, Locatable srcPos );
b3e941f
 
b3e941f
     /**
b3e941f
      * Reads an annotation on a class.
b3e941f
      */
b3e941f
-    @Nullable
b3e941f
      A getClassAnnotation(Class annotation, C clazz, Locatable srcpos) ;
b3e941f
 
b3e941f
     /**
b3e941f
      * Reads an annotation on the package that the given class belongs to.
b3e941f
      */
b3e941f
-    @Nullable
b3e941f
      A getPackageAnnotation(Class annotation, C clazz, Locatable srcpos);
b3e941f
 
b3e941f
     /**
b3e941f
diff --git a/core/src/main/java/com/sun/xml/bind/v2/model/core/PropertyInfo.java b/core/src/main/java/com/sun/xml/bind/v2/model/core/PropertyInfo.java
b3e941f
index badcdd6..f483fea 100644
b3e941f
--- a/core/src/main/java/com/sun/xml/bind/v2/model/core/PropertyInfo.java
b3e941f
+++ b/core/src/main/java/com/sun/xml/bind/v2/model/core/PropertyInfo.java
b3e941f
@@ -49,7 +49,6 @@ import javax.xml.bind.annotation.XmlType;
b3e941f
 import javax.xml.bind.annotation.XmlSchemaType;
b3e941f
 import javax.xml.namespace.QName;
b3e941f
 
b3e941f
-import com.sun.istack.Nullable;
b3e941f
 import com.sun.xml.bind.v2.model.annotation.AnnotationSource;
b3e941f
 
b3e941f
 /**
b3e941f
@@ -163,5 +162,5 @@ public interface PropertyInfo<T,C> extends AnnotationSource {
b3e941f
      * when this returns non-null, it overrides the type names of all types
b3e941f
      * that are in this property.)
b3e941f
      */
b3e941f
-    @Nullable QName getSchemaType();
b3e941f
+    QName getSchemaType();
b3e941f
 }
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/api/Bridge.java b/runtime/impl/src/main/java/com/sun/xml/bind/api/Bridge.java
b3e941f
index 23a688b..e7aba9e 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/api/Bridge.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/api/Bridge.java
b3e941f
@@ -54,8 +54,6 @@ import javax.xml.stream.XMLStreamWriter;
b3e941f
 import javax.xml.transform.Result;
b3e941f
 import javax.xml.transform.Source;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
-import com.sun.istack.Nullable;
b3e941f
 import com.sun.xml.bind.v2.runtime.BridgeContextImpl;
b3e941f
 import com.sun.xml.bind.v2.runtime.JAXBContextImpl;
b3e941f
 
b3e941f
@@ -91,7 +89,7 @@ public abstract class Bridge<T> {
b3e941f
      *
b3e941f
      * @since 2.1
b3e941f
      */
b3e941f
-    public @NotNull JAXBRIContext getContext() {
b3e941f
+    public  JAXBRIContext getContext() {
b3e941f
         return context;
b3e941f
     }
b3e941f
 
b3e941f
@@ -113,11 +111,11 @@ public abstract class Bridge<T> {
b3e941f
         context.marshallerPool.recycle(m);
b3e941f
     }
b3e941f
 
b3e941f
-    public final void marshal(@NotNull BridgeContext context,T object,XMLStreamWriter output) throws JAXBException {
b3e941f
+    public final void marshal( BridgeContext context,T object,XMLStreamWriter output) throws JAXBException {
b3e941f
         marshal( ((BridgeContextImpl)context).marshaller, object, output );
b3e941f
     }
b3e941f
 
b3e941f
-    public abstract void marshal(@NotNull Marshaller m,T object,XMLStreamWriter output) throws JAXBException;
b3e941f
+    public abstract void marshal( Marshaller m,T object,XMLStreamWriter output) throws JAXBException;
b3e941f
 
b3e941f
 
b3e941f
     /**
b3e941f
@@ -147,11 +145,11 @@ public abstract class Bridge<T> {
b3e941f
         context.marshallerPool.recycle(m);
b3e941f
     }
b3e941f
 
b3e941f
-    public final void marshal(@NotNull BridgeContext context,T object,OutputStream output, NamespaceContext nsContext) throws JAXBException {
b3e941f
+    public final void marshal( BridgeContext context,T object,OutputStream output, NamespaceContext nsContext) throws JAXBException {
b3e941f
         marshal( ((BridgeContextImpl)context).marshaller, object, output, nsContext );
b3e941f
     }
b3e941f
 
b3e941f
-    public abstract void marshal(@NotNull Marshaller m,T object,OutputStream output, NamespaceContext nsContext) throws JAXBException;
b3e941f
+    public abstract void marshal( Marshaller m,T object,OutputStream output, NamespaceContext nsContext) throws JAXBException;
b3e941f
 
b3e941f
 
b3e941f
     public final void marshal(T object,Node output) throws JAXBException {
b3e941f
@@ -160,11 +158,11 @@ public abstract class Bridge<T> {
b3e941f
         context.marshallerPool.recycle(m);
b3e941f
     }
b3e941f
 
b3e941f
-    public final void marshal(@NotNull BridgeContext context,T object,Node output) throws JAXBException {
b3e941f
+    public final void marshal( BridgeContext context,T object,Node output) throws JAXBException {
b3e941f
         marshal( ((BridgeContextImpl)context).marshaller, object, output );
b3e941f
     }
b3e941f
 
b3e941f
-    public abstract void marshal(@NotNull Marshaller m,T object,Node output) throws JAXBException;
b3e941f
+    public abstract void marshal( Marshaller m,T object,Node output) throws JAXBException;
b3e941f
 
b3e941f
 
b3e941f
     /**
b3e941f
@@ -183,10 +181,10 @@ public abstract class Bridge<T> {
b3e941f
         m.setAttachmentMarshaller(null);
b3e941f
         context.marshallerPool.recycle(m);
b3e941f
     }
b3e941f
-    public final void marshal(@NotNull BridgeContext context,T object, ContentHandler contentHandler) throws JAXBException {
b3e941f
+    public final void marshal( BridgeContext context,T object, ContentHandler contentHandler) throws JAXBException {
b3e941f
         marshal( ((BridgeContextImpl)context).marshaller, object, contentHandler );
b3e941f
     }
b3e941f
-    public abstract void marshal(@NotNull Marshaller m,T object, ContentHandler contentHandler) throws JAXBException;
b3e941f
+    public abstract void marshal( Marshaller m,T object, ContentHandler contentHandler) throws JAXBException;
b3e941f
 
b3e941f
     /**
b3e941f
      * @since 2.0 EA4
b3e941f
@@ -196,10 +194,10 @@ public abstract class Bridge<T> {
b3e941f
         marshal(m,object,result);
b3e941f
         context.marshallerPool.recycle(m);
b3e941f
     }
b3e941f
-    public final void marshal(@NotNull BridgeContext context,T object, Result result) throws JAXBException {
b3e941f
+    public final void marshal( BridgeContext context,T object, Result result) throws JAXBException {
b3e941f
         marshal( ((BridgeContextImpl)context).marshaller, object, result );
b3e941f
     }
b3e941f
-    public abstract void marshal(@NotNull Marshaller m,T object, Result result) throws JAXBException;
b3e941f
+    public abstract void marshal( Marshaller m,T object, Result result) throws JAXBException;
b3e941f
 
b3e941f
 
b3e941f
 
b3e941f
@@ -225,21 +223,21 @@ public abstract class Bridge<T> {
b3e941f
      *
b3e941f
      * @since 2.0 EA1
b3e941f
      */
b3e941f
-    public final @NotNull T unmarshal(@NotNull XMLStreamReader in) throws JAXBException {
b3e941f
+    public final  T unmarshal( XMLStreamReader in) throws JAXBException {
b3e941f
         return unmarshal(in,null);
b3e941f
     }
b3e941f
     /**
b3e941f
      * @since 2.0.3
b3e941f
      */
b3e941f
-    public final @NotNull T unmarshal(@NotNull XMLStreamReader in, @Nullable AttachmentUnmarshaller au) throws JAXBException {
b3e941f
+    public final  T unmarshal( XMLStreamReader in,  AttachmentUnmarshaller au) throws JAXBException {
b3e941f
         Unmarshaller u = context.unmarshallerPool.take();
b3e941f
         u.setAttachmentUnmarshaller(au);
b3e941f
         return exit(unmarshal(u,in),u);
b3e941f
     }
b3e941f
-    public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull XMLStreamReader in) throws JAXBException {
b3e941f
+    public final  T unmarshal( BridgeContext context,  XMLStreamReader in) throws JAXBException {
b3e941f
         return unmarshal( ((BridgeContextImpl)context).unmarshaller, in );
b3e941f
     }
b3e941f
-    public abstract @NotNull T unmarshal(@NotNull Unmarshaller u, @NotNull XMLStreamReader in) throws JAXBException;
b3e941f
+    public abstract  T unmarshal( Unmarshaller u,  XMLStreamReader in) throws JAXBException;
b3e941f
 
b3e941f
     /**
b3e941f
      * Unmarshals the specified type object.
b3e941f
@@ -257,21 +255,21 @@ public abstract class Bridge<T> {
b3e941f
      *
b3e941f
      * @since 2.0 EA1
b3e941f
      */
b3e941f
-    public final @NotNull T unmarshal(@NotNull Source in) throws JAXBException {
b3e941f
+    public final  T unmarshal( Source in) throws JAXBException {
b3e941f
         return unmarshal(in,null);
b3e941f
     }
b3e941f
     /**
b3e941f
      * @since 2.0.3
b3e941f
      */
b3e941f
-    public final @NotNull T unmarshal(@NotNull Source in, @Nullable AttachmentUnmarshaller au) throws JAXBException {
b3e941f
+    public final  T unmarshal( Source in,  AttachmentUnmarshaller au) throws JAXBException {
b3e941f
         Unmarshaller u = context.unmarshallerPool.take();
b3e941f
         u.setAttachmentUnmarshaller(au);
b3e941f
         return exit(unmarshal(u,in),u);
b3e941f
     }
b3e941f
-    public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull Source in) throws JAXBException {
b3e941f
+    public final  T unmarshal( BridgeContext context,  Source in) throws JAXBException {
b3e941f
         return unmarshal( ((BridgeContextImpl)context).unmarshaller, in );
b3e941f
     }
b3e941f
-    public abstract @NotNull T unmarshal(@NotNull Unmarshaller u, @NotNull Source in) throws JAXBException;
b3e941f
+    public abstract  T unmarshal( Unmarshaller u,  Source in) throws JAXBException;
b3e941f
 
b3e941f
     /**
b3e941f
      * Unmarshals the specified type object.
b3e941f
@@ -289,14 +287,14 @@ public abstract class Bridge<T> {
b3e941f
      *
b3e941f
      * @since 2.0 EA1
b3e941f
      */
b3e941f
-    public final @NotNull T unmarshal(@NotNull InputStream in) throws JAXBException {
b3e941f
+    public final  T unmarshal( InputStream in) throws JAXBException {
b3e941f
         Unmarshaller u = context.unmarshallerPool.take();
b3e941f
         return exit(unmarshal(u,in),u);
b3e941f
     }
b3e941f
-    public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull InputStream in) throws JAXBException {
b3e941f
+    public final  T unmarshal( BridgeContext context,  InputStream in) throws JAXBException {
b3e941f
         return unmarshal( ((BridgeContextImpl)context).unmarshaller, in );
b3e941f
     }
b3e941f
-    public abstract @NotNull T unmarshal(@NotNull Unmarshaller u, @NotNull InputStream in) throws JAXBException;
b3e941f
+    public abstract  T unmarshal( Unmarshaller u,  InputStream in) throws JAXBException;
b3e941f
 
b3e941f
     /**
b3e941f
      * Unmarshals the specified type object.
b3e941f
@@ -312,21 +310,21 @@ public abstract class Bridge<T> {
b3e941f
      *
b3e941f
      * @since 2.0 FCS
b3e941f
      */
b3e941f
-    public final @NotNull T unmarshal(@NotNull Node n) throws JAXBException {
b3e941f
+    public final  T unmarshal( Node n) throws JAXBException {
b3e941f
         return unmarshal(n,null);
b3e941f
     }
b3e941f
     /**
b3e941f
      * @since 2.0.3
b3e941f
      */
b3e941f
-    public final @NotNull T unmarshal(@NotNull Node n, @Nullable AttachmentUnmarshaller au) throws JAXBException {
b3e941f
+    public final  T unmarshal( Node n,  AttachmentUnmarshaller au) throws JAXBException {
b3e941f
         Unmarshaller u = context.unmarshallerPool.take();
b3e941f
         u.setAttachmentUnmarshaller(au);
b3e941f
         return exit(unmarshal(u,n),u);
b3e941f
     }
b3e941f
-    public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull Node n) throws JAXBException {
b3e941f
+    public final  T unmarshal( BridgeContext context,  Node n) throws JAXBException {
b3e941f
         return unmarshal( ((BridgeContextImpl)context).unmarshaller, n );
b3e941f
     }
b3e941f
-    public abstract @NotNull T unmarshal(@NotNull Unmarshaller context, @NotNull Node n) throws JAXBException;
b3e941f
+    public abstract  T unmarshal( Unmarshaller context,  Node n) throws JAXBException;
b3e941f
 
b3e941f
     /**
b3e941f
      * Gets the {@link TypeReference} from which this bridge was created.
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/api/ClassResolver.java b/runtime/impl/src/main/java/com/sun/xml/bind/api/ClassResolver.java
b3e941f
index 37bbf61..659f5a3 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/api/ClassResolver.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/api/ClassResolver.java
b3e941f
@@ -45,8 +45,6 @@ import javax.xml.bind.Unmarshaller;
b3e941f
 import javax.xml.bind.ValidationEventHandler;
b3e941f
 import javax.xml.bind.annotation.XmlAnyElement;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
-import com.sun.istack.Nullable;
b3e941f
 
b3e941f
 /**
b3e941f
  * Dynamically locates classes to represent elements discovered during the unmarshalling.
b3e941f
@@ -115,5 +113,5 @@ public abstract class ClassResolver {
b3e941f
      *      reproted to {@link ValidationEventHandler} (just like any other error
b3e941f
      *      during the unmarshalling.)
b3e941f
      */
b3e941f
-    public abstract @Nullable Class resolveElementName(@NotNull String nsUri, @NotNull String localName) throws Exception;
b3e941f
+    public abstract  Class resolveElementName( String nsUri,  String localName) throws Exception;
b3e941f
 }
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/api/JAXBRIContext.java b/runtime/impl/src/main/java/com/sun/xml/bind/api/JAXBRIContext.java
b3e941f
index 05a2b4d..814b291 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/api/JAXBRIContext.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/api/JAXBRIContext.java
b3e941f
@@ -55,8 +55,6 @@ import javax.xml.bind.annotation.XmlAttachmentRef;
b3e941f
 import javax.xml.namespace.QName;
b3e941f
 import javax.xml.transform.Result;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
-import com.sun.istack.Nullable;
b3e941f
 import com.sun.xml.bind.api.impl.NameConverter;
b3e941f
 import com.sun.xml.bind.v2.ContextFactory;
b3e941f
 import com.sun.xml.bind.v2.model.annotation.RuntimeAnnotationReader;
b3e941f
@@ -103,11 +101,11 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      *      Can be null.
b3e941f
      * @since JAXB 2.1 EA2
b3e941f
      */
b3e941f
-    public static JAXBRIContext newInstance(@NotNull Class[] classes,
b3e941f
-       @Nullable Collection<TypeReference> typeRefs,
b3e941f
-       @Nullable Map<Class,Class> subclassReplacements,
b3e941f
-       @Nullable String defaultNamespaceRemap, boolean c14nSupport,
b3e941f
-       @Nullable RuntimeAnnotationReader ar) throws JAXBException {
b3e941f
+    public static JAXBRIContext newInstance( Class[] classes,
b3e941f
+        Collection<TypeReference> typeRefs,
b3e941f
+        Map<Class,Class> subclassReplacements,
b3e941f
+        String defaultNamespaceRemap, boolean c14nSupport,
b3e941f
+        RuntimeAnnotationReader ar) throws JAXBException {
b3e941f
         return newInstance(classes, typeRefs, subclassReplacements,
b3e941f
                 defaultNamespaceRemap, c14nSupport, ar, false, false, false, false);
b3e941f
     }
b3e941f
@@ -145,11 +143,11 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      * @param supressAccessorWarnings
b3e941f
      *      See {@link #SUPRESS_ACCESSOR_WARNINGS} for the meaning of this parameter.
b3e941f
      */
b3e941f
-    public static JAXBRIContext newInstance(@NotNull Class[] classes,
b3e941f
-       @Nullable Collection<TypeReference> typeRefs,
b3e941f
-       @Nullable Map<Class,Class> subclassReplacements,
b3e941f
-       @Nullable String defaultNamespaceRemap, boolean c14nSupport,
b3e941f
-       @Nullable RuntimeAnnotationReader ar,
b3e941f
+    public static JAXBRIContext newInstance( Class[] classes,
b3e941f
+        Collection<TypeReference> typeRefs,
b3e941f
+        Map<Class,Class> subclassReplacements,
b3e941f
+        String defaultNamespaceRemap, boolean c14nSupport,
b3e941f
+        RuntimeAnnotationReader ar,
b3e941f
        boolean xmlAccessorFactorySupport, 
b3e941f
        boolean allNillable, 
b3e941f
        boolean retainPropertyInfo, 
b3e941f
@@ -171,9 +169,9 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      * @deprecated
b3e941f
      *      Compatibility with older versions.
b3e941f
      */
b3e941f
-    public static JAXBRIContext newInstance(@NotNull Class[] classes,
b3e941f
-        @Nullable Collection<TypeReference> typeRefs,
b3e941f
-        @Nullable String defaultNamespaceRemap, boolean c14nSupport ) throws JAXBException {
b3e941f
+    public static JAXBRIContext newInstance( Class[] classes,
b3e941f
+         Collection<TypeReference> typeRefs,
b3e941f
+         String defaultNamespaceRemap, boolean c14nSupport ) throws JAXBException {
b3e941f
         return newInstance(classes,typeRefs, Collections.<Class,Class>emptyMap(),
b3e941f
                 defaultNamespaceRemap,c14nSupport,null);
b3e941f
     }
b3e941f
@@ -197,7 +195,7 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      *
b3e941f
      * @since 2.0 EA1
b3e941f
      */
b3e941f
-    public abstract @Nullable QName getElementName(@NotNull Object o) throws JAXBException;
b3e941f
+    public abstract  QName getElementName( Object o) throws JAXBException;
b3e941f
 
b3e941f
     /**
b3e941f
      * Allows to retrieve the element name based on Class.
b3e941f
@@ -206,7 +204,7 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      * @throws javax.xml.bind.JAXBException
b3e941f
      * @since 2.1.10
b3e941f
      */
b3e941f
-    public abstract @Nullable QName getElementName(@NotNull Class o) throws JAXBException;
b3e941f
+    public abstract  QName getElementName( Class o) throws JAXBException;
b3e941f
 
b3e941f
     /**
b3e941f
      * Creates a mini-marshaller/unmarshaller that can process a {@link TypeReference}.
b3e941f
@@ -216,7 +214,7 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      *
b3e941f
      * @since 2.0 EA1
b3e941f
      */
b3e941f
-    public abstract Bridge createBridge(@NotNull TypeReference ref);
b3e941f
+    public abstract Bridge createBridge( TypeReference ref);
b3e941f
 
b3e941f
     /**
b3e941f
      * Creates a new {@link BridgeContext} instance.
b3e941f
@@ -226,7 +224,7 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      *
b3e941f
      * @since 2.0 EA1
b3e941f
      */
b3e941f
-    public abstract @NotNull BridgeContext createBridgeContext();
b3e941f
+    public abstract  BridgeContext createBridgeContext();
b3e941f
 
b3e941f
     /**
b3e941f
      * Gets a {@link RawAccessor} for the specified element property of the specified wrapper bean class.
b3e941f
@@ -274,7 +272,7 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      *
b3e941f
      * @since 2.0 EA2
b3e941f
      */
b3e941f
-    public abstract @NotNull List<String> getKnownNamespaceURIs();
b3e941f
+    public abstract  List<String> getKnownNamespaceURIs();
b3e941f
 
b3e941f
 
b3e941f
     /**
b3e941f
@@ -302,7 +300,7 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      *      if {@link SchemaOutputResolver} throws an {@link IOException}.
b3e941f
      */
b3e941f
     @Override
b3e941f
-    public abstract void generateSchema(@NotNull SchemaOutputResolver outputResolver) throws IOException;
b3e941f
+    public abstract void generateSchema( SchemaOutputResolver outputResolver) throws IOException;
b3e941f
 
b3e941f
     /**
b3e941f
      * Returns the name of the XML Type bound to the
b3e941f
@@ -319,7 +317,7 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      * @return null
b3e941f
      *      if the referenced type is an anonymous and therefore doesn't have a name.
b3e941f
      */
b3e941f
-    public abstract QName getTypeName(@NotNull TypeReference tr);
b3e941f
+    public abstract QName getTypeName( TypeReference tr);
b3e941f
 
b3e941f
     /**
b3e941f
      * Gets the build information of the JAXB runtime.
b3e941f
@@ -328,7 +326,7 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      *      may be null, if the runtime is loaded by a class loader that doesn't support
b3e941f
      *      the access to the manifest informatino.
b3e941f
      */
b3e941f
-    public abstract @NotNull String getBuildId();
b3e941f
+    public abstract  String getBuildId();
b3e941f
 
b3e941f
     /**
b3e941f
      * Generates the episode file that represents the binding known to this {@link JAXBContext},
b3e941f
@@ -372,7 +370,7 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      * @return
b3e941f
      *      Typically, this method returns "nameLikeThis".
b3e941f
      */
b3e941f
-    public static @NotNull String mangleNameToVariableName(@NotNull String localName) {
b3e941f
+    public static  String mangleNameToVariableName( String localName) {
b3e941f
         return NameConverter.standard.toVariableName(localName);
b3e941f
     }
b3e941f
 
b3e941f
@@ -385,7 +383,7 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      * @return
b3e941f
      *      Typically, this method returns "NameLikeThis".
b3e941f
      */
b3e941f
-    public static @NotNull String mangleNameToClassName(@NotNull String localName) {
b3e941f
+    public static  String mangleNameToClassName( String localName) {
b3e941f
         return NameConverter.standard.toClassName(localName);
b3e941f
     }
b3e941f
 
b3e941f
@@ -400,7 +398,7 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      * @return
b3e941f
      *      Typically, this method returns "NameLikeThis".
b3e941f
      */
b3e941f
-    public static @NotNull String mangleNameToPropertyName(@NotNull String localName) {
b3e941f
+    public static  String mangleNameToPropertyName( String localName) {
b3e941f
         return NameConverter.standard.toPropertyName(localName);
b3e941f
     }
b3e941f
 
b3e941f
@@ -430,7 +428,7 @@ public abstract class JAXBRIContext extends JAXBContext {
b3e941f
      *      or null if the type is not assignable to the base type.
b3e941f
      * @since 2.0 FCS
b3e941f
      */
b3e941f
-    public static @Nullable Type getBaseType(@NotNull Type type, @NotNull Class baseType) {
b3e941f
+    public static  Type getBaseType( Type type,  Class baseType) {
b3e941f
         return Utils.REFLECTION_NAVIGATOR.getBaseClass(type, baseType);
b3e941f
     }
b3e941f
 
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/ContextFactory.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/ContextFactory.java
b3e941f
index 94dce69..879dedb 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/ContextFactory.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/ContextFactory.java
b3e941f
@@ -55,7 +55,7 @@ import java.util.logging.Level;
b3e941f
 import javax.xml.bind.JAXBContext;
b3e941f
 import javax.xml.bind.JAXBException;
b3e941f
 
b3e941f
-import com.sun.istack.FinalArrayList;
b3e941f
+import java.util.ArrayList;
b3e941f
 import com.sun.xml.bind.Util;
b3e941f
 import com.sun.xml.bind.api.JAXBRIContext;
b3e941f
 import com.sun.xml.bind.api.TypeReference;
b3e941f
@@ -243,7 +243,7 @@ public class ContextFactory {
b3e941f
      */
b3e941f
     public static JAXBContext createContext( String contextPath,
b3e941f
                                              ClassLoader classLoader, Map<String,Object> properties ) throws JAXBException {
b3e941f
-        FinalArrayList<Class> classes = new FinalArrayList<Class>();
b3e941f
+        ArrayList<Class> classes = new ArrayList<Class>();
b3e941f
         StringTokenizer tokens = new StringTokenizer(contextPath,":");
b3e941f
         List<Class> indexedClasses;
b3e941f
 
b3e941f
@@ -306,7 +306,7 @@ public class ContextFactory {
b3e941f
         BufferedReader in =
b3e941f
                 new BufferedReader(new InputStreamReader(resourceAsStream, "UTF-8"));
b3e941f
         try {
b3e941f
-            FinalArrayList<Class> classes = new FinalArrayList<Class>();
b3e941f
+            ArrayList<Class> classes = new ArrayList<Class>();
b3e941f
             String className = in.readLine();
b3e941f
             while (className != null) {
b3e941f
                 className = className.trim();
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ByteArrayDataSource.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ByteArrayDataSource.java
b3e941f
new file mode 100644
b3e941f
index 0000000..9c46637
b3e941f
--- /dev/null
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ByteArrayDataSource.java
b3e941f
@@ -0,0 +1,95 @@
b3e941f
+/*
b3e941f
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
b3e941f
+ *
b3e941f
+ * Copyright (c) 1997-2014 Oracle and/or its affiliates. All rights reserved.
b3e941f
+ *
b3e941f
+ * The contents of this file are subject to the terms of either the GNU
b3e941f
+ * General Public License Version 2 only ("GPL") or the Common Development
b3e941f
+ * and Distribution License("CDDL") (collectively, the "License").  You
b3e941f
+ * may not use this file except in compliance with the License.  You can
b3e941f
+ * obtain a copy of the License at
b3e941f
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
b3e941f
+ * or packager/legal/LICENSE.txt.  See the License for the specific
b3e941f
+ * language governing permissions and limitations under the License.
b3e941f
+ *
b3e941f
+ * When distributing the software, include this License Header Notice in each
b3e941f
+ * file and include the License file at packager/legal/LICENSE.txt.
b3e941f
+ *
b3e941f
+ * GPL Classpath Exception:
b3e941f
+ * Oracle designates this particular file as subject to the "Classpath"
b3e941f
+ * exception as provided by Oracle in the GPL Version 2 section of the License
b3e941f
+ * file that accompanied this code.
b3e941f
+ *
b3e941f
+ * Modifications:
b3e941f
+ * If applicable, add the following below the License Header, with the fields
b3e941f
+ * enclosed by brackets [] replaced by your own identifying information:
b3e941f
+ * "Portions Copyright [year] [name of copyright owner]"
b3e941f
+ *
b3e941f
+ * Contributor(s):
b3e941f
+ * If you wish your version of this file to be governed by only the CDDL or
b3e941f
+ * only the GPL Version 2, indicate your decision by adding "[Contributor]
b3e941f
+ * elects to include this software in this distribution under the [CDDL or GPL
b3e941f
+ * Version 2] license."  If you don't indicate a single choice of license, a
b3e941f
+ * recipient has the option to distribute your version of this file under
b3e941f
+ * either the CDDL, the GPL Version 2 or to extend the choice of license to
b3e941f
+ * its licensees as provided above.  However, if you add GPL Version 2 code
b3e941f
+ * and therefore, elected the GPL Version 2 license, then the option applies
b3e941f
+ * only if the new code is made subject to such option by the copyright
b3e941f
+ * holder.
b3e941f
+ */
b3e941f
+
b3e941f
+package com.sun.xml.bind.v2.model.impl;
b3e941f
+
b3e941f
+import javax.activation.DataSource;
b3e941f
+import java.io.InputStream;
b3e941f
+import java.io.ByteArrayInputStream;
b3e941f
+import java.io.OutputStream;
b3e941f
+
b3e941f
+/**
b3e941f
+ * {@link DataSource} backed by a byte buffer.
b3e941f
+ *
b3e941f
+ * @author Kohsuke Kawaguchi
b3e941f
+ */
b3e941f
+public final class ByteArrayDataSource implements DataSource {
b3e941f
+
b3e941f
+    private final String contentType;
b3e941f
+    private final byte[] buf;
b3e941f
+    private final int len;
b3e941f
+
b3e941f
+    /**
b3e941f
+     * @param buf input buffer - the byte array isn't being copied; used directly
b3e941f
+     * @param contentType
b3e941f
+     */
b3e941f
+    public ByteArrayDataSource(byte[] buf, String contentType) {
b3e941f
+        this(buf,buf.length,contentType);
b3e941f
+    }
b3e941f
+
b3e941f
+    /**
b3e941f
+     * @param buf input buffer - the byte array isn't being copied; used directly
b3e941f
+     * @param length
b3e941f
+     * @param contentType
b3e941f
+     */
b3e941f
+    public ByteArrayDataSource(byte[] buf, int length, String contentType) {
b3e941f
+        this.buf = buf;
b3e941f
+        this.len = length;
b3e941f
+        this.contentType = contentType;
b3e941f
+    }
b3e941f
+
b3e941f
+    public String getContentType() {
b3e941f
+        if(contentType==null)
b3e941f
+            return "application/octet-stream";
b3e941f
+        return contentType;
b3e941f
+    }
b3e941f
+
b3e941f
+    public InputStream getInputStream() {
b3e941f
+        return new ByteArrayInputStream(buf,0,len);
b3e941f
+    }
b3e941f
+
b3e941f
+    public String getName() {
b3e941f
+        return null;
b3e941f
+    }
b3e941f
+
b3e941f
+    public OutputStream getOutputStream() {
b3e941f
+        throw new UnsupportedOperationException();
b3e941f
+    }
b3e941f
+}
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ClassInfoImpl.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ClassInfoImpl.java
b3e941f
index 7b092a5..d6dd439 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ClassInfoImpl.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ClassInfoImpl.java
b3e941f
@@ -82,7 +82,7 @@ import javax.xml.bind.annotation.XmlValue;
b3e941f
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
b3e941f
 import javax.xml.namespace.QName;
b3e941f
 
b3e941f
-import com.sun.istack.FinalArrayList;
b3e941f
+import java.util.ArrayList;
b3e941f
 import com.sun.xml.bind.annotation.OverrideAnnotationOf;
b3e941f
 import com.sun.xml.bind.v2.model.annotation.Locatable;
b3e941f
 import com.sun.xml.bind.v2.model.annotation.MethodLocatable;
b3e941f
@@ -124,7 +124,7 @@ public class ClassInfoImpl<T,C,F,M> extends TypeInfoImpl<T,C,F,M>
b3e941f
      *
b3e941f
      * @see #getProperties()
b3e941f
      */
b3e941f
-    private FinalArrayList<PropertyInfoImpl<T,C,F,M>> properties;
b3e941f
+    private ArrayList<PropertyInfoImpl<T,C,F,M>> properties;
b3e941f
 
b3e941f
     /**
b3e941f
      * The property order.
b3e941f
@@ -306,7 +306,7 @@ public class ClassInfoImpl<T,C,F,M> extends TypeInfoImpl<T,C,F,M>
b3e941f
         // check the access type first
b3e941f
         XmlAccessType at = getAccessType();
b3e941f
 
b3e941f
-        properties = new FinalArrayList<PropertyInfoImpl<T,C,F,M>>();
b3e941f
+        properties = new ArrayList<PropertyInfoImpl<T,C,F,M>>();
b3e941f
 
b3e941f
         findFieldProperties(clazz,at);
b3e941f
 
b3e941f
@@ -579,7 +579,7 @@ public class ClassInfoImpl<T,C,F,M> extends TypeInfoImpl<T,C,F,M>
b3e941f
     }
b3e941f
 
b3e941f
     private static <T> List<T> makeSet( T... args ) {
b3e941f
-        List<T> l = new FinalArrayList<T>();
b3e941f
+        List<T> l = new ArrayList<T>();
b3e941f
         for( T arg : args )
b3e941f
             if(arg!=null)   l.add(arg);
b3e941f
         return l;
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ElementInfoImpl.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ElementInfoImpl.java
b3e941f
index f20bf49..28994b5 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ElementInfoImpl.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ElementInfoImpl.java
b3e941f
@@ -56,7 +56,7 @@ import javax.xml.bind.annotation.XmlSchema;
b3e941f
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
b3e941f
 import javax.xml.namespace.QName;
b3e941f
 
b3e941f
-import com.sun.istack.FinalArrayList;
b3e941f
+import java.util.ArrayList;
b3e941f
 import com.sun.xml.bind.v2.TODO;
b3e941f
 import com.sun.xml.bind.v2.model.annotation.AnnotationSource;
b3e941f
 import com.sun.xml.bind.v2.model.annotation.Locatable;
b3e941f
@@ -107,7 +107,7 @@ class ElementInfoImpl<T,C,F,M> extends TypeInfoImpl<T,C,F,M> implements ElementI
b3e941f
      * This could be null.
b3e941f
      * @see #link()
b3e941f
      */
b3e941f
-    private FinalArrayList<ElementInfoImpl<T,C,F,M>> substitutionMembers;
b3e941f
+    private ArrayList<ElementInfoImpl<T,C,F,M>> substitutionMembers;
b3e941f
 
b3e941f
     /**
b3e941f
      * The factory method from which this mapping was created.
b3e941f
@@ -435,7 +435,7 @@ class ElementInfoImpl<T,C,F,M> extends TypeInfoImpl<T,C,F,M> implements ElementI
b3e941f
 
b3e941f
     private void addSubstitutionMember(ElementInfoImpl<T,C,F,M> child) {
b3e941f
         if(substitutionMembers==null)
b3e941f
-            substitutionMembers = new FinalArrayList<ElementInfoImpl<T,C,F,M>>();
b3e941f
+            substitutionMembers = new ArrayList<ElementInfoImpl<T,C,F,M>>();
b3e941f
         substitutionMembers.add(child);
b3e941f
     }
b3e941f
 
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ElementPropertyInfoImpl.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ElementPropertyInfoImpl.java
b3e941f
index 4a0169e..3693240 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ElementPropertyInfoImpl.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/ElementPropertyInfoImpl.java
b3e941f
@@ -49,7 +49,7 @@ import javax.xml.bind.annotation.XmlElements;
b3e941f
 import javax.xml.bind.annotation.XmlList;
b3e941f
 import javax.xml.namespace.QName;
b3e941f
 
b3e941f
-import com.sun.istack.FinalArrayList;
b3e941f
+import java.util.ArrayList;
b3e941f
 import com.sun.xml.bind.v2.model.core.ElementPropertyInfo;
b3e941f
 import com.sun.xml.bind.v2.model.core.ID;
b3e941f
 import com.sun.xml.bind.v2.model.core.PropertyKind;
b3e941f
@@ -105,7 +105,7 @@ class ElementPropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
b3e941f
 
b3e941f
     public List> getTypes() {
b3e941f
         if(types==null) {
b3e941f
-            types = new FinalArrayList<TypeRefImpl<TypeT,ClassDeclT>>();
b3e941f
+            types = new ArrayList<TypeRefImpl<TypeT,ClassDeclT>>();
b3e941f
             XmlElement[] ann=null;
b3e941f
 
b3e941f
             XmlElement xe = seed.readAnnotation(XmlElement.class);
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java
b3e941f
index 56aaa65..8c99fe4 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java
b3e941f
@@ -91,7 +91,6 @@ import javax.xml.transform.Transformer;
b3e941f
 import javax.xml.transform.TransformerException;
b3e941f
 import javax.xml.transform.stream.StreamResult;
b3e941f
 
b3e941f
-import com.sun.istack.ByteArrayDataSource;
b3e941f
 import com.sun.xml.bind.DatatypeConverterImpl;
b3e941f
 import com.sun.xml.bind.WhiteSpaceProcessor;
b3e941f
 import com.sun.xml.bind.api.AccessorException;
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/RuntimeClassInfoImpl.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/RuntimeClassInfoImpl.java
b3e941f
index 370ba4f..5a75bde 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/RuntimeClassInfoImpl.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/RuntimeClassInfoImpl.java
b3e941f
@@ -53,7 +53,6 @@ import javax.xml.bind.JAXBException;
b3e941f
 import javax.xml.namespace.QName;
b3e941f
 import javax.xml.stream.XMLStreamException;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
 import com.sun.xml.bind.AccessorFactory;
b3e941f
 import com.sun.xml.bind.AccessorFactoryImpl;
b3e941f
 import com.sun.xml.bind.InternalAccessorFactory;
b3e941f
@@ -374,7 +373,7 @@ class RuntimeClassInfoImpl extends ClassInfoImpl<Type,Class,Field,Method>
b3e941f
             }
b3e941f
         }
b3e941f
 
b3e941f
-        public @NotNull CharSequence print(BeanT o) throws AccessorException {
b3e941f
+        public  CharSequence print(BeanT o) throws AccessorException {
b3e941f
             try {
b3e941f
                 CharSequence value = xacc.print(o);
b3e941f
                 if(value==null)
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/RuntimeModelBuilder.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/RuntimeModelBuilder.java
b3e941f
index aefa835..a5427ed 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/RuntimeModelBuilder.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/model/impl/RuntimeModelBuilder.java
b3e941f
@@ -65,7 +65,6 @@ import com.sun.xml.bind.v2.runtime.SchemaTypeTransducer;
b3e941f
 import com.sun.xml.bind.v2.runtime.Transducer;
b3e941f
 import com.sun.xml.bind.v2.runtime.JAXBContextImpl;
b3e941f
 import com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext;
b3e941f
-import com.sun.istack.Nullable;
b3e941f
 
b3e941f
 import com.sun.xml.bind.v2.WellKnownNamespace;
b3e941f
 import javax.xml.namespace.QName;
b3e941f
@@ -86,7 +85,7 @@ public class RuntimeModelBuilder extends ModelBuilder<Type,Class,Field,Method> {
b3e941f
      * The {@link JAXBContextImpl} for which the model is built.
b3e941f
      * Null when created for reflection.
b3e941f
      */
b3e941f
-    public final @Nullable JAXBContextImpl context;
b3e941f
+    public final  JAXBContextImpl context;
b3e941f
 
b3e941f
     public RuntimeModelBuilder(JAXBContextImpl context, RuntimeAnnotationReader annotationReader, Map<Class, Class> subclassReplacements, String defaultNamespaceRemap) {
b3e941f
         super(annotationReader, Utils.REFLECTION_NAVIGATOR, subclassReplacements, defaultNamespaceRemap);
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/BridgeAdapter.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/BridgeAdapter.java
b3e941f
index 0e1346c..1a5d6f6 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/BridgeAdapter.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/BridgeAdapter.java
b3e941f
@@ -57,7 +57,6 @@ import javax.xml.stream.XMLStreamWriter;
b3e941f
 import javax.xml.transform.Result;
b3e941f
 import javax.xml.transform.Source;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
 import com.sun.xml.bind.api.Bridge;
b3e941f
 import com.sun.xml.bind.api.TypeReference;
b3e941f
 import com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl;
b3e941f
@@ -122,19 +121,19 @@ final class BridgeAdapter<OnWire,InMemory> extends InternalBridge<InMemory> {
b3e941f
     }
b3e941f
 
b3e941f
 
b3e941f
-    public @NotNull InMemory unmarshal(Unmarshaller u, XMLStreamReader in) throws JAXBException {
b3e941f
+    public  InMemory unmarshal(Unmarshaller u, XMLStreamReader in) throws JAXBException {
b3e941f
         return adaptU(u, core.unmarshal(u,in));
b3e941f
     }
b3e941f
 
b3e941f
-    public @NotNull InMemory unmarshal(Unmarshaller u, Source in) throws JAXBException {
b3e941f
+    public  InMemory unmarshal(Unmarshaller u, Source in) throws JAXBException {
b3e941f
         return adaptU(u, core.unmarshal(u,in));
b3e941f
     }
b3e941f
 
b3e941f
-    public @NotNull InMemory unmarshal(Unmarshaller u, InputStream in) throws JAXBException {
b3e941f
+    public  InMemory unmarshal(Unmarshaller u, InputStream in) throws JAXBException {
b3e941f
         return adaptU(u, core.unmarshal(u,in));
b3e941f
     }
b3e941f
 
b3e941f
-    public @NotNull InMemory unmarshal(Unmarshaller u, Node n) throws JAXBException {
b3e941f
+    public  InMemory unmarshal(Unmarshaller u, Node n) throws JAXBException {
b3e941f
         return adaptU(u, core.unmarshal(u,n));
b3e941f
     }
b3e941f
 
b3e941f
@@ -142,7 +141,7 @@ final class BridgeAdapter<OnWire,InMemory> extends InternalBridge<InMemory> {
b3e941f
         return core.getTypeReference();
b3e941f
     }
b3e941f
 
b3e941f
-    private @NotNull InMemory adaptU(Unmarshaller _u, OnWire v) throws JAXBException {
b3e941f
+    private  InMemory adaptU(Unmarshaller _u, OnWire v) throws JAXBException {
b3e941f
         UnmarshallerImpl u = (UnmarshallerImpl) _u;
b3e941f
         XmlAdapter<OnWire,InMemory> a = u.coordinator.getAdapter(adapter);
b3e941f
         u.coordinator.pushCoordinator();
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/BridgeImpl.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/BridgeImpl.java
b3e941f
index 231f4d2..eb3d739 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/BridgeImpl.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/BridgeImpl.java
b3e941f
@@ -55,7 +55,6 @@ import javax.xml.stream.XMLStreamWriter;
b3e941f
 import javax.xml.transform.Result;
b3e941f
 import javax.xml.transform.Source;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
 import com.sun.xml.bind.api.Bridge;
b3e941f
 import com.sun.xml.bind.api.TypeReference;
b3e941f
 import com.sun.xml.bind.marshaller.SAX2DOMEx;
b3e941f
@@ -119,22 +118,22 @@ final class BridgeImpl<T> extends InternalBridge<T> {
b3e941f
         m.write(tagName,bi,t, m.createXmlOutput(result),m.createPostInitAction(result));
b3e941f
     }
b3e941f
 
b3e941f
-    public @NotNull T unmarshal(Unmarshaller _u, XMLStreamReader in) throws JAXBException {
b3e941f
+    public  T unmarshal(Unmarshaller _u, XMLStreamReader in) throws JAXBException {
b3e941f
         UnmarshallerImpl u = (UnmarshallerImpl)_u;
b3e941f
         return ((JAXBElement<T>)u.unmarshal0(in,bi)).getValue();
b3e941f
     }
b3e941f
 
b3e941f
-    public @NotNull T unmarshal(Unmarshaller _u, Source in) throws JAXBException {
b3e941f
+    public  T unmarshal(Unmarshaller _u, Source in) throws JAXBException {
b3e941f
         UnmarshallerImpl u = (UnmarshallerImpl)_u;
b3e941f
         return ((JAXBElement<T>)u.unmarshal0(in,bi)).getValue();
b3e941f
     }
b3e941f
 
b3e941f
-    public @NotNull T unmarshal(Unmarshaller _u, InputStream in) throws JAXBException {
b3e941f
+    public  T unmarshal(Unmarshaller _u, InputStream in) throws JAXBException {
b3e941f
         UnmarshallerImpl u = (UnmarshallerImpl)_u;
b3e941f
         return ((JAXBElement<T>)u.unmarshal0(in,bi)).getValue();
b3e941f
     }
b3e941f
 
b3e941f
-    public @NotNull T unmarshal(Unmarshaller _u, Node n) throws JAXBException {
b3e941f
+    public  T unmarshal(Unmarshaller _u, Node n) throws JAXBException {
b3e941f
         UnmarshallerImpl u = (UnmarshallerImpl)_u;
b3e941f
         return ((JAXBElement<T>)u.unmarshal0(n,bi)).getValue();
b3e941f
     }
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/ClassBeanInfoImpl.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/ClassBeanInfoImpl.java
b3e941f
index c7763bf..e1a5595 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/ClassBeanInfoImpl.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/ClassBeanInfoImpl.java
b3e941f
@@ -57,7 +57,7 @@ import javax.xml.bind.helpers.ValidationEventImpl;
b3e941f
 import javax.xml.namespace.QName;
b3e941f
 import javax.xml.stream.XMLStreamException;
b3e941f
 
b3e941f
-import com.sun.istack.FinalArrayList;
b3e941f
+import java.util.ArrayList;
b3e941f
 import com.sun.xml.bind.Util;
b3e941f
 import com.sun.xml.bind.api.AccessorException;
b3e941f
 import com.sun.xml.bind.v2.ClassFactory;
b3e941f
@@ -237,8 +237,8 @@ public final class ClassBeanInfoImpl<BeanT> extends JaxBeanInfo<BeanT> implement
b3e941f
         }
b3e941f
 
b3e941f
         // create a list of attribute/URI handlers
b3e941f
-        List<AttributeProperty> attProps = new FinalArrayList<AttributeProperty>();
b3e941f
-        List<Property> uriProps = new FinalArrayList<Property>();
b3e941f
+        List<AttributeProperty> attProps = new ArrayList<AttributeProperty>();
b3e941f
+        List<Property> uriProps = new ArrayList<Property>();
b3e941f
         for (ClassBeanInfoImpl bi = this; bi != null; bi = bi.superClazz) {
b3e941f
             for (int i = 0; i < bi.properties.length; i++) {
b3e941f
                 Property p = bi.properties[i];
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/ContentHandlerAdaptor.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/ContentHandlerAdaptor.java
b3e941f
index 81cceaf..4d57df7 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/ContentHandlerAdaptor.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/ContentHandlerAdaptor.java
b3e941f
@@ -40,8 +40,8 @@
b3e941f
 
b3e941f
 package com.sun.xml.bind.v2.runtime;
b3e941f
 
b3e941f
-import com.sun.istack.FinalArrayList;
b3e941f
-import com.sun.istack.SAXException2;
b3e941f
+import java.util.ArrayList;
b3e941f
+import org.xml.sax.SAXException;
b3e941f
 import org.xml.sax.Attributes;
b3e941f
 import org.xml.sax.SAXException;
b3e941f
 import org.xml.sax.helpers.DefaultHandler;
b3e941f
@@ -59,7 +59,7 @@ import java.io.IOException;
b3e941f
 final class ContentHandlerAdaptor extends DefaultHandler {
b3e941f
 
b3e941f
     /** Stores newly declared prefix-URI mapping. */
b3e941f
-    private final FinalArrayList<String> prefixMap = new FinalArrayList<String>();
b3e941f
+    private final ArrayList<String> prefixMap = new ArrayList<String>();
b3e941f
 
b3e941f
     /** Events will be sent to this object. */
b3e941f
     private final XMLSerializer serializer;
b3e941f
@@ -136,9 +136,9 @@ final class ContentHandlerAdaptor extends DefaultHandler {
b3e941f
             prefixMap.clear();
b3e941f
             serializer.endAttributes();
b3e941f
         } catch (IOException e) {
b3e941f
-            throw new SAXException2(e);
b3e941f
+            throw new SAXException(e);
b3e941f
         } catch (XMLStreamException e) {
b3e941f
-            throw new SAXException2(e);
b3e941f
+            throw new SAXException(e);
b3e941f
         }
b3e941f
     }
b3e941f
 
b3e941f
@@ -153,9 +153,9 @@ final class ContentHandlerAdaptor extends DefaultHandler {
b3e941f
             flushText();
b3e941f
             serializer.endElement();
b3e941f
         } catch (IOException e) {
b3e941f
-            throw new SAXException2(e);
b3e941f
+            throw new SAXException(e);
b3e941f
         } catch (XMLStreamException e) {
b3e941f
-            throw new SAXException2(e);
b3e941f
+            throw new SAXException(e);
b3e941f
         }
b3e941f
     }
b3e941f
     
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/FilterTransducer.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/FilterTransducer.java
b3e941f
index fa14713..4ee809a 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/FilterTransducer.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/FilterTransducer.java
b3e941f
@@ -45,7 +45,6 @@ import java.io.IOException;
b3e941f
 import javax.xml.namespace.QName;
b3e941f
 import javax.xml.stream.XMLStreamException;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
 import com.sun.xml.bind.api.AccessorException;
b3e941f
 
b3e941f
 import org.xml.sax.SAXException;
b3e941f
@@ -76,7 +75,7 @@ public abstract class FilterTransducer<T> implements Transducer<T> {
b3e941f
         core.declareNamespace(o, w);
b3e941f
     }
b3e941f
 
b3e941f
-    public @NotNull CharSequence print(@NotNull T o) throws AccessorException {
b3e941f
+    public  CharSequence print( T o) throws AccessorException {
b3e941f
         return core.print(o);
b3e941f
     }
b3e941f
 
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/InlineBinaryTransducer.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/InlineBinaryTransducer.java
b3e941f
index a09ef5d..1bf7c49 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/InlineBinaryTransducer.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/InlineBinaryTransducer.java
b3e941f
@@ -44,7 +44,6 @@ import java.io.IOException;
b3e941f
 
b3e941f
 import javax.xml.stream.XMLStreamException;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
 import com.sun.xml.bind.api.AccessorException;
b3e941f
 
b3e941f
 import org.xml.sax.SAXException;
b3e941f
@@ -60,7 +59,7 @@ public class InlineBinaryTransducer<V> extends FilterTransducer<V> {
b3e941f
     }
b3e941f
 
b3e941f
     @Override
b3e941f
-    public @NotNull CharSequence print(@NotNull V o) throws AccessorException {
b3e941f
+    public  CharSequence print( V o) throws AccessorException {
b3e941f
         XMLSerializer w = XMLSerializer.getInstance();
b3e941f
         boolean old = w.setInlineBinaryFlag(true);
b3e941f
         try {
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/JAXBContextImpl.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/JAXBContextImpl.java
b3e941f
index c215971..6ade739 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/JAXBContextImpl.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/JAXBContextImpl.java
b3e941f
@@ -83,8 +83,6 @@ import javax.xml.transform.TransformerFactory;
b3e941f
 import javax.xml.transform.sax.SAXTransformerFactory;
b3e941f
 import javax.xml.transform.sax.TransformerHandler;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
-import com.sun.istack.Pool;
b3e941f
 import com.sun.xml.bind.v2.WellKnownNamespace;
b3e941f
 import com.sun.xml.bind.api.AccessorException;
b3e941f
 import com.sun.xml.bind.api.Bridge;
b3e941f
@@ -174,13 +172,13 @@ public final class JAXBContextImpl extends JAXBRIContext {
b3e941f
      * Pool of {@link Marshaller}s.
b3e941f
      */
b3e941f
     public final Pool<Marshaller> marshallerPool = new Pool.Impl<Marshaller>() {
b3e941f
-        protected @NotNull Marshaller create() {
b3e941f
+        protected  Marshaller create() {
b3e941f
             return createMarshaller();
b3e941f
         }
b3e941f
     };
b3e941f
 
b3e941f
     public final Pool<Unmarshaller> unmarshallerPool = new Pool.Impl<Unmarshaller>() {
b3e941f
-        protected @NotNull Unmarshaller create() {
b3e941f
+        protected  Unmarshaller create() {
b3e941f
             return createUnmarshaller();
b3e941f
         }
b3e941f
     };
b3e941f
@@ -241,10 +239,10 @@ public final class JAXBContextImpl extends JAXBRIContext {
b3e941f
 
b3e941f
     private WeakReference<RuntimeTypeInfoSet> typeInfoSetCache;
b3e941f
 
b3e941f
-    private @NotNull RuntimeAnnotationReader annotationReader;
b3e941f
+    private  RuntimeAnnotationReader annotationReader;
b3e941f
 
b3e941f
     private /*almost final*/ boolean hasSwaRef;
b3e941f
-    private final @NotNull Map<Class,Class> subclassReplacements;
b3e941f
+    private final  Map<Class,Class> subclassReplacements;
b3e941f
 
b3e941f
     /**
b3e941f
      * If true, we aim for faster {@link JAXBContext} instantiation performance,
b3e941f
@@ -917,7 +915,7 @@ public final class JAXBContextImpl extends JAXBRIContext {
b3e941f
         return bridges.get(ref);
b3e941f
     }
b3e941f
 
b3e941f
-    public @NotNull BridgeContext createBridgeContext() {
b3e941f
+    public  BridgeContext createBridgeContext() {
b3e941f
         return new BridgeContextImpl(this);
b3e941f
     }
b3e941f
 
b3e941f
@@ -1030,8 +1028,8 @@ public final class JAXBContextImpl extends JAXBRIContext {
b3e941f
         private boolean retainPropertyInfo = false;
b3e941f
         private boolean supressAccessorWarnings = false;
b3e941f
         private String defaultNsUri = "";
b3e941f
-        private @NotNull RuntimeAnnotationReader annotationReader = new RuntimeInlineAnnotationReader();
b3e941f
-        private @NotNull Map<Class,Class> subclassReplacements = Collections.emptyMap();
b3e941f
+        private  RuntimeAnnotationReader annotationReader = new RuntimeInlineAnnotationReader();
b3e941f
+        private  Map<Class,Class> subclassReplacements = Collections.emptyMap();
b3e941f
         private boolean c14nSupport = false;
b3e941f
         private Class[] classes;
b3e941f
         private Collection<TypeReference> typeRefs;
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/JaxBeanInfo.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/JaxBeanInfo.java
b3e941f
index a4bfc9e..eafcbf9 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/JaxBeanInfo.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/JaxBeanInfo.java
b3e941f
@@ -58,7 +58,6 @@ import javax.xml.datatype.XMLGregorianCalendar;
b3e941f
 import javax.xml.namespace.QName;
b3e941f
 import javax.xml.stream.XMLStreamException;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
 import com.sun.xml.bind.Util;
b3e941f
 import com.sun.xml.bind.v2.model.runtime.RuntimeTypeInfo;
b3e941f
 import com.sun.xml.bind.v2.runtime.unmarshaller.Loader;
b3e941f
@@ -302,7 +301,7 @@ public abstract class JaxBeanInfo<BeanT> {
b3e941f
      * instance, but there's a few exceptions (most notably {@link XMLGregorianCalendar}),
b3e941f
      * so as a general rule we need an instance to determine it.
b3e941f
      */
b3e941f
-    public QName getTypeName(@NotNull BeanT instance) {
b3e941f
+    public QName getTypeName( BeanT instance) {
b3e941f
         if(typeName==null)  return null;
b3e941f
         if(typeName instanceof QName)   return (QName)typeName;
b3e941f
         return ((QName[])typeName)[0];
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/NamespaceContext2.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/NamespaceContext2.java
b3e941f
index a6205fb..7ac839a 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/NamespaceContext2.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/NamespaceContext2.java
b3e941f
@@ -42,7 +42,6 @@ package com.sun.xml.bind.v2.runtime;
b3e941f
 
b3e941f
 import javax.xml.namespace.NamespaceContext;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
 
b3e941f
 /**
b3e941f
  * Maintains namespace<->prefix bindings.
b3e941f
@@ -99,5 +98,5 @@ public interface NamespaceContext2 extends NamespaceContext
b3e941f
      * simply returns the assigned prefix index. Otherwise a new
b3e941f
      * declaration will be put. 
b3e941f
      */
b3e941f
-    int force(@NotNull String uri, @NotNull String prefix);
b3e941f
+    int force( String uri,  String prefix);
b3e941f
 }
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/Pool.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/Pool.java
b3e941f
new file mode 100644
b3e941f
index 0000000..71fea42
b3e941f
--- /dev/null
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/Pool.java
b3e941f
@@ -0,0 +1,131 @@
b3e941f
+/*
b3e941f
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
b3e941f
+ *
b3e941f
+ * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
b3e941f
+ *
b3e941f
+ * The contents of this file are subject to the terms of either the GNU
b3e941f
+ * General Public License Version 2 only ("GPL") or the Common Development
b3e941f
+ * and Distribution License("CDDL") (collectively, the "License").  You
b3e941f
+ * may not use this file except in compliance with the License.  You can
b3e941f
+ * obtain a copy of the License at
b3e941f
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
b3e941f
+ * or packager/legal/LICENSE.txt.  See the License for the specific
b3e941f
+ * language governing permissions and limitations under the License.
b3e941f
+ *
b3e941f
+ * When distributing the software, include this License Header Notice in each
b3e941f
+ * file and include the License file at packager/legal/LICENSE.txt.
b3e941f
+ *
b3e941f
+ * GPL Classpath Exception:
b3e941f
+ * Oracle designates this particular file as subject to the "Classpath"
b3e941f
+ * exception as provided by Oracle in the GPL Version 2 section of the License
b3e941f
+ * file that accompanied this code.
b3e941f
+ *
b3e941f
+ * Modifications:
b3e941f
+ * If applicable, add the following below the License Header, with the fields
b3e941f
+ * enclosed by brackets [] replaced by your own identifying information:
b3e941f
+ * "Portions Copyright [year] [name of copyright owner]"
b3e941f
+ *
b3e941f
+ * Contributor(s):
b3e941f
+ * If you wish your version of this file to be governed by only the CDDL or
b3e941f
+ * only the GPL Version 2, indicate your decision by adding "[Contributor]
b3e941f
+ * elects to include this software in this distribution under the [CDDL or GPL
b3e941f
+ * Version 2] license."  If you don't indicate a single choice of license, a
b3e941f
+ * recipient has the option to distribute your version of this file under
b3e941f
+ * either the CDDL, the GPL Version 2 or to extend the choice of license to
b3e941f
+ * its licensees as provided above.  However, if you add GPL Version 2 code
b3e941f
+ * and therefore, elected the GPL Version 2 license, then the option applies
b3e941f
+ * only if the new code is made subject to such option by the copyright
b3e941f
+ * holder.
b3e941f
+ */
b3e941f
+
b3e941f
+package com.sun.xml.bind.v2.runtime;
b3e941f
+
b3e941f
+import java.util.concurrent.ConcurrentLinkedQueue;
b3e941f
+import java.lang.ref.WeakReference;
b3e941f
+
b3e941f
+/**
b3e941f
+ * Pool of reusable objects that are indistinguishable from each other,
b3e941f
+ * such as JAXB marshallers.
b3e941f
+ *
b3e941f
+ * @author Kohsuke Kawaguchi
b3e941f
+ */
b3e941f
+public interface Pool<T> {
b3e941f
+
b3e941f
+    /**
b3e941f
+     * Gets a new object from the pool.
b3e941f
+     *
b3e941f
+     * 

b3e941f
+     * If no object is available in the pool, this method creates a new one.
b3e941f
+     */
b3e941f
+    T take();
b3e941f
+
b3e941f
+    /**
b3e941f
+     * Returns an object back to the pool.
b3e941f
+     */
b3e941f
+    void recycle(T t);
b3e941f
+
b3e941f
+    /**
b3e941f
+     * Default implementation that uses {@link ConcurrentLinkedQueue}
b3e941f
+     * as the data store.
b3e941f
+     *
b3e941f
+     * 

Note for Implementors

b3e941f
+     * 

b3e941f
+     * Don't rely on the fact that this class extends from {@link ConcurrentLinkedQueue}.
b3e941f
+     */
b3e941f
+    public abstract class Impl<T> implements Pool<T> {
b3e941f
+
b3e941f
+        private volatile WeakReference<ConcurrentLinkedQueue<T>> queue;
b3e941f
+
b3e941f
+        /**
b3e941f
+         * Gets a new object from the pool.
b3e941f
+         *
b3e941f
+         * 

b3e941f
+         * If no object is available in the pool, this method creates a new one.
b3e941f
+         *
b3e941f
+         * @return
b3e941f
+         *      always non-null.
b3e941f
+         */
b3e941f
+        public final T take() {
b3e941f
+            T t = getQueue().poll();
b3e941f
+            if(t==null) {
b3e941f
+                return create();
b3e941f
+            }
b3e941f
+            return t;
b3e941f
+        }
b3e941f
+
b3e941f
+        /**
b3e941f
+         * Returns an object back to the pool.
b3e941f
+         */
b3e941f
+        public final void recycle(T t) {
b3e941f
+            getQueue().offer(t);
b3e941f
+        }
b3e941f
+
b3e941f
+        private ConcurrentLinkedQueue<T> getQueue() {
b3e941f
+            WeakReference<ConcurrentLinkedQueue<T>> q = queue;
b3e941f
+            if (q != null) {
b3e941f
+                ConcurrentLinkedQueue<T> d = q.get();
b3e941f
+                if (d != null) {
b3e941f
+                    return d;
b3e941f
+                }
b3e941f
+            }
b3e941f
+            // overwrite the queue
b3e941f
+            ConcurrentLinkedQueue<T> d = new ConcurrentLinkedQueue<T>();
b3e941f
+            queue = new WeakReference<ConcurrentLinkedQueue<T>>(d);
b3e941f
+
b3e941f
+            return d;
b3e941f
+        }
b3e941f
+
b3e941f
+        /**
b3e941f
+         * Creates a new instance of object.
b3e941f
+         *
b3e941f
+         * 

b3e941f
+         * This method is used when someone wants to
b3e941f
+         * {@link #take() take} an object from an empty pool.
b3e941f
+         *
b3e941f
+         * 

b3e941f
+         * Also note that multiple threads may call this method
b3e941f
+         * concurrently.
b3e941f
+         */
b3e941f
+        protected abstract T create();
b3e941f
+    }
b3e941f
+}
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/Transducer.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/Transducer.java
b3e941f
index 55aa437..3b9f791 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/Transducer.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/Transducer.java
b3e941f
@@ -47,7 +47,6 @@ import javax.xml.datatype.XMLGregorianCalendar;
b3e941f
 import javax.xml.namespace.QName;
b3e941f
 import javax.xml.stream.XMLStreamException;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
 import com.sun.xml.bind.api.AccessorException;
b3e941f
 import com.sun.xml.bind.v2.model.runtime.RuntimePropertyInfo;
b3e941f
 import com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedTransducedAccessorFactory;
b3e941f
@@ -104,7 +103,7 @@ public interface Transducer<ValueT> {
b3e941f
      * @return
b3e941f
      *      always non-null valid lexical representation.
b3e941f
      */
b3e941f
-    @NotNull CharSequence print(@NotNull ValueT o) throws AccessorException;
b3e941f
+     CharSequence print( ValueT o) throws AccessorException;
b3e941f
 
b3e941f
     /**
b3e941f
      * Converts the lexical representation to a value object.
b3e941f
@@ -132,7 +131,7 @@ public interface Transducer<ValueT> {
b3e941f
      * to one of the {@link XMLSerializer#leafElement(Name, String, String)} method.
b3e941f
      * but with the best representation of the value, not necessarily String.
b3e941f
      */
b3e941f
-    void writeLeafElement(XMLSerializer w, Name tagName, @NotNull ValueT o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException;
b3e941f
+    void writeLeafElement(XMLSerializer w, Name tagName,  ValueT o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException;
b3e941f
 
b3e941f
     /**
b3e941f
      * Transducers implicitly work against a single XML type,
b3e941f
@@ -145,5 +144,5 @@ public interface Transducer<ValueT> {
b3e941f
      *      Most of the time this method returns null, in which case
b3e941f
      *      the implicitly associated type will be used.
b3e941f
      */
b3e941f
-    QName getTypeName(@NotNull ValueT instance);
b3e941f
+    QName getTypeName( ValueT instance);
b3e941f
 }
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/ValueListBeanInfoImpl.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/ValueListBeanInfoImpl.java
b3e941f
index 6574c1d..0af82ce 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/ValueListBeanInfoImpl.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/ValueListBeanInfoImpl.java
b3e941f
@@ -49,7 +49,7 @@ import javax.xml.bind.ValidationEvent;
b3e941f
 import javax.xml.bind.helpers.ValidationEventImpl;
b3e941f
 import javax.xml.stream.XMLStreamException;
b3e941f
 
b3e941f
-import com.sun.istack.FinalArrayList;
b3e941f
+import java.util.ArrayList;
b3e941f
 import com.sun.xml.bind.WhiteSpaceProcessor;
b3e941f
 import com.sun.xml.bind.api.AccessorException;
b3e941f
 import com.sun.xml.bind.v2.runtime.unmarshaller.Loader;
b3e941f
@@ -77,7 +77,7 @@ final class ValueListBeanInfoImpl extends JaxBeanInfo {
b3e941f
     private final Loader loader = new Loader(true) {
b3e941f
         @Override
b3e941f
         public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
b3e941f
-            List<Object> r = new FinalArrayList<Object>();
b3e941f
+            List<Object> r = new ArrayList<Object>();
b3e941f
 
b3e941f
             int idx = 0;
b3e941f
             int len = text.length();
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/XMLSerializer.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/XMLSerializer.java
b3e941f
index d4db0f4..05b3a53 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/XMLSerializer.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/XMLSerializer.java
b3e941f
@@ -66,7 +66,7 @@ import javax.xml.transform.Transformer;
b3e941f
 import javax.xml.transform.TransformerException;
b3e941f
 import javax.xml.transform.sax.SAXResult;
b3e941f
 
b3e941f
-import com.sun.istack.SAXException2;
b3e941f
+import org.xml.sax.SAXException;
b3e941f
 import com.sun.xml.bind.CycleRecoverable;
b3e941f
 import com.sun.xml.bind.api.AccessorException;
b3e941f
 import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
b3e941f
@@ -239,14 +239,14 @@ public final class XMLSerializer extends Coordinator {
b3e941f
         try {
b3e941f
             handler = marshaller.getEventHandler();
b3e941f
         } catch( JAXBException e ) {
b3e941f
-            throw new SAXException2(e);
b3e941f
+            throw new SAXException(e);
b3e941f
         }
b3e941f
 
b3e941f
         if(!handler.handleEvent(ve)) {
b3e941f
             if(ve.getLinkedException() instanceof Exception)
b3e941f
-                throw new SAXException2((Exception)ve.getLinkedException());
b3e941f
+                throw new SAXException((Exception)ve.getLinkedException());
b3e941f
             else
b3e941f
-                throw new SAXException2(ve.getMessage());
b3e941f
+                throw new SAXException(ve.getMessage());
b3e941f
         }
b3e941f
     }
b3e941f
 
b3e941f
@@ -434,9 +434,9 @@ public final class XMLSerializer extends Coordinator {
b3e941f
         try {
b3e941f
             out.attribute(prefix,local,value);
b3e941f
         } catch (IOException e) {
b3e941f
-            throw new SAXException2(e);
b3e941f
+            throw new SAXException(e);
b3e941f
         } catch (XMLStreamException e) {
b3e941f
-            throw new SAXException2(e);
b3e941f
+            throw new SAXException(e);
b3e941f
         }
b3e941f
     }
b3e941f
 
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/output/C14nXmlOutput.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/output/C14nXmlOutput.java
b3e941f
index b570114..d9f6a49 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/output/C14nXmlOutput.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/output/C14nXmlOutput.java
b3e941f
@@ -47,7 +47,7 @@ import java.util.Collections;
b3e941f
 
b3e941f
 import com.sun.xml.bind.api.JAXBRIContext;
b3e941f
 import com.sun.xml.bind.v2.runtime.Name;
b3e941f
-import com.sun.istack.FinalArrayList;
b3e941f
+import java.util.ArrayList;
b3e941f
 import com.sun.xml.bind.marshaller.CharacterEscapeHandler;
b3e941f
 
b3e941f
 /**
b3e941f
@@ -85,7 +85,7 @@ public class C14nXmlOutput extends UTF8XmlOutput {
b3e941f
      * As long as this map is empty, there's no need for sorting.
b3e941f
      * see {@link com.sun.xml.bind.api.C14nSupport_ArchitectureDocument} for more details.
b3e941f
      */
b3e941f
-    private final FinalArrayList<DynamicAttribute> otherAttributes = new FinalArrayList<DynamicAttribute>();
b3e941f
+    private final ArrayList<DynamicAttribute> otherAttributes = new ArrayList<DynamicAttribute>();
b3e941f
 
b3e941f
     /**
b3e941f
      * True if {@link JAXBRIContext} is created with c14n support on,
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/output/NamespaceContextImpl.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/output/NamespaceContextImpl.java
b3e941f
index 90eb105..6085609 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/output/NamespaceContextImpl.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/output/NamespaceContextImpl.java
b3e941f
@@ -47,8 +47,6 @@ import java.util.Iterator;
b3e941f
 import javax.xml.XMLConstants;
b3e941f
 import javax.xml.stream.XMLStreamException;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
-import com.sun.istack.Nullable;
b3e941f
 import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
b3e941f
 import com.sun.xml.bind.v2.WellKnownNamespace;
b3e941f
 import com.sun.xml.bind.v2.runtime.Name;
b3e941f
@@ -237,7 +235,7 @@ public final class NamespaceContextImpl implements NamespaceContext2 {
b3e941f
         }
b3e941f
     }
b3e941f
 
b3e941f
-    public int force(@NotNull String uri, @NotNull String prefix) {
b3e941f
+    public int force( String uri,  String prefix) {
b3e941f
         // check for the existing binding
b3e941f
 
b3e941f
         for( int i=size-1; i>=0; i-- ) {
b3e941f
@@ -265,7 +263,7 @@ public final class NamespaceContextImpl implements NamespaceContext2 {
b3e941f
      * @return
b3e941f
      *      the index of this new binding.
b3e941f
      */
b3e941f
-    public int put(@NotNull String uri, @Nullable String prefix) {
b3e941f
+    public int put( String uri,  String prefix) {
b3e941f
         if(size==nsUris.length) {
b3e941f
             // reallocate
b3e941f
             String[] u = new String[nsUris.length*2];
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/reflect/Accessor.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/reflect/Accessor.java
b3e941f
index a4e5ba2..8c1a46e 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/reflect/Accessor.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/reflect/Accessor.java
b3e941f
@@ -55,7 +55,6 @@ import java.util.logging.Logger;
b3e941f
 import javax.xml.bind.JAXBElement;
b3e941f
 import javax.xml.bind.annotation.adapters.XmlAdapter;
b3e941f
 
b3e941f
-import com.sun.istack.Nullable;
b3e941f
 import com.sun.xml.bind.Util;
b3e941f
 import com.sun.xml.bind.api.AccessorException;
b3e941f
 import com.sun.xml.bind.api.JAXBRIContext;
b3e941f
@@ -104,7 +103,7 @@ public abstract class Accessor<BeanT, ValueT> implements Receiver {
b3e941f
      *                (See {@link RuntimeModelBuilder#context}.)
b3e941f
      * @return At least the implementation can return <tt>this</tt>.
b3e941f
      */
b3e941f
-    public Accessor<BeanT, ValueT> optimize(@Nullable JAXBContextImpl context) {
b3e941f
+    public Accessor<BeanT, ValueT> optimize( JAXBContextImpl context) {
b3e941f
         return this;
b3e941f
     }
b3e941f
 
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/reflect/Lister.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/reflect/Lister.java
b3e941f
index 56ce1cb..3060979 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/reflect/Lister.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/reflect/Lister.java
b3e941f
@@ -60,7 +60,7 @@ import java.util.concurrent.Callable;
b3e941f
 
b3e941f
 import javax.xml.bind.JAXBException;
b3e941f
 
b3e941f
-import com.sun.istack.SAXException2;
b3e941f
+import org.xml.sax.SAXException;
b3e941f
 import com.sun.xml.bind.api.AccessorException;
b3e941f
 import com.sun.xml.bind.v2.ClassFactory;
b3e941f
 import com.sun.xml.bind.v2.TODO;
b3e941f
@@ -405,7 +405,7 @@ public abstract class Lister<BeanT,PropT,ItemT,PackT> {
b3e941f
                         } catch (SAXException e) {
b3e941f
                             throw e;
b3e941f
                         } catch (Exception e) {
b3e941f
-                            throw new SAXException2(e);
b3e941f
+                            throw new SAXException(e);
b3e941f
                         }
b3e941f
 
b3e941f
                         if(t==null) {
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/reflect/TransducedAccessor.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/reflect/TransducedAccessor.java
b3e941f
index 171ce1d..af18dbc 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/reflect/TransducedAccessor.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/reflect/TransducedAccessor.java
b3e941f
@@ -47,9 +47,7 @@ import javax.xml.bind.JAXBException;
b3e941f
 import javax.xml.bind.annotation.XmlValue;
b3e941f
 import javax.xml.stream.XMLStreamException;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
-import com.sun.istack.Nullable;
b3e941f
-import com.sun.istack.SAXException2;
b3e941f
+import org.xml.sax.SAXException;
b3e941f
 import com.sun.xml.bind.WhiteSpaceProcessor;
b3e941f
 import com.sun.xml.bind.api.AccessorException;
b3e941f
 import com.sun.xml.bind.v2.model.core.ID;
b3e941f
@@ -110,7 +108,7 @@ public abstract class TransducedAccessor<BeanT> {
b3e941f
      * @return
b3e941f
      *      if the accessor didn't yield a value, return null.
b3e941f
      */
b3e941f
-    public abstract @Nullable CharSequence print(@NotNull BeanT o) throws AccessorException, SAXException;
b3e941f
+    public abstract  CharSequence print( BeanT o) throws AccessorException, SAXException;
b3e941f
 
b3e941f
     /**
b3e941f
      * Parses the text value into the responsible field of the given bean.
b3e941f
@@ -321,7 +319,7 @@ public abstract class TransducedAccessor<BeanT> {
b3e941f
             } catch (RuntimeException e) {// from callable.call
b3e941f
                 throw e;
b3e941f
             } catch (Exception e) {// from callable.call
b3e941f
-                throw new SAXException2(e);
b3e941f
+                throw new SAXException(e);
b3e941f
             }
b3e941f
             if(t!=null) {
b3e941f
                 assign(bean,t,context);
b3e941f
@@ -344,7 +342,7 @@ public abstract class TransducedAccessor<BeanT> {
b3e941f
                         } catch (RuntimeException e) {// from callable.call
b3e941f
                             throw e;
b3e941f
                         } catch (Exception e) {// from callable.call
b3e941f
-                            throw new SAXException2(e);
b3e941f
+                            throw new SAXException(e);
b3e941f
                         }
b3e941f
                     }
b3e941f
                 });
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/unmarshaller/Base64Data.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/unmarshaller/Base64Data.java
b3e941f
index ac479ec..8e61905 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/unmarshaller/Base64Data.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/unmarshaller/Base64Data.java
b3e941f
@@ -55,7 +55,6 @@ import com.sun.xml.bind.v2.runtime.XMLSerializer;
b3e941f
 import com.sun.xml.bind.v2.runtime.output.Pcdata;
b3e941f
 import com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput;
b3e941f
 import com.sun.xml.bind.v2.util.ByteArrayOutputStreamEx;
b3e941f
-import com.sun.istack.Nullable;
b3e941f
 
b3e941f
 /**
b3e941f
  * Fed to unmarshaller when the 'text' data is actually
b3e941f
@@ -90,7 +89,7 @@ public final class Base64Data extends Pcdata {
b3e941f
      * Unused when {@link #dataHandler} is set.
b3e941f
      * Use {@link DataHandler#getContentType()} in that case.
b3e941f
      */
b3e941f
-    private @Nullable
b3e941f
+    private 
b3e941f
     String mimeType;
b3e941f
 
b3e941f
     /**
b3e941f
@@ -99,7 +98,7 @@ public final class Base64Data extends Pcdata {
b3e941f
      * @param len
b3e941f
      *      data[0] to data[len-1] are treated as the data.
b3e941f
      */
b3e941f
-    public void set(byte[] data, int len, @Nullable String mimeType) {
b3e941f
+    public void set(byte[] data, int len,  String mimeType) {
b3e941f
         this.data = data;
b3e941f
         this.dataLen = len;
b3e941f
         this.dataHandler = null;
b3e941f
@@ -112,7 +111,7 @@ public final class Base64Data extends Pcdata {
b3e941f
      * @param data
b3e941f
      *      this buffer may be owned directly by the unmarshaleld JAXB object.
b3e941f
      */
b3e941f
-    public void set(byte[] data, @Nullable String mimeType) {
b3e941f
+    public void set(byte[] data,  String mimeType) {
b3e941f
         set(data, data.length, mimeType);
b3e941f
     }
b3e941f
 
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/unmarshaller/UnmarshallingContext.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/unmarshaller/UnmarshallingContext.java
b3e941f
index 265032d..35118e3 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/unmarshaller/UnmarshallingContext.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/unmarshaller/UnmarshallingContext.java
b3e941f
@@ -64,9 +64,7 @@ import javax.xml.bind.helpers.ValidationEventImpl;
b3e941f
 import javax.xml.namespace.NamespaceContext;
b3e941f
 import javax.xml.namespace.QName;
b3e941f
 
b3e941f
-import com.sun.istack.NotNull;
b3e941f
-import com.sun.istack.Nullable;
b3e941f
-import com.sun.istack.SAXParseException2;
b3e941f
+import org.xml.sax.SAXParseException;
b3e941f
 import com.sun.xml.bind.IDResolver;
b3e941f
 import com.sun.xml.bind.Util;
b3e941f
 import com.sun.xml.bind.api.AccessorException;
b3e941f
@@ -119,7 +117,7 @@ public final class UnmarshallingContext extends Coordinator
b3e941f
         DUMMY_INSTANCE = new LocatorExWrapper(loc);
b3e941f
     }
b3e941f
 
b3e941f
-    private @NotNull LocatorEx locator = DUMMY_INSTANCE;
b3e941f
+    private  LocatorEx locator = DUMMY_INSTANCE;
b3e941f
 
b3e941f
     /** Root object that is being unmarshalled. */
b3e941f
     private Object result;
b3e941f
@@ -190,13 +188,13 @@ public final class UnmarshallingContext extends Coordinator
b3e941f
     /**
b3e941f
      * Used to discover additional classes when we hit unknown elements/types.
b3e941f
      */
b3e941f
-    public @Nullable ClassResolver classResolver;
b3e941f
+    public  ClassResolver classResolver;
b3e941f
 
b3e941f
     /**
b3e941f
      * User-supplied {@link ClassLoader} for converting name to {@link Class}.
b3e941f
      * For backward compatibility, when null, use thread context classloader.
b3e941f
      */
b3e941f
-    public @Nullable ClassLoader classLoader;
b3e941f
+    public  ClassLoader classLoader;
b3e941f
 
b3e941f
     /**
b3e941f
      * The variable introduced to avoid reporting n^10 similar errors.
b3e941f
@@ -737,7 +735,7 @@ public final class UnmarshallingContext extends Coordinator
b3e941f
         if(!recover)    aborted = true;
b3e941f
 
b3e941f
         if( !canRecover || !recover )
b3e941f
-            throw new SAXParseException2( event.getMessage(), locator,
b3e941f
+            throw new SAXParseException( event.getMessage(), locator,
b3e941f
                 new UnmarshalException(
b3e941f
                     event.getMessage(),
b3e941f
                     event.getLinkedException() ) );
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/unmarshaller/XsiTypeLoader.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/unmarshaller/XsiTypeLoader.java
b3e941f
index 4766583..3cbec32 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/unmarshaller/XsiTypeLoader.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/runtime/unmarshaller/XsiTypeLoader.java
b3e941f
@@ -45,7 +45,6 @@ import javax.xml.namespace.QName;
b3e941f
 import com.sun.xml.bind.DatatypeConverterImpl;
b3e941f
 import com.sun.xml.bind.v2.WellKnownNamespace;
b3e941f
 import com.sun.xml.bind.v2.runtime.JaxBeanInfo;
b3e941f
-import com.sun.istack.Nullable;
b3e941f
 
b3e941f
 import java.util.Collection;
b3e941f
 import java.util.Collections;
b3e941f
@@ -80,7 +79,7 @@ public class XsiTypeLoader extends Loader {
b3e941f
         loader.startElement(state,ea);
b3e941f
     }
b3e941f
 
b3e941f
-    /*pacakge*/ static JaxBeanInfo parseXsiType(UnmarshallingContext.State state, TagName ea, @Nullable JaxBeanInfo defaultBeanInfo) throws SAXException {
b3e941f
+    /*pacakge*/ static JaxBeanInfo parseXsiType(UnmarshallingContext.State state, TagName ea,  JaxBeanInfo defaultBeanInfo) throws SAXException {
b3e941f
         UnmarshallingContext context = state.getContext();
b3e941f
         JaxBeanInfo beanInfo = null;
b3e941f
 
b3e941f
diff --git a/runtime/impl/src/main/java/com/sun/xml/bind/v2/schemagen/XmlSchemaGenerator.java b/runtime/impl/src/main/java/com/sun/xml/bind/v2/schemagen/XmlSchemaGenerator.java
b3e941f
index c8380a3..cc85be8 100644
b3e941f
--- a/runtime/impl/src/main/java/com/sun/xml/bind/v2/schemagen/XmlSchemaGenerator.java
b3e941f
+++ b/runtime/impl/src/main/java/com/sun/xml/bind/v2/schemagen/XmlSchemaGenerator.java
b3e941f
@@ -63,8 +63,6 @@ import javax.xml.namespace.QName;
b3e941f
 import javax.xml.transform.Result;
b3e941f
 import javax.xml.transform.stream.StreamResult;
b3e941f
 
b3e941f
-import com.sun.istack.Nullable;
b3e941f
-import com.sun.istack.NotNull;
b3e941f
 import com.sun.xml.bind.Util;
b3e941f
 import com.sun.xml.bind.api.CompositeStructure;
b3e941f
 import com.sun.xml.bind.api.ErrorListener;
b3e941f
@@ -504,7 +502,7 @@ public final class XmlSchemaGenerator<T,C,F,M> {
b3e941f
      * Schema components are organized per namespace.
b3e941f
      */
b3e941f
     private class Namespace {
b3e941f
-        final @NotNull String uri;
b3e941f
+        final  String uri;
b3e941f
 
b3e941f
         /**
b3e941f
          * Other {@link Namespace}s that this namespace depends on.
b3e941f
@@ -588,7 +586,7 @@ public final class XmlSchemaGenerator<T,C,F,M> {
b3e941f
             }
b3e941f
         }
b3e941f
 
b3e941f
-        private void addDependencyTo(@Nullable QName qname) {
b3e941f
+        private void addDependencyTo( QName qname) {
b3e941f
             // even though the Element interface says getElementName() returns non-null,
b3e941f
             // ClassInfo always implements Element (even if an instance of ClassInfo might not be an Element).
b3e941f
             // so this check is still necessary
b3e941f
-- 
b3e941f
2.20.1
b3e941f