src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferCreator.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -213,11 +213,12 @@
                 case XMLStreamReader.CHARACTERS:
                 case XMLStreamReader.CDATA: {
                     CharSequence c = reader.getPCDATA();
                     if (c instanceof Base64Data) {
                         storeStructure(T_TEXT_AS_OBJECT);
-                        storeContentObject(((Base64Data)c).clone());
+                        //Instead of clone the Base64Data, the original Base64Data instance is used here to preserve the DataHandler
+                        storeContentObject(c);
                     } else {
                         storeContentCharacters(T_TEXT_AS_CHAR_ARRAY,
                                 reader.getTextCharacters(), reader.getTextStart(),
                                 reader.getTextLength());
                     }