This repository was archived by the owner on Feb 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
jaxws-ri/rt/src/main/java/com/sun/xml/ws Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 11/*
22 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
33 *
4- * Copyright (c) 1997-2017 Oracle and/or its affiliates. All rights reserved.
4+ * Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
55 *
66 * The contents of this file are subject to the terms of either the GNU
77 * General Public License Version 2 only ("GPL") or the Common Development
@@ -416,7 +416,7 @@ public void doRecycle(XMLStreamWriter r) {
416416
417417 }
418418
419- private static class HasEncodingWriter extends XMLStreamWriterFilter implements HasEncoding {
419+ public static class HasEncodingWriter extends XMLStreamWriterFilter implements HasEncoding {
420420 private final String encoding ;
421421
422422 HasEncodingWriter (XMLStreamWriter writer , String encoding ) {
@@ -429,7 +429,7 @@ public String getEncoding() {
429429 return encoding ;
430430 }
431431
432- XMLStreamWriter getWriter () {
432+ public XMLStreamWriter getWriter () {
433433 return writer ;
434434 }
435435 }
Original file line number Diff line number Diff line change 11/*
22 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
33 *
4- * Copyright (c) 1997-2017 Oracle and/or its affiliates. All rights reserved.
4+ * Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
55 *
66 * The contents of this file are subject to the terms of either the GNU
77 * General Public License Version 2 only ("GPL") or the Common Development
4141package com .sun .xml .ws .streaming ;
4242
4343import com .sun .istack .Nullable ;
44+ import com .sun .xml .ws .api .streaming .XMLStreamWriterFactory ;
4445import com .sun .xml .ws .encoding .HasEncoding ;
4546import com .sun .xml .ws .encoding .SOAPBindingCodec ;
4647
@@ -72,9 +73,14 @@ private XMLStreamWriterUtil() {
7273 public static @ Nullable OutputStream getOutputStream (XMLStreamWriter writer ) throws XMLStreamException {
7374 Object obj = null ;
7475
76+ XMLStreamWriter xmlStreamWriter =
77+ writer instanceof XMLStreamWriterFactory .HasEncodingWriter ?
78+ ((XMLStreamWriterFactory .HasEncodingWriter ) writer ).getWriter ()
79+ : writer ;
80+
7581 // Hack for JDK6's SJSXP
76- if (writer instanceof Map ) {
77- obj = ((Map ) writer ).get ("sjsxp-outputstream" );
82+ if (xmlStreamWriter instanceof Map ) {
83+ obj = ((Map ) xmlStreamWriter ).get ("sjsxp-outputstream" );
7884 }
7985
8086 // woodstox
You can’t perform that action at this time.
0 commit comments