changeset 1135:866193ed1527

Merge
author asaha
date Tue, 14 Oct 2014 12:19:29 -0700
parents 1aa125e535a8 9136d3e30381
children fbda99b4ea8a
files .hgtags
diffstat 25 files changed, 195 insertions(+), 146 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Oct 14 10:33:33 2014 -0700
+++ b/.hgtags	Tue Oct 14 12:19:29 2014 -0700
@@ -472,6 +472,9 @@
 dedfc93eeb5f4b28ad1a91902a0676aef0937e42 jdk7u65-b18
 db4cccbfd72fc265b736a273797963754434a7d2 jdk7u65-b19
 0cd66509e11335fac490076cbdcb2f47c592de86 jdk7u65-b32
+bef313c7ff7a7a829f8f6a305bf0c3738ad99795 jdk7u80-b00
+0eb2482c3d0663c39794ec4c268acc41c4cd387b jdk7u80-b01
+579128925dd9a0e9c529125c9e299dc0518037a5 jdk7u80-b02
 28d868d40df0d420b87698e1215e5039d24a8ae5 jdk7u65-b20
 1ef1681e21ca00edbc8727e849fef50637cc52d8 jdk7u67-b01
 db4cccbfd72fc265b736a273797963754434a7d2 jdk7u65-b40
@@ -527,5 +530,11 @@
 ce5b9e0d988cb52d9e6c36edeafe60bd16280534 jdk7u75-b01
 1b6ba791cbf7d995a81dfd1478906ebae3769ea2 jdk7u75-b02
 033349ac9e45fd897571ff4f6e38ed48d46cd539 jdk7u75-b03
+f1266833b5a07aa84d5da263f4a18503838286f4 jdk7u75-b04
+5d60eecdd6b881856ddfc34e0d34f3072575662a jdk7u76-b00
+9fed28dcccaafd49f9a4b2aee30b2babc97d4a93 jdk7u76-b01
+7e479fddbf5d7b7840319a44d9e72562d7cfd83b jdk7u76-b02
+2dcdee347bf25efe5e5d5242a5608547398bb7c7 jdk7u76-b03
+42324883f9b32a6eaaf39c8e5d8ba2c65fb1015e jdk7u76-b04
 f1266833b5a07aa84d5da263f4a18503838286f4 jdk7u79-b00
-913474150da7c865ba5b923737ea522d68cd5c10 jdk7u75-b04
+
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ArrayBeanInfoImpl.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ArrayBeanInfoImpl.java	Tue Oct 14 12:19:29 2014 -0700
@@ -79,19 +79,19 @@
 
         @Override
         public void startElement(UnmarshallingContext.State state, TagName ea) {
-            state.target = new ArrayList();
+            state.setTarget(new ArrayList());
         }
 
         @Override
         public void leaveElement(UnmarshallingContext.State state, TagName ea) {
-            state.target = toArray((List)state.target);
+            state.setTarget(toArray((List)state.getTarget()));
         }
 
         @Override
         public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
             if(ea.matches("","item")) {
-                state.loader = itemLoader;
-                state.receiver = this;
+                state.setLoader(itemLoader);
+                state.setReceiver(this);
             } else {
                 super.childElement(state,ea);
             }
@@ -103,9 +103,9 @@
         }
 
         public void receive(UnmarshallingContext.State state, Object o) {
-            ((List)state.target).add(o);
+            ((List)state.getTarget()).add(o);
         }
