src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValuePropertyLoader.java

changeset 707
31893650acaf
parent 650
121e938cb9c3
equal deleted inserted replaced
706:1e9d08d74c48 707:31893650acaf
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
47 this.xacc = xacc; 47 this.xacc = xacc;
48 } 48 }
49 49
50 public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException { 50 public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
51 try { 51 try {
52 xacc.parse(state.target,text); 52 xacc.parse(state.getTarget(),text);
53 } catch (AccessorException e) { 53 } catch (AccessorException e) {
54 handleGenericException(e,true); 54 handleGenericException(e,true);
55 } catch (RuntimeException e) { 55 } catch (RuntimeException e) {
56 if(state.prev != null) { 56 if(state.getPrev() != null) {
57 if(state.prev.target instanceof JAXBElement) { 57 if (!(state.getPrev().getTarget() instanceof JAXBElement))
58 ; // do nothing - issue 601 - don't report exceptions like
59 // NumberFormatException when unmarshalling "nillable" element
60 // (I suppose JAXBElement indicates this
61 } else {
62 handleParseConversionException(state,e); 58 handleParseConversionException(state,e);
63 } 59 // else
60 // do nothing - issue 601 - don't report exceptions like
61 // NumberFormatException when unmarshalling "nillable" element
62 // (I suppose JAXBElement indicates this
64 } else { 63 } else {
65 handleParseConversionException(state,e); 64 handleParseConversionException(state,e);
66 } 65 }
67 } 66 }
68 } 67 }

mercurial