src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java

changeset 707
31893650acaf
parent 650
121e938cb9c3
child 760
e530533619ec
     1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java	Mon Sep 29 11:50:34 2014 -0700
     1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.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 @@ -148,18 +148,18 @@
    1.11          public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    1.12              // create or obtain the Map object
    1.13              try {
    1.14 -                target.set((BeanT)state.prev.target);
    1.15 +                target.set((BeanT)state.getPrev().getTarget());
    1.16                  map.set(acc.get(target.get()));
    1.17                  depthCounter++;
    1.18                  if(map.get() == null) {
    1.19                      map.set(ClassFactory.create(mapImplClass));
    1.20                  }
    1.21                  map.get().clear();
    1.22 -                state.target = map.get();
    1.23 +                state.setTarget(map.get());
    1.24              } catch (AccessorException e) {
    1.25                  // recover from error by setting a dummy Map that receives and discards the values
    1.26                  handleGenericException(e,true);
    1.27 -                state.target = new HashMap();
    1.28 +                state.setTarget(new HashMap());
    1.29              }
    1.30          }
    1.31  
    1.32 @@ -180,7 +180,7 @@
    1.33          @Override
    1.34          public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    1.35              if(ea.matches(entryTag)) {
    1.36 -                state.loader = entryLoader;
    1.37 +                state.setLoader(entryLoader);
    1.38              } else {
    1.39                  super.childElement(state,ea);
    1.40              }
    1.41 @@ -200,26 +200,26 @@
    1.42      private final Loader entryLoader = new Loader(false) {
    1.43          @Override
    1.44          public void startElement(UnmarshallingContext.State state, TagName ea) {
    1.45 -            state.target = new Object[2];  // this is inefficient
    1.46 +            state.setTarget(new Object[2]);  // this is inefficient
    1.47          }
    1.48  
    1.49          @Override
    1.50          public void leaveElement(UnmarshallingContext.State state, TagName ea) {
    1.51 -            Object[] keyValue = (Object[])state.target;
    1.52 -            Map map = (Map) state.prev.target;
    1.53 +            Object[] keyValue = (Object[])state.getTarget();
    1.54 +            Map map = (Map) state.getPrev().getTarget();
    1.55              map.put(keyValue[0],keyValue[1]);
    1.56          }
    1.57  
    1.58          @Override
    1.59          public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
    1.60              if(ea.matches(keyTag)) {
    1.61 -                state.loader = keyLoader;
    1.62 -                state.receiver = keyReceiver;
    1.63 +                state.setLoader(keyLoader);
    1.64 +                state.setReceiver(keyReceiver);
    1.65                  return;
    1.66              }
    1.67              if(ea.matches(valueTag)) {
    1.68 -                state.loader = valueLoader;
    1.69 -                state.receiver = valueReceiver;
    1.70 +                state.setLoader(valueLoader);
    1.71 +                state.setReceiver(valueReceiver);
    1.72                  return;
    1.73              }
    1.74              super.childElement(state,ea);
    1.75 @@ -237,7 +237,7 @@
    1.76              this.index = index;
    1.77          }
    1.78          public void receive(UnmarshallingContext.State state, Object o) {
    1.79 -            ((Object[])state.target)[index] = o;
    1.80 +            ((Object[])state.getTarget())[index] = o;
    1.81          }
    1.82      }
    1.83  

mercurial