-    };
+    }
 
     protected Object toArray( List list ) {
         int len = list.size();
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ContentHandlerAdaptor.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ContentHandlerAdaptor.java	Tue Oct 14 12:19:29 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -25,10 +25,6 @@
 
 package com.sun.xml.internal.bind.v2.runtime;
 
-import java.io.IOException;
-
-import javax.xml.stream.XMLStreamException;
-
 import com.sun.istack.internal.FinalArrayList;
 import com.sun.istack.internal.SAXException2;
 
@@ -36,6 +32,9 @@
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;
 
+import javax.xml.stream.XMLStreamException;
+import java.io.IOException;
+
 /**
  * Receives SAX2 events and send the equivalent events to
  * {@link XMLSerializer}
@@ -70,14 +69,14 @@
     private boolean containsPrefixMapping(String prefix, String uri) {
         for( int i=0; i<prefixMap.size(); i+=2 ) {
             if(prefixMap.get(i).equals(prefix)
-            && prefixMap.get(i+1).equals(uri))
+                    && prefixMap.get(i+1).equals(uri))
                 return true;
         }
         return false;
     }
 
     public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
-        throws SAXException {
+            throws SAXException {
         try {
             flushText();
 
@@ -92,13 +91,13 @@
                 serializer.startElement(namespaceURI,localName, p,null);
 
             // declare namespace events
-            for( int i=0; i<prefixMap.size(); i+=2 ) {
+            for (int i = 0; i < prefixMap.size(); i += 2) {
                 // forcibly set this binding, instead of using declareNsUri.
                 // this guarantees that namespaces used in DOM will show up
                 // as-is in the marshalled output (instead of reassigned to something else,
                 // which may happen if you'd use declareNsUri.)
                 serializer.getNamespaceContext().force(
-                    prefixMap.get(i+1), prefixMap.get(i) );
+                        prefixMap.get(i + 1), prefixMap.get(i));
             }
             // make sure namespaces needed by attributes are bound
             for( int i=0; i<len; i++ ) {
@@ -108,7 +107,7 @@
                 String prefix = getPrefix(qname);
 
                 serializer.getNamespaceContext().declareNamespace(
-                    atts.getURI(i), prefix, true );
+                        atts.getURI(i), prefix, true );
             }
 
             serializer.endNamespaceDecls(null);
@@ -128,9 +127,10 @@
         }
     }
 
+    // make sure namespaces needed by attributes are bound
     private String getPrefix(String qname) {
         int idx = qname.indexOf(':');
-        String prefix = (idx==-1)?qname:qname.substring(0,idx);
+        String prefix = (idx == -1) ? "" : qname.substring(0, idx);
         return prefix;
     }
 
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java	Tue Oct 14 12:19:29 2014 -0700
@@ -208,8 +208,8 @@
 
         @Override
         public final void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
-            state.loader = core;
-            state.intercepter = this;
+            state.setLoader(core);
+            state.setIntercepter(this);
 
             // TODO: make sure there aren't too many duplicate of this code
             // create the object to unmarshal
@@ -231,21 +231,21 @@
             fireBeforeUnmarshal(ElementBeanInfoImpl.this, child, state);
 
             context.recordOuterPeer(child);
-            UnmarshallingContext.State p = state.prev;
-            p.backup = p.target;
-            p.target = child;
+            UnmarshallingContext.State p = state.getPrev();
+            p.setBackup(p.getTarget());
+            p.setTarget(child);
 
             core.startElement(state,ea);
         }
 
         public Object intercept(UnmarshallingContext.State state, Object o) throws SAXException {
-            JAXBElement e = (JAXBElement)state.target;
-            state.target = state.backup;
-            state.backup = null;
+            JAXBElement e = (JAXBElement)state.getTarget();
+            state.setTarget(state.getBackup());
+            state.setBackup(null);
 
-            if (state.nil) {
+            if (state.isNil()) {
                 e.setNil(true);
-                state.nil = false;
+                state.setNil(false);
             }
 
             if(o!=null)
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ValueListBeanInfoImpl.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ValueListBeanInfoImpl.java	Tue Oct 14 12:19:29 2014 -0700
@@ -90,7 +90,7 @@
                 idx = p;
             }
 
-            state.target = toArray(r);
+            state.setTarget(toArray(r));
         }
     };
 
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayERProperty.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayERProperty.java	Tue Oct 14 12:19:29 2014 -0700
@@ -98,7 +98,7 @@
             UnmarshallingContext context = state.getContext();
             context.startScope(1);
             // inherit the target so that our children can access its target
-            state.target = state.prev.target;
+            state.setTarget(state.getPrev().getTarget());
 
             // start it now, so that even if there's no children we can still return empty collection
             context.getScope(0).start(acc,lister);
@@ -116,8 +116,8 @@
                 super.childElement(state,ea);
                 return;
             }
-            state.loader = child.loader;
-            state.receiver = child.receiver;
+            state.setLoader(child.loader);
+            state.setReceiver(child.receiver);
         }
 
         @Override
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java	Tue Oct 14 12:19:29 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -147,17 +147,17 @@
         public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
             // create or obtain the Map object
             try {
-                target.set((BeanT)state.prev.target);
+                target.set((BeanT)state.getPrev().getTarget());
                 map.set(acc.get(target.get()));
                 if(map.get() == null) {
                     map.set(ClassFactory.create(mapImplClass));
                 }
                 map.get().clear();
-                state.target = map.get();
+                state.setTarget(map.get());
             } catch (AccessorException e) {
                 // recover from error by setting a dummy Map that receives and discards the values
                 handleGenericException(e,true);
-                state.target = new HashMap();
+                state.setTarget(new HashMap());
             }
         }
 
@@ -175,7 +175,7 @@
         @Override
         public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
             if(ea.matches(entryTag)) {
-                state.loader = entryLoader;
+                state.setLoader(entryLoader);
             } else {
                 super.childElement(state,ea);
             }
@@ -195,26 +195,26 @@
     private final Loader entryLoader = new Loader(false) {
         @Override
         public void startElement(UnmarshallingContext.State state, TagName ea) {
-            state.target = new Object[2];  // this is inefficient
+            state.setTarget(new Object[2]);  // this is inefficient
         }
 
         @Override
         public void leaveElement(UnmarshallingContext.State state, TagName ea) {
-            Object[] keyValue = (Object[])state.target;
-            Map map = (Map) state.prev.target;
+            Object[] keyValue = (Object[])state.getTarget();
+            Map map = (Map) state.getPrev().getTarget();
             map.put(keyValue[0],keyValue[1]);
         }
 
         @Override
         public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
             if(ea.matches(keyTag)) {
-                state.loader = keyLoader;
-                state.receiver = keyReceiver;
+                state.setLoader(keyLoader);
+                state.setReceiver(keyReceiver);
                 return;
             }
             if(ea.matches(valueTag)) {
-                state.loader = valueLoader;
-                state.receiver = valueReceiver;
+                state.setLoader(valueLoader);
+                state.setReceiver(valueReceiver);
                 return;
             }
             super.childElement(state,ea);
@@ -232,7 +232,7 @@
             this.index = index;
         }
         public void receive(UnmarshallingContext.State state, Object o) {
-            ((Object[])state.target)[index] = o;
+            ((Object[])state.getTarget())[index] = o;
         }
     }
 
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java	Tue Oct 14 12:19:29 2014 -0700
@@ -152,7 +152,7 @@
 
     public void receive(UnmarshallingContext.State state, Object o) throws SAXException {
         try {
-            set((BeanT) state.target, (ValueT) o);
+            set((BeanT) state.getTarget(), (ValueT) o);
         } catch (AccessorException e) {
             Loader.handleGenericException(e, true);
         } catch (IllegalAccessError iae) {
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DefaultValueLoaderDecorator.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DefaultValueLoaderDecorator.java	Tue Oct 14 12:19:29 2014 -0700
@@ -44,10 +44,10 @@
     @Override
     public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
         // install the default value, but don't override the one given by the parent loader
-        if(state.elementDefaultValue==null)
-            state.elementDefaultValue = defaultValue;
+        if(state.getElementDefaultValue() == null)
+            state.setElementDefaultValue(defaultValue);
 
-        state.loader = l;
+        state.setLoader(l);
         l.startElement(state,ea);
     }
 }
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Discarder.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Discarder.java	Tue Oct 14 12:19:29 2014 -0700
@@ -44,8 +44,8 @@
 
     @Override
     public void childElement(UnmarshallingContext.State state, TagName ea) {
-        state.target = null;
+        state.setTarget(null);
         // registering this allows the discarder to process the whole subtree.
-        state.loader = this;
+        state.setLoader(this);
     }
 }
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DomLoader.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DomLoader.java	Tue Oct 14 12:19:29 2014 -0700
@@ -98,10 +98,10 @@
     @Override
     public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
         UnmarshallingContext context = state.getContext();
-        if (state.target == null)
-            state.target = new State(context);
+        if (state.getTarget() == null)
+            state.setTarget(new State(context));
 
-        State s = (State) state.target;
+        State s = (State) state.getTarget();
         try {
             s.declarePrefixes(context, context.getNewlyDeclaredPrefixes());
             s.handler.startElement(ea.uri, ea.local, ea.getQname(), ea.atts);
@@ -113,10 +113,10 @@
 
     @Override
     public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
-        state.loader = this;
-        State s = (State) state.prev.target;
+        state.setLoader(this);
+        State s = (State) state.getPrev().getTarget();
         s.depth++;
-        state.target = s;
+        state.setTarget(s);
     }
 
     @Override
@@ -124,7 +124,7 @@
         if(text.length()==0)
             return;     // there's no point in creating an empty Text node in DOM.
         try {
-            State s = (State) state.target;
+            State s = (State) state.getTarget();
             s.handler.characters(text.toString().toCharArray(),0,text.length());
         } catch( SAXException e ) {
             state.getContext().handleError(e);
@@ -134,7 +134,7 @@
 
     @Override
     public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
-        State s = (State) state.target;
+        State s = (State) state.getTarget();
         UnmarshallingContext context = state.getContext();
 
         try {
@@ -156,7 +156,7 @@
             }
 
             // we are done
-            state.target = s.getElement();
+            state.setTarget(s.getElement());
         }
     }
 
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyLoader.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyLoader.java	Tue Oct 14 12:19:29 2014 -0700
@@ -47,7 +47,7 @@
 
     public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
         try {
-            xacc.parse(state.prev.target,text);
+            xacc.parse(state.getPrev().getTarget(), text);
         } catch (AccessorException e) {
             handleGenericException(e,true);
         } catch (RuntimeException e) {
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyXsiLoader.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyXsiLoader.java	Tue Oct 14 12:19:29 2014 -0700
@@ -55,9 +55,9 @@
 
     @Override
     public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
-        state.loader = selectLoader(state, ea);
-
-        state.loader.startElement(state, ea);
+        final Loader loader = selectLoader(state, ea);
+        state.setLoader(loader);
+        loader.startElement(state, ea);
     }
 
     protected Loader selectLoader(UnmarshallingContext.State state, TagName ea) throws SAXException {
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Loader.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Loader.java	Tue Oct 14 12:19:29 2014 -0700
@@ -88,8 +88,8 @@
     public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
         // notify the error, then recover by ignoring the whole element.
         reportUnexpectedChildElement(ea, true);
-        state.loader = Discarder.INSTANCE;
-        state.receiver = null;
+        state.setLoader(Discarder.INSTANCE);
+        state.setReceiver(null);
     }
 
     @SuppressWarnings({"StringEquality"})
@@ -191,10 +191,10 @@
             UnmarshallingContext context = state.getContext();
             Unmarshaller.Listener listener = context.parent.getListener();
             if(beanInfo.hasBeforeUnmarshalMethod()) {
-                beanInfo.invokeBeforeUnmarshalMethod(context.parent, child, state.prev.target);
+                beanInfo.invokeBeforeUnmarshalMethod(context.parent, child, state.getPrev().getTarget());
             }
             if(listener!=null) {
-                listener.beforeUnmarshal(child, state.prev.target);
+                listener.beforeUnmarshal(child, state.getPrev().getTarget());
             }
         }
     }
@@ -211,10 +211,10 @@
             UnmarshallingContext context = state.getContext();
             Unmarshaller.Listener listener = context.parent.getListener();
             if(beanInfo.hasAfterUnmarshalMethod()) {
-                beanInfo.invokeAfterUnmarshalMethod(context.parent, child, state.target);
+                beanInfo.invokeAfterUnmarshalMethod(context.parent, child, state.getTarget());
             }
             if(listener!=null)
-                listener.afterUnmarshal(child, state.target);
+                listener.afterUnmarshal(child, state.getTarget());
         }
     }
 
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ProxyLoader.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ProxyLoader.java	Tue Oct 14 12:19:29 2014 -0700
@@ -41,7 +41,7 @@
     @Override
     public final void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
         Loader loader = selectLoader(state,ea);
-        state.loader = loader;
+        state.setLoader(loader);
         loader.startElement(state,ea);
     }
 
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SAXConnector.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SAXConnector.java	Tue Oct 14 12:19:29 2014 -0700
@@ -116,17 +116,7 @@
         if( qname==null || qname.length()==0 )
             qname=local;
 
-
-        boolean ignorable = true;
-        StructureLoader sl;
-
-        // not null only if element content is processed (StructureLoader is used)
-        // ugly
-        if((sl = this.context.getStructureLoader()) != null) {
-            ignorable = ((ClassBeanInfoImpl)sl.getBeanInfo()).hasElementOnlyContentModel();
-        }
-
-        processText(ignorable);
+        processText(!context.getCurrentState().isMixed());
 
         tagName.uri = uri;
         tagName.local = local;
@@ -162,7 +152,7 @@
     }
 
     private void processText( boolean ignorable ) throws SAXException {
-        if( predictor.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer)))
+        if (predictor.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer)))
             next.text(buffer);
         buffer.setLength(0);
     }
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Scope.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Scope.java	Tue Oct 14 12:19:29 2014 -0700
@@ -97,7 +97,7 @@
     public void add( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister, ItemT value) throws SAXException{
         try {
             if(!hasStarted()) {
-                this.bean = (BeanT)context.getCurrentState().target;
+                this.bean = (BeanT)context.getCurrentState().getTarget();
                 this.acc = acc;
                 this.lister = lister;
                 this.pack = lister.startPacking(bean,acc);
@@ -121,7 +121,7 @@
     public void start( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister) throws SAXException{
         try {
             if(!hasStarted()) {
-                this.bean = (BeanT)context.getCurrentState().target;
+                this.bean = (BeanT)context.getCurrentState().getTarget();
                 this.acc = acc;
                 this.lister = lister;
                 this.pack = lister.startPacking(bean,acc);
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXStreamConnector.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXStreamConnector.java	Tue Oct 14 12:19:29 2014 -0700
@@ -70,7 +70,7 @@
         // Quick hack until SJSXP fixes 6270116
         boolean isZephyr = readerClass.getName().equals("com.sun.xml.internal.stream.XMLReaderImpl");
         if (getBoolProp(reader,"org.codehaus.stax2.internNames") &&
-            getBoolProp(reader,"org.codehaus.stax2.internNsUris"))
+                getBoolProp(reader,"org.codehaus.stax2.internNsUris"))
             ; // no need for interning
         else
         if (isZephyr)
@@ -219,8 +219,8 @@
         int nsCount = staxStreamReader.getNamespaceCount();
         for (int i = 0; i < nsCount; i++) {
             visitor.startPrefixMapping(
-                fixNull(staxStreamReader.getNamespacePrefix(i)),
-                fixNull(staxStreamReader.getNamespaceURI(i)));
+                    fixNull(staxStreamReader.getNamespacePrefix(i)),
+                    fixNull(staxStreamReader.getNamespaceURI(i)));
         }
 
         // fire startElement
@@ -310,13 +310,13 @@
     protected void handleCharacters() throws XMLStreamException, SAXException {
         if( predictor.expectText() )
             buffer.append(
-                staxStreamReader.getTextCharacters(),
-                staxStreamReader.getTextStart(),
-                staxStreamReader.getTextLength() );
+                    staxStreamReader.getTextCharacters(),
+                    staxStreamReader.getTextStart(),
+                    staxStreamReader.getTextLength() );
     }
 
     private void processText( boolean ignorable ) throws SAXException {
-        if( predictor.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer))) {
+        if( predictor.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer) || context.getCurrentState().isMixed())) {
             if(textReported) {
                 textReported = false;
             } else {
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java	Tue Oct 14 12:19:29 2014 -0700
@@ -171,7 +171,7 @@
 
         context.recordInnerPeer(child);
 
-        state.target = child;
+        state.setTarget(child);
 
         fireBeforeUnmarshal(beanInfo, child, state);
 
@@ -196,7 +196,7 @@
                         String qname = atts.getQName(i);
                         if(atts.getURI(i).equals(WellKnownNamespace.XML_SCHEMA_INSTANCE))
                             continue;   // xsi:* attributes are meant to be processed by us, not by user apps.
-                        Object o = state.target;
+                        Object o = state.getTarget();
                         Map<QName,String> map = attCatchAll.get(o);
                         if(map==null) {
                             // TODO: use  ClassFactory.inferImplClass(sig,knownImplClasses)
@@ -238,8 +238,8 @@
             }
         }
 
-        state.loader = child.loader;
-        state.receiver = child.receiver;
+        state.setLoader(child.loader);
+        state.setReceiver(child.receiver);
     }
 
     @Override
@@ -261,7 +261,7 @@
     @Override
     public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
         state.getContext().endScope(frameSize);
-        fireAfterUnmarshal(beanInfo, state.target, state.prev);
+        fireAfterUnmarshal(beanInfo, state.getTarget(), state.getPrev());
     }
 
     private static final QNameMap<TransducedAccessor> EMPTY = new QNameMap<TransducedAccessor>();
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/TextLoader.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/TextLoader.java	Tue Oct 14 12:19:29 2014 -0700
@@ -51,7 +51,7 @@
 
     public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
         try {
-            state.target = xducer.parse(text);
+            state.setTarget(xducer.parse(text));
         } catch (AccessorException e) {
             handleGenericException(e,true);
         } catch (RuntimeException e) {
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallingContext.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallingContext.java	Tue Oct 14 12:19:29 2014 -0700
@@ -183,20 +183,19 @@
         /**
          * Loader that owns this element.
          */
-        public Loader loader;
+        private Loader loader;
         /**
          * Once {@link #loader} is completed, this receiver
          * receives the result.
          */
-        public Receiver receiver;
+        private Receiver receiver;
 
-        public Intercepter intercepter;
-
+        private Intercepter intercepter;
 
         /**
          * Object being unmarshalled by this {@link #loader}.
          */
-        public Object target;
+        private Object target;
 
         /**
          * Hack for making JAXBElement unmarshalling work.
@@ -225,7 +224,7 @@
          * @see ElementBeanInfoImpl.IntercepterLoader#startElement(State, TagName)
          * @see ElementBeanInfoImpl.IntercepterLoader#intercept(State, Object)
          */
-        public Object backup;
+        private Object backup;
 
         /**
          * Number of {@link UnmarshallingContext#nsBind}s declared thus far.
@@ -241,17 +240,22 @@
          * or by a child {@link Loader} when
          * {@link Loader#startElement(State, TagName)} is called.
          */
-        public String elementDefaultValue;
+        private String elementDefaultValue;
 
         /**
          * {@link State} for the parent element
          *
          * {@link State} objects form a doubly linked list.
          */
-        public State prev;
+        private State prev;
         private State next;
 
-        public boolean nil = false;
+        private boolean nil = false;
+
+        /**
+         * specifies that we are working with mixed content
+         */
+        private boolean mixed = false;
 
         /**
          * Gets the context.
@@ -262,13 +266,17 @@
 
         private State(State prev) {
             this.prev = prev;
-            if(prev!=null)
+            if(prev!=null) {
                 prev.next = this;
+                if (prev.mixed) // parent is in mixed mode
+                    this.mixed = true;
+            }
         }
 
         private void push() {
-            if(next==null)
-                allocateMoreStates();
+            if(next==null) {
+                next = new State(this);
+            }
             State n = next;
             n.numNsDecl = nsLen;
             current = n;
@@ -278,11 +286,71 @@
             assert prev!=null;
             loader = null;
             nil = false;
+            mixed = false;
             receiver = null;
             intercepter = null;
             elementDefaultValue = null;
             target = null;
             current = prev;
+            next = null;
+        }
+
+        public boolean isMixed() {
+            return mixed;
+        }
+
+        public Object getTarget() {
+            return target;
+        }
+
+        public void setLoader(Loader loader) {
+            if (loader instanceof StructureLoader) // set mixed mode
+                mixed = !((StructureLoader)loader).getBeanInfo().hasElementOnlyContentModel();
+            this.loader = loader;
+        }
+
+        public void setReceiver(Receiver receiver) {
+            this.receiver = receiver;
+        }
+
+        public State getPrev() {
+            return prev;
+        }
+
+        public void setIntercepter(Intercepter intercepter) {
+            this.intercepter = intercepter;
+        }
+
+        public void setBackup(Object backup) {
+            this.backup = backup;
+        }
+
+        public void setTarget(Object target) {
+            this.target = target;
+        }
+
+        public Object getBackup() {
+            return backup;
+        }
+
+        public boolean isNil() {
+            return nil;
+        }
+
+        public void setNil(boolean nil) {
+            this.nil = nil;
+        }
+
+        public Loader getLoader() {
+            return loader;
+        }
+
+        public String getElementDefaultValue() {
+            return elementDefaultValue;
+        }
+
+        public void setElementDefaultValue(String elementDefaultValue) {
+            this.elementDefaultValue = elementDefaultValue;
         }
     }
 
@@ -322,7 +390,6 @@
         this.parent = _parent;
         this.assoc = assoc;
         this.root = this.current = new State(null);
-        allocateMoreStates();
     }
 
     public void reset(InfosetScanner scanner,boolean isInplaceMode, JaxBeanInfo expectedType, IDResolver idResolver) {
@@ -369,22 +436,6 @@
         return null;
     }
 
-    /**
-     * Allocates a few more {@link State}s.
-     *
-     * Allocating multiple {@link State}s at once allows those objects
-     * to be allocated near each other, which reduces the working set
-     * of CPU. It improves the chance the relevant data is in the cache.
-     */
-    private void allocateMoreStates() {
-        // this method should be used only when we run out of a state.
-        assert current.next==null;
-
-        State s = current;
-        for( int i=0; i<8; i++ )
-            s = new State(s);
-    }
-
     public void clearStates() {
         State last = current;
         while (last.next != null) last = last.next;
@@ -487,16 +538,15 @@
     }
 
     public void text(CharSequence pcdata) throws SAXException {
-        State cur = current;
         pushCoordinator();
         try {
-            if(cur.elementDefaultValue!=null) {
-                if(pcdata.length()==0) {
+            if (current.elementDefaultValue != null) {
+                if (pcdata.length() == 0) {
                     // send the default value into the unmarshaller instead
-                    pcdata = cur.elementDefaultValue;
+                    pcdata = current.elementDefaultValue;
                 }
             }
-            cur.loader.text(cur,pcdata);
+            current.loader.text(current, pcdata);
         } finally {
             popCoordinator();
         }
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValuePropertyLoader.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValuePropertyLoader.java	Tue Oct 14 12:19:29 2014 -0700
@@ -49,18 +49,17 @@
 
     public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
         try {
-            xacc.parse(state.target,text);
+            xacc.parse(state.getTarget(),text);
         } catch (AccessorException e) {
             handleGenericException(e,true);
         } catch (RuntimeException e) {
-            if(state.prev != null) {
-                if(state.prev.target instanceof JAXBElement) {
-                    ; // do nothing - issue 601 - don't report exceptions like
-                      // NumberFormatException when unmarshalling "nillable" element
-                      // (I suppose JAXBElement indicates this
-                } else {
+            if(state.getPrev() != null) {
+                if (!(state.getPrev().getTarget() instanceof JAXBElement))
                     handleParseConversionException(state,e);
-                }
+                // else
+                // do nothing - issue 601 - don't report exceptions like
+                // NumberFormatException when unmarshalling "nillable" element
+                // (I suppose JAXBElement indicates this
             } else {
                 handleParseConversionException(state,e);
             }
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiNilLoader.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiNilLoader.java	Tue Oct 14 12:19:29 2014 -0700
@@ -62,7 +62,7 @@
                 onNil(state);
                 boolean hasOtherAttributes = (ea.atts.getLength() - 1) > 0;
                 // see issues 6759703 and 565 - need to preserve attributes even if the element is nil; only when the type is stored in JAXBElement
-                if (!(hasOtherAttributes && (state.prev.target instanceof JAXBElement))) {
+                if (!(hasOtherAttributes && (state.getPrev().getTarget() instanceof JAXBElement))) {
                     return Discarder.INSTANCE;
                 }
             }
@@ -96,8 +96,8 @@
         @Override
         protected void onNil(UnmarshallingContext.State state) throws SAXException {
             try {
-                acc.set(state.prev.target,null);
-                state.prev.nil = true;
+                acc.set(state.getPrev().getTarget(),null);
+                state.getPrev().setNil(true);
             } catch (AccessorException e) {
                 handleGenericException(e,true);
             }
@@ -113,7 +113,7 @@
         @Override
         protected void onNil(UnmarshallingContext.State state) {
             // let the receiver add this to the lister
-            state.target = null;
+            state.setTarget(null);
         }
     }
 }
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiTypeLoader.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiTypeLoader.java	Tue Oct 14 12:19:29 2014 -0700
@@ -61,7 +61,7 @@
             beanInfo = defaultBeanInfo;
 
         Loader loader = beanInfo.getLoader(null,false);
-        state.loader = loader;
+        state.setLoader(loader);
         loader.startElement(state,ea);
     }
 
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java	Tue Oct 14 10:33:33 2014 -0700
+++ b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java	Tue Oct 14 12:19:29 2014 -0700
@@ -571,7 +571,8 @@
                     mailMap.addMailcap("text/xml;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler");
                     mailMap.addMailcap("application/xml;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler");
                     mailMap.addMailcap("application/fastinfoset;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.FastInfosetDataContentHandler");
-                    mailMap.addMailcap("multipart/*;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.MultipartDataContentHandler");
+                    // this handler seems to be not used according VCS history ...
+                    // mailMap.addMailcap("multipart/*;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.MultipartDataContentHandler");
                     mailMap.addMailcap("image/*;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.ImageDataContentHandler");
                     mailMap.addMailcap("text/plain;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.StringDataContentHandler");
                 }