8036981: JAXB not preserving formatting for xsd:any Mixed content jdk8u31-b03

Sun, 31 Aug 2014 16:14:36 +0400

author
aefimov
date
Sun, 31 Aug 2014 16:14:36 +0400
changeset 707
31893650acaf
parent 706
1e9d08d74c48
child 708
667a4aee3720

8036981: JAXB not preserving formatting for xsd:any Mixed content
Reviewed-by: lancea, mkos

src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ArrayBeanInfoImpl.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ValueListBeanInfoImpl.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayERProperty.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DefaultValueLoaderDecorator.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Discarder.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DomLoader.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyLoader.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyXsiLoader.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Loader.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ProxyLoader.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SAXConnector.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Scope.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/TextLoader.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallingContext.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValuePropertyLoader.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiNilLoader.java file | annotate | diff | comparison | revisions
src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiTypeLoader.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ArrayBeanInfoImpl.java	Mon Sep 29 11:50:34 2014 -0700
     1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ArrayBeanInfoImpl.java	Sun Aug 31 16:14:36 2014 +0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -79,19 +79,19 @@
    1.11  
    1.12          @Override
    1.13          public void startElement(UnmarshallingContext.State state, TagName ea) {
    1.14 -            state.target = new ArrayList();
    1.15 +            state.setTarget(new ArrayList());
    1.16          }
    1.17  
    1.18          @Override
    1.19          public void leaveElement(UnmarshallingContext.State state, TagName ea) {
    1.20 -            state.target = toArray((List)state.target);
    1.21 +            state.setTarget(toArray((List)state.getTarget()));
    1.22          }
    1.23  
    1.24          @Override
    1.25          public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    1.26              if(ea.matches("","item")) {
    1.27 -                state.loader = itemLoader;
    1.28 -                state.receiver = this;
    1.29 +                state.setLoader(itemLoader);
    1.30 +                state.setReceiver(this);
    1.31              } else {
    1.32                  super.childElement(state,ea);
    1.33              }
    1.34 @@ -103,9 +103,9 @@
    1.35          }
    1.36  
    1.37          public void receive(UnmarshallingContext.State state, Object o) {
    1.38 -            ((List)state.target).add(o);
    1.39 +            ((List)state.getTarget()).add(o);
    1.40          }
    1.41 -    };
    1.42 +    }
    1.43  
    1.44      protected Object toArray( List list ) {
    1.45          int len = list.size();
     2.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java	Mon Sep 29 11:50:34 2014 -0700
     2.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java	Sun Aug 31 16:14:36 2014 +0400
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     2.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8   *
     2.9   * This code is free software; you can redistribute it and/or modify it
    2.10 @@ -208,8 +208,8 @@
    2.11  
    2.12          @Override
    2.13          public final void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    2.14 -            state.loader = core;
    2.15 -            state.intercepter = this;
    2.16 +            state.setLoader(core);
    2.17 +            state.setIntercepter(this);
    2.18  
    2.19              // TODO: make sure there aren't too many duplicate of this code
    2.20              // create the object to unmarshal
    2.21 @@ -231,21 +231,21 @@
    2.22              fireBeforeUnmarshal(ElementBeanInfoImpl.this, child, state);
    2.23  
    2.24              context.recordOuterPeer(child);
    2.25 -            UnmarshallingContext.State p = state.prev;
    2.26 -            p.backup = p.target;
    2.27 -            p.target = child;
    2.28 +            UnmarshallingContext.State p = state.getPrev();
    2.29 +            p.setBackup(p.getTarget());
    2.30 +            p.setTarget(child);
    2.31  
    2.32              core.startElement(state,ea);
    2.33          }
    2.34  
    2.35          public Object intercept(UnmarshallingContext.State state, Object o) throws SAXException {
    2.36 -            JAXBElement e = (JAXBElement)state.target;
    2.37 -            state.target = state.backup;
    2.38 -            state.backup = null;
    2.39 +            JAXBElement e = (JAXBElement)state.getTarget();
    2.40 +            state.setTarget(state.getBackup());
    2.41 +            state.setBackup(null);
    2.42  
    2.43 -            if (state.nil) {
    2.44 +            if (state.isNil()) {
    2.45                  e.setNil(true);
    2.46 -                state.nil = false;
    2.47 +                state.setNil(false);
    2.48              }
    2.49  
    2.50              if(o!=null)
     3.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ValueListBeanInfoImpl.java	Mon Sep 29 11:50:34 2014 -0700
     3.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ValueListBeanInfoImpl.java	Sun Aug 31 16:14:36 2014 +0400
     3.3 @@ -1,5 +1,5 @@
     3.4  /*
     3.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     3.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     3.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.8   *
     3.9   * This code is free software; you can redistribute it and/or modify it
    3.10 @@ -90,7 +90,7 @@
    3.11                  idx = p;
    3.12              }
    3.13  
    3.14 -            state.target = toArray(r);
    3.15 +            state.setTarget(toArray(r));
    3.16          }
    3.17      };
    3.18  
     4.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayERProperty.java	Mon Sep 29 11:50:34 2014 -0700
     4.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayERProperty.java	Sun Aug 31 16:14:36 2014 +0400
     4.3 @@ -1,5 +1,5 @@
     4.4  /*
     4.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     4.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     4.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.8   *
     4.9   * This code is free software; you can redistribute it and/or modify it
    4.10 @@ -98,7 +98,7 @@
    4.11              UnmarshallingContext context = state.getContext();
    4.12              context.startScope(1);
    4.13              // inherit the target so that our children can access its target
    4.14 -            state.target = state.prev.target;
    4.15 +            state.setTarget(state.getPrev().getTarget());
    4.16  
    4.17              // start it now, so that even if there's no children we can still return empty collection
    4.18              context.getScope(0).start(acc,lister);
    4.19 @@ -116,8 +116,8 @@
    4.20                  super.childElement(state,ea);
    4.21                  return;
    4.22              }
    4.23 -            state.loader = child.loader;
    4.24 -            state.receiver = child.receiver;
    4.25 +            state.setLoader(child.loader);
    4.26 +            state.setReceiver(child.receiver);
    4.27          }
    4.28  
    4.29          @Override
     5.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java	Mon Sep 29 11:50:34 2014 -0700
     5.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java	Sun Aug 31 16:14:36 2014 +0400
     5.3 @@ -1,5 +1,5 @@
     5.4  /*
     5.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     5.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     5.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5.8   *
     5.9   * This code is free software; you can redistribute it and/or modify it
    5.10 @@ -148,18 +148,18 @@
    5.11          public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    5.12              // create or obtain the Map object
    5.13              try {
    5.14 -                target.set((BeanT)state.prev.target);
    5.15 +                target.set((BeanT)state.getPrev().getTarget());
    5.16                  map.set(acc.get(target.get()));
    5.17                  depthCounter++;
    5.18                  if(map.get() == null) {
    5.19                      map.set(ClassFactory.create(mapImplClass));
    5.20                  }
    5.21                  map.get().clear();
    5.22 -                state.target = map.get();
    5.23 +                state.setTarget(map.get());
    5.24              } catch (AccessorException e) {
    5.25                  // recover from error by setting a dummy Map that receives and discards the values
    5.26                  handleGenericException(e,true);
    5.27 -                state.target = new HashMap();
    5.28 +                state.setTarget(new HashMap());
    5.29              }
    5.30          }
    5.31  
    5.32 @@ -180,7 +180,7 @@
    5.33          @Override
    5.34          public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    5.35              if(ea.matches(entryTag)) {
    5.36 -                state.loader = entryLoader;
    5.37 +                state.setLoader(entryLoader);
    5.38              } else {
    5.39                  super.childElement(state,ea);
    5.40              }
    5.41 @@ -200,26 +200,26 @@
    5.42      private final Loader entryLoader = new Loader(false) {
    5.43          @Override
    5.44          public void startElement(UnmarshallingContext.State state, TagName ea) {
    5.45 -            state.target = new Object[2];  // this is inefficient
    5.46 +            state.setTarget(new Object[2]);  // this is inefficient
    5.47          }
    5.48  
    5.49          @Override
    5.50          public void leaveElement(UnmarshallingContext.State state, TagName ea) {
    5.51 -            Object[] keyValue = (Object[])state.target;
    5.52 -            Map map = (Map) state.prev.target;
    5.53 +            Object[] keyValue = (Object[])state.getTarget();
    5.54 +            Map map = (Map) state.getPrev().getTarget();
    5.55              map.put(keyValue[0],keyValue[1]);
    5.56          }
    5.57  
    5.58          @Override
    5.59          public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    5.60              if(ea.matches(keyTag)) {
    5.61 -                state.loader = keyLoader;
    5.62 -                state.receiver = keyReceiver;
    5.63 +                state.setLoader(keyLoader);
    5.64 +                state.setReceiver(keyReceiver);
    5.65                  return;
    5.66              }
    5.67              if(ea.matches(valueTag)) {
    5.68 -                state.loader = valueLoader;
    5.69 -                state.receiver = valueReceiver;
    5.70 +                state.setLoader(valueLoader);
    5.71 +                state.setReceiver(valueReceiver);
    5.72                  return;
    5.73              }
    5.74              super.childElement(state,ea);
    5.75 @@ -237,7 +237,7 @@
    5.76              this.index = index;
    5.77          }
    5.78          public void receive(UnmarshallingContext.State state, Object o) {
    5.79 -            ((Object[])state.target)[index] = o;
    5.80 +            ((Object[])state.getTarget())[index] = o;
    5.81          }
    5.82      }
    5.83  
     6.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java	Mon Sep 29 11:50:34 2014 -0700
     6.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java	Sun Aug 31 16:14:36 2014 +0400
     6.3 @@ -1,5 +1,5 @@
     6.4  /*
     6.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     6.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     6.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6.8   *
     6.9   * This code is free software; you can redistribute it and/or modify it
    6.10 @@ -148,7 +148,7 @@
    6.11  
    6.12      public void receive(UnmarshallingContext.State state, Object o) throws SAXException {
    6.13          try {
    6.14 -            set((BeanT) state.target, (ValueT) o);
    6.15 +            set((BeanT) state.getTarget(), (ValueT) o);
    6.16          } catch (AccessorException e) {
    6.17              Loader.handleGenericException(e, true);
    6.18          } catch (IllegalAccessError iae) {
     7.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DefaultValueLoaderDecorator.java	Mon Sep 29 11:50:34 2014 -0700
     7.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DefaultValueLoaderDecorator.java	Sun Aug 31 16:14:36 2014 +0400
     7.3 @@ -1,5 +1,5 @@
     7.4  /*
     7.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     7.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     7.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     7.8   *
     7.9   * This code is free software; you can redistribute it and/or modify it
    7.10 @@ -44,10 +44,10 @@
    7.11      @Override
    7.12      public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    7.13          // install the default value, but don't override the one given by the parent loader
    7.14 -        if(state.elementDefaultValue==null)
    7.15 -            state.elementDefaultValue = defaultValue;
    7.16 +        if(state.getElementDefaultValue() == null)
    7.17 +            state.setElementDefaultValue(defaultValue);
    7.18  
    7.19 -        state.loader = l;
    7.20 +        state.setLoader(l);
    7.21          l.startElement(state,ea);
    7.22      }
    7.23  }
     8.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Discarder.java	Mon Sep 29 11:50:34 2014 -0700
     8.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Discarder.java	Sun Aug 31 16:14:36 2014 +0400
     8.3 @@ -1,5 +1,5 @@
     8.4  /*
     8.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     8.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     8.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     8.8   *
     8.9   * This code is free software; you can redistribute it and/or modify it
    8.10 @@ -44,8 +44,8 @@
    8.11  
    8.12      @Override
    8.13      public void childElement(UnmarshallingContext.State state, TagName ea) {
    8.14 -        state.target = null;
    8.15 +        state.setTarget(null);
    8.16          // registering this allows the discarder to process the whole subtree.
    8.17 -        state.loader = this;
    8.18 +        state.setLoader(this);
    8.19      }
    8.20  }
     9.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DomLoader.java	Mon Sep 29 11:50:34 2014 -0700
     9.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DomLoader.java	Sun Aug 31 16:14:36 2014 +0400
     9.3 @@ -1,5 +1,5 @@
     9.4  /*
     9.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     9.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     9.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     9.8   *
     9.9   * This code is free software; you can redistribute it and/or modify it
    9.10 @@ -99,10 +99,10 @@
    9.11      @Override
    9.12      public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    9.13          UnmarshallingContext context = state.getContext();
    9.14 -        if (state.target == null)
    9.15 -            state.target = new State(context);
    9.16 +        if (state.getTarget() == null)
    9.17 +            state.setTarget(new State(context));
    9.18  
    9.19 -        State s = (State) state.target;
    9.20 +        State s = (State) state.getTarget();
    9.21          try {
    9.22              s.declarePrefixes(context, context.getNewlyDeclaredPrefixes());
    9.23              s.handler.startElement(ea.uri, ea.local, ea.getQname(), ea.atts);
    9.24 @@ -114,10 +114,10 @@
    9.25  
    9.26      @Override
    9.27      public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    9.28 -        state.loader = this;
    9.29 -        State s = (State) state.prev.target;
    9.30 +        state.setLoader(this);
    9.31 +        State s = (State) state.getPrev().getTarget();
    9.32          s.depth++;
    9.33 -        state.target = s;
    9.34 +        state.setTarget(s);
    9.35      }
    9.36  
    9.37      @Override
    9.38 @@ -125,7 +125,7 @@
    9.39          if(text.length()==0)
    9.40              return;     // there's no point in creating an empty Text node in DOM.
    9.41          try {
    9.42 -            State s = (State) state.target;
    9.43 +            State s = (State) state.getTarget();
    9.44              s.handler.characters(text.toString().toCharArray(),0,text.length());
    9.45          } catch( SAXException e ) {
    9.46              state.getContext().handleError(e);
    9.47 @@ -135,7 +135,7 @@
    9.48  
    9.49      @Override
    9.50      public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    9.51 -        State s = (State) state.target;
    9.52 +        State s = (State) state.getTarget();
    9.53          UnmarshallingContext context = state.getContext();
    9.54  
    9.55          try {
    9.56 @@ -157,7 +157,7 @@
    9.57              }
    9.58  
    9.59              // we are done
    9.60 -            state.target = s.getElement();
    9.61 +            state.setTarget(s.getElement());
    9.62          }
    9.63      }
    9.64  
    10.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyLoader.java	Mon Sep 29 11:50:34 2014 -0700
    10.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyLoader.java	Sun Aug 31 16:14:36 2014 +0400
    10.3 @@ -1,5 +1,5 @@
    10.4  /*
    10.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    10.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    10.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    10.8   *
    10.9   * This code is free software; you can redistribute it and/or modify it
   10.10 @@ -47,7 +47,7 @@
   10.11  
   10.12      public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
   10.13          try {
   10.14 -            xacc.parse(state.prev.target,text);
   10.15 +            xacc.parse(state.getPrev().getTarget(), text);
   10.16          } catch (AccessorException e) {
   10.17              handleGenericException(e,true);
   10.18          } catch (RuntimeException e) {
    11.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyXsiLoader.java	Mon Sep 29 11:50:34 2014 -0700
    11.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyXsiLoader.java	Sun Aug 31 16:14:36 2014 +0400
    11.3 @@ -1,5 +1,5 @@
    11.4  /*
    11.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    11.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    11.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    11.8   *
    11.9   * This code is free software; you can redistribute it and/or modify it
   11.10 @@ -55,9 +55,9 @@
   11.11  
   11.12      @Override
   11.13      public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
   11.14 -        state.loader = selectLoader(state, ea);
   11.15 -
   11.16 -        state.loader.startElement(state, ea);
   11.17 +        final Loader loader = selectLoader(state, ea);
   11.18 +        state.setLoader(loader);
   11.19 +        loader.startElement(state, ea);
   11.20      }
   11.21  
   11.22      protected Loader selectLoader(UnmarshallingContext.State state, TagName ea) throws SAXException {
    12.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Loader.java	Mon Sep 29 11:50:34 2014 -0700
    12.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Loader.java	Sun Aug 31 16:14:36 2014 +0400
    12.3 @@ -1,5 +1,5 @@
    12.4  /*
    12.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    12.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    12.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    12.8   *
    12.9   * This code is free software; you can redistribute it and/or modify it
   12.10 @@ -88,8 +88,8 @@
   12.11      public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
   12.12          // notify the error, then recover by ignoring the whole element.
   12.13          reportUnexpectedChildElement(ea, true);
   12.14 -        state.loader = Discarder.INSTANCE;
   12.15 -        state.receiver = null;
   12.16 +        state.setLoader(Discarder.INSTANCE);
   12.17 +        state.setReceiver(null);
   12.18      }
   12.19  
   12.20      @SuppressWarnings({"StringEquality"})
   12.21 @@ -195,10 +195,10 @@
   12.22              UnmarshallingContext context = state.getContext();
   12.23              Unmarshaller.Listener listener = context.parent.getListener();
   12.24              if(beanInfo.hasBeforeUnmarshalMethod()) {
   12.25 -                beanInfo.invokeBeforeUnmarshalMethod(context.parent, child, state.prev.target);
   12.26 +                beanInfo.invokeBeforeUnmarshalMethod(context.parent, child, state.getPrev().getTarget());
   12.27              }
   12.28              if(listener!=null) {
   12.29 -                listener.beforeUnmarshal(child, state.prev.target);
   12.30 +                listener.beforeUnmarshal(child, state.getPrev().getTarget());
   12.31              }
   12.32          }
   12.33      }
   12.34 @@ -215,10 +215,10 @@
   12.35              UnmarshallingContext context = state.getContext();
   12.36              Unmarshaller.Listener listener = context.parent.getListener();
   12.37              if(beanInfo.hasAfterUnmarshalMethod()) {
   12.38 -                beanInfo.invokeAfterUnmarshalMethod(context.parent, child, state.target);
   12.39 +                beanInfo.invokeAfterUnmarshalMethod(context.parent, child, state.getTarget());
   12.40              }
   12.41              if(listener!=null)
   12.42 -                listener.afterUnmarshal(child, state.target);
   12.43 +                listener.afterUnmarshal(child, state.getTarget());
   12.44          }
   12.45      }
   12.46  
    13.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ProxyLoader.java	Mon Sep 29 11:50:34 2014 -0700
    13.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ProxyLoader.java	Sun Aug 31 16:14:36 2014 +0400
    13.3 @@ -1,5 +1,5 @@
    13.4  /*
    13.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    13.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    13.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    13.8   *
    13.9   * This code is free software; you can redistribute it and/or modify it
   13.10 @@ -41,7 +41,7 @@
   13.11      @Override
   13.12      public final void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
   13.13          Loader loader = selectLoader(state,ea);
   13.14 -        state.loader = loader;
   13.15 +        state.setLoader(loader);
   13.16          loader.startElement(state,ea);
   13.17      }
   13.18  
    14.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SAXConnector.java	Mon Sep 29 11:50:34 2014 -0700
    14.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SAXConnector.java	Sun Aug 31 16:14:36 2014 +0400
    14.3 @@ -1,5 +1,5 @@
    14.4  /*
    14.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
    14.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    14.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    14.8   *
    14.9   * This code is free software; you can redistribute it and/or modify it
   14.10 @@ -144,17 +144,7 @@
   14.11          if( qname==null || qname.length()==0 )
   14.12              qname=local;
   14.13  
   14.14 -
   14.15 -        boolean ignorable = true;
   14.16 -        StructureLoader sl;
   14.17 -
   14.18 -        // not null only if element content is processed (StructureLoader is used)
   14.19 -        // ugly
   14.20 -        if((sl = this.context.getStructureLoader()) != null) {
   14.21 -            ignorable = ((ClassBeanInfoImpl)sl.getBeanInfo()).hasElementOnlyContentModel();
   14.22 -        }
   14.23 -
   14.24 -        processText(ignorable);
   14.25 +        processText(!context.getCurrentState().isMixed());
   14.26  
   14.27          tagName.uri = uri;
   14.28          tagName.local = local;
   14.29 @@ -204,7 +194,7 @@
   14.30      }
   14.31  
   14.32      private void processText( boolean ignorable ) throws SAXException {
   14.33 -        if( predictor.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer)))
   14.34 +        if (predictor.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer)))
   14.35              next.text(buffer);
   14.36          buffer.setLength(0);
   14.37      }
    15.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Scope.java	Mon Sep 29 11:50:34 2014 -0700
    15.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Scope.java	Sun Aug 31 16:14:36 2014 +0400
    15.3 @@ -1,5 +1,5 @@
    15.4  /*
    15.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    15.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    15.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    15.8   *
    15.9   * This code is free software; you can redistribute it and/or modify it
   15.10 @@ -97,7 +97,7 @@
   15.11      public void add( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister, ItemT value) throws SAXException{
   15.12          try {
   15.13              if(!hasStarted()) {
   15.14 -                this.bean = (BeanT)context.getCurrentState().target;
   15.15 +                this.bean = (BeanT)context.getCurrentState().getTarget();
   15.16                  this.acc = acc;
   15.17                  this.lister = lister;
   15.18                  this.pack = lister.startPacking(bean,acc);
   15.19 @@ -121,7 +121,7 @@
   15.20      public void start( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister) throws SAXException{
   15.21          try {
   15.22              if(!hasStarted()) {
   15.23 -                this.bean = (BeanT)context.getCurrentState().target;
   15.24 +                this.bean = (BeanT)context.getCurrentState().getTarget();
   15.25                  this.acc = acc;
   15.26                  this.lister = lister;
   15.27                  this.pack = lister.startPacking(bean,acc);
    16.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java	Mon Sep 29 11:50:34 2014 -0700
    16.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java	Sun Aug 31 16:14:36 2014 +0400
    16.3 @@ -1,5 +1,5 @@
    16.4  /*
    16.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    16.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    16.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    16.8   *
    16.9   * This code is free software; you can redistribute it and/or modify it
   16.10 @@ -172,7 +172,7 @@
   16.11  
   16.12          context.recordInnerPeer(child);
   16.13  
   16.14 -        state.target = child;
   16.15 +        state.setTarget(child);
   16.16  
   16.17          fireBeforeUnmarshal(beanInfo, child, state);
   16.18  
   16.19 @@ -197,7 +197,7 @@
   16.20                          String qname = atts.getQName(i);
   16.21                          if(atts.getURI(i).equals(WellKnownNamespace.XML_SCHEMA_INSTANCE))
   16.22                              continue;   // xsi:* attributes are meant to be processed by us, not by user apps.
   16.23 -                        Object o = state.target;
   16.24 +                        Object o = state.getTarget();
   16.25                          Map<QName,String> map = attCatchAll.get(o);
   16.26                          if(map==null) {
   16.27                              // TODO: use  ClassFactory.inferImplClass(sig,knownImplClasses)
   16.28 @@ -250,8 +250,8 @@
   16.29              }
   16.30          }
   16.31  
   16.32 -        state.loader = child.loader;
   16.33 -        state.receiver = child.receiver;
   16.34 +        state.setLoader(child.loader);
   16.35 +        state.setReceiver(child.receiver);
   16.36      }
   16.37  
   16.38      @Override
   16.39 @@ -273,7 +273,7 @@
   16.40      @Override
   16.41      public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
   16.42          state.getContext().endScope(frameSize);
   16.43 -        fireAfterUnmarshal(beanInfo, state.target, state.prev);
   16.44 +        fireAfterUnmarshal(beanInfo, state.getTarget(), state.getPrev());
   16.45      }
   16.46  
   16.47      private static final QNameMap<TransducedAccessor> EMPTY = new QNameMap<TransducedAccessor>();
    17.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/TextLoader.java	Mon Sep 29 11:50:34 2014 -0700
    17.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/TextLoader.java	Sun Aug 31 16:14:36 2014 +0400
    17.3 @@ -1,5 +1,5 @@
    17.4  /*
    17.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    17.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    17.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    17.8   *
    17.9   * This code is free software; you can redistribute it and/or modify it
   17.10 @@ -51,7 +51,7 @@
   17.11  
   17.12      public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
   17.13          try {
   17.14 -            state.target = xducer.parse(text);
   17.15 +            state.setTarget(xducer.parse(text));
   17.16          } catch (AccessorException e) {
   17.17              handleGenericException(e,true);
   17.18          } catch (RuntimeException e) {
    18.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallingContext.java	Mon Sep 29 11:50:34 2014 -0700
    18.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallingContext.java	Sun Aug 31 16:14:36 2014 +0400
    18.3 @@ -1,5 +1,5 @@
    18.4  /*
    18.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
    18.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    18.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    18.8   *
    18.9   * This code is free software; you can redistribute it and/or modify it
   18.10 @@ -35,8 +35,6 @@
   18.11  import java.util.List;
   18.12  import java.util.Map;
   18.13  import java.util.concurrent.Callable;
   18.14 -import java.util.logging.Level;
   18.15 -import java.util.logging.Logger;
   18.16  
   18.17  import javax.xml.XMLConstants;
   18.18  import javax.xml.bind.JAXBElement;
   18.19 @@ -198,20 +196,19 @@
   18.20          /**
   18.21           * Loader that owns this element.
   18.22           */
   18.23 -        public Loader loader;
   18.24 +        private Loader loader;
   18.25          /**
   18.26           * Once {@link #loader} is completed, this receiver
   18.27           * receives the result.
   18.28           */
   18.29 -        public Receiver receiver;
   18.30 +        private Receiver receiver;
   18.31  
   18.32 -        public Intercepter intercepter;
   18.33 -
   18.34 +        private Intercepter intercepter;
   18.35  
   18.36          /**
   18.37           * Object being unmarshalled by this {@link #loader}.
   18.38           */
   18.39 -        public Object target;
   18.40 +        private Object target;
   18.41  
   18.42          /**
   18.43           * Hack for making JAXBElement unmarshalling work.
   18.44 @@ -240,7 +237,7 @@
   18.45           * @see ElementBeanInfoImpl.IntercepterLoader#startElement(State, TagName)
   18.46           * @see ElementBeanInfoImpl.IntercepterLoader#intercept(State, Object)
   18.47           */
   18.48 -        public Object backup;
   18.49 +        private Object backup;
   18.50  
   18.51          /**
   18.52           * Number of {@link UnmarshallingContext#nsBind}s declared thus far.
   18.53 @@ -256,17 +253,22 @@
   18.54           * or by a child {@link Loader} when
   18.55           * {@link Loader#startElement(State, TagName)} is called.
   18.56           */
   18.57 -        public String elementDefaultValue;
   18.58 +        private String elementDefaultValue;
   18.59  
   18.60          /**
   18.61           * {@link State} for the parent element
   18.62           *
   18.63           * {@link State} objects form a doubly linked list.
   18.64           */
   18.65 -        public State prev;
   18.66 +        private State prev;
   18.67          private State next;
   18.68  
   18.69 -        public boolean nil = false;
   18.70 +        private boolean nil = false;
   18.71 +
   18.72 +        /**
   18.73 +         * specifies that we are working with mixed content
   18.74 +         */
   18.75 +        private boolean mixed = false;
   18.76  
   18.77          /**
   18.78           * Gets the context.
   18.79 @@ -280,6 +282,8 @@
   18.80              this.prev = prev;
   18.81              if (prev!=null) {
   18.82                  prev.next = this;
   18.83 +                if (prev.mixed) // parent is in mixed mode
   18.84 +                    this.mixed = true;
   18.85              }
   18.86          }
   18.87  
   18.88 @@ -289,7 +293,7 @@
   18.89              }
   18.90              if (next==null) {
   18.91                  assert current == this;
   18.92 -                allocateMoreStates();
   18.93 +                next = new State(this);
   18.94              }
   18.95              nil = false;
   18.96              State n = next;
   18.97 @@ -304,11 +308,71 @@
   18.98              assert prev!=null;
   18.99              loader = null;
  18.100              nil = false;
  18.101 +            mixed = false;
  18.102              receiver = null;
  18.103              intercepter = null;
  18.104              elementDefaultValue = null;
  18.105              target = null;
  18.106              current = prev;
  18.107 +            next = null;
  18.108 +        }
  18.109 +
  18.110 +        public boolean isMixed() {
  18.111 +            return mixed;
  18.112 +        }
  18.113 +
  18.114 +        public Object getTarget() {
  18.115 +            return target;
  18.116 +        }
  18.117 +
  18.118 +        public void setLoader(Loader loader) {
  18.119 +            if (loader instanceof StructureLoader) // set mixed mode
  18.120 +                mixed = !((StructureLoader)loader).getBeanInfo().hasElementOnlyContentModel();
  18.121 +            this.loader = loader;
  18.122 +        }
  18.123 +
  18.124 +        public void setReceiver(Receiver receiver) {
  18.125 +            this.receiver = receiver;
  18.126 +        }
  18.127 +
  18.128 +        public State getPrev() {
  18.129 +            return prev;
  18.130 +        }
  18.131 +
  18.132 +        public void setIntercepter(Intercepter intercepter) {
  18.133 +            this.intercepter = intercepter;
  18.134 +        }
  18.135 +
  18.136 +        public void setBackup(Object backup) {
  18.137 +            this.backup = backup;
  18.138 +        }
  18.139 +
  18.140 +        public void setTarget(Object target) {
  18.141 +            this.target = target;
  18.142 +        }
  18.143 +
  18.144 +        public Object getBackup() {
  18.145 +            return backup;
  18.146 +        }
  18.147 +
  18.148 +        public boolean isNil() {
  18.149 +            return nil;
  18.150 +        }
  18.151 +
  18.152 +        public void setNil(boolean nil) {
  18.153 +            this.nil = nil;
  18.154 +        }
  18.155 +
  18.156 +        public Loader getLoader() {
  18.157 +            return loader;
  18.158 +        }
  18.159 +
  18.160 +        public String getElementDefaultValue() {
  18.161 +            return elementDefaultValue;
  18.162 +        }
  18.163 +
  18.164 +        public void setElementDefaultValue(String elementDefaultValue) {
  18.165 +            this.elementDefaultValue = elementDefaultValue;
  18.166          }
  18.167      }
  18.168  
  18.169 @@ -348,7 +412,6 @@
  18.170          this.parent = _parent;
  18.171          this.assoc = assoc;
  18.172          this.root = this.current = new State(null);
  18.173 -        allocateMoreStates();
  18.174      }
  18.175  
  18.176      public void reset(InfosetScanner scanner,boolean isInplaceMode, JaxBeanInfo expectedType, IDResolver idResolver) {
  18.177 @@ -395,23 +458,6 @@
  18.178          return null;
  18.179      }
  18.180  
  18.181 -    /**
  18.182 -     * Allocates a few more {@link State}s.
  18.183 -     *
  18.184 -     * Allocating multiple {@link State}s at once allows those objects
  18.185 -     * to be allocated near each other, which reduces the working set
  18.186 -     * of CPU. It improves the chance the relevant data is in the cache.
  18.187 -     */
  18.188 -    private void allocateMoreStates() {
  18.189 -        // this method should be used only when we run out of a state.
  18.190 -        assert current.next==null;
  18.191 -
  18.192 -        State s = current;
  18.193 -        for (int i=0; i<8; i++) {
  18.194 -            s = new State(s);
  18.195 -        }
  18.196 -    }
  18.197 -
  18.198      public void clearStates() {
  18.199          State last = current;
  18.200          while (last.next != null) last = last.next;
  18.201 @@ -515,16 +561,15 @@
  18.202  
  18.203      @Override
  18.204      public void text(CharSequence pcdata) throws SAXException {
  18.205 -        State cur = current;
  18.206          pushCoordinator();
  18.207          try {
  18.208 -            if(cur.elementDefaultValue!=null) {
  18.209 -                if(pcdata.length()==0) {
  18.210 +            if (current.elementDefaultValue != null) {
  18.211 +                if (pcdata.length() == 0) {
  18.212                      // send the default value into the unmarshaller instead
  18.213 -                    pcdata = cur.elementDefaultValue;
  18.214 +                    pcdata = current.elementDefaultValue;
  18.215                  }
  18.216              }
  18.217 -            cur.loader.text(cur,pcdata);
  18.218 +            current.loader.text(current, pcdata);
  18.219          } finally {
  18.220              popCoordinator();
  18.221          }
    19.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValuePropertyLoader.java	Mon Sep 29 11:50:34 2014 -0700
    19.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValuePropertyLoader.java	Sun Aug 31 16:14:36 2014 +0400
    19.3 @@ -1,5 +1,5 @@
    19.4  /*
    19.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    19.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    19.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    19.8   *
    19.9   * This code is free software; you can redistribute it and/or modify it
   19.10 @@ -49,18 +49,17 @@
   19.11  
   19.12      public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
   19.13          try {
   19.14 -            xacc.parse(state.target,text);
   19.15 +            xacc.parse(state.getTarget(),text);
   19.16          } catch (AccessorException e) {
   19.17              handleGenericException(e,true);
   19.18          } catch (RuntimeException e) {
   19.19 -            if(state.prev != null) {
   19.20 -                if(state.prev.target instanceof JAXBElement) {
   19.21 -                    ; // do nothing - issue 601 - don't report exceptions like
   19.22 -                      // NumberFormatException when unmarshalling "nillable" element
   19.23 -                      // (I suppose JAXBElement indicates this
   19.24 -                } else {
   19.25 +            if(state.getPrev() != null) {
   19.26 +                if (!(state.getPrev().getTarget() instanceof JAXBElement))
   19.27                      handleParseConversionException(state,e);
   19.28 -                }
   19.29 +                // else
   19.30 +                // do nothing - issue 601 - don't report exceptions like
   19.31 +                // NumberFormatException when unmarshalling "nillable" element
   19.32 +                // (I suppose JAXBElement indicates this
   19.33              } else {
   19.34                  handleParseConversionException(state,e);
   19.35              }
    20.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiNilLoader.java	Mon Sep 29 11:50:34 2014 -0700
    20.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiNilLoader.java	Sun Aug 31 16:14:36 2014 +0400
    20.3 @@ -1,5 +1,5 @@
    20.4  /*
    20.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    20.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    20.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    20.8   *
    20.9   * This code is free software; you can redistribute it and/or modify it
   20.10 @@ -62,7 +62,7 @@
   20.11                  onNil(state);
   20.12                  boolean hasOtherAttributes = (ea.atts.getLength() - 1) > 0;
   20.13                  // see issues 6759703 and 565 - need to preserve attributes even if the element is nil; only when the type is stored in JAXBElement
   20.14 -                if (!(hasOtherAttributes && (state.prev.target instanceof JAXBElement))) {
   20.15 +                if (!(hasOtherAttributes && (state.getPrev().getTarget() instanceof JAXBElement))) {
   20.16                      return Discarder.INSTANCE;
   20.17                  }
   20.18              }
   20.19 @@ -96,8 +96,8 @@
   20.20          @Override
   20.21          protected void onNil(UnmarshallingContext.State state) throws SAXException {
   20.22              try {
   20.23 -                acc.set(state.prev.target,null);
   20.24 -                state.prev.nil = true;
   20.25 +                acc.set(state.getPrev().getTarget(),null);
   20.26 +                state.getPrev().setNil(true);
   20.27              } catch (AccessorException e) {
   20.28                  handleGenericException(e,true);
   20.29              }
   20.30 @@ -113,7 +113,7 @@
   20.31          @Override
   20.32          protected void onNil(UnmarshallingContext.State state) {
   20.33              // let the receiver add this to the lister
   20.34 -            state.target = null;
   20.35 +            state.setTarget(null);
   20.36          }
   20.37      }
   20.38  }
    21.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiTypeLoader.java	Mon Sep 29 11:50:34 2014 -0700
    21.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiTypeLoader.java	Sun Aug 31 16:14:36 2014 +0400
    21.3 @@ -1,5 +1,5 @@
    21.4  /*
    21.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
    21.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    21.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    21.8   *
    21.9   * This code is free software; you can redistribute it and/or modify it
   21.10 @@ -61,7 +61,7 @@
   21.11              beanInfo = defaultBeanInfo;
   21.12  
   21.13          Loader loader = beanInfo.getLoader(null,false);
   21.14 -        state.loader = loader;
   21.15 +        state.setLoader(loader);
   21.16          loader.startElement(state,ea);
   21.17      }
   21.18  

mercurial