# HG changeset patch # User andrew # Date 1519007528 0 # Mon Feb 19 02:32:08 2018 +0000 # Node ID ccf8af9bbd7114a86784dd2d480c8dc5bf89d0fe # Parent c2ba2ed87d18ddab6e758bab51f5516d5d3db953 # Parent 76f2c555cccab8df114dd6ebb8ed7634c7ce1896 Merge jdk8u161-b12 diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -706,6 +706,8 @@ e7986a10482abf4f93e7dd170d709dbd880519b2 aarch64-jdk8u112-b16 580356e77fef0b505862e4026c521356e476e1a8 aarch64-jdk8u121-b13 41fac11792c1ee6945f56721ee558a7424395a81 jdk8u112-b31 +548a51660ee94aeb77b2432594aeb87f87c21697 jdk8u112-b32 +a334b0815d34948188537a177a32cee27007ea2c jdk8u112-b33 ab5ff8f1e52c5e3ca02e988f4d978af63ceca5b8 jdk8u121-b00 5f0839ac7e0d25dd1ae705df496b12ca76c26d59 jdk8u121-b01 f91e3aa155b3c6774afb456db15fb358313d5771 jdk8u121-b02 @@ -724,6 +726,12 @@ 05e10ee4afec069c1bbfce81b183aa2d0ffa1778 aarch64-jdk8u131-b11 9ae547861e9f20b9464ad412e3f9366261cd4439 aarch64-jdk8u131-b12 2974746e56192cdd14fc2dd43179bcf28e4faf4a jdk8u121-b13 +4f69f3363a2ecee8d3df2b046266a76c2a805139 jdk8u121-b31 +ec26e3331158912f86268ef473e64514c70cbd52 jdk8u121-b32 +cb2c7c89dd09edcda4cb7bd0db623c813d3e5dbc jdk8u121-b33 +90f36d39acdc5be0665722538749c59583e3b83d jdk8u121-b34 +cec5310dcc2b876dd53a057035cb63dd22f63257 jdk8u121-b35 +a5c94735ad3fb33f353abc23e25915db2ff7a36e jdk8u121-b36 032874d46bf95478cb86690b3c91d335c0764b0b jdk8u131-b00 bea5b22daf5ddd941f3bcbf7a4e5fc5244ceb788 jdk8u131-b01 a01d217a232906e82f80e5bc3db4d60c4c74716e jdk8u131-b02 @@ -741,6 +749,10 @@ 4a156496e0af2f32ae064087be7e37952c63e291 aarch64-jdk8u141-b15 d28a61f098ed44586c489edf170aceb20f0a0d8c aarch64-jdk8u141-b16 3ab471c4760a808e39406303ff33a25a542b9c75 jdk8u131-b11 +d50ccb38def5968145fd3f6e0579416bb027e85c jdk8u131-b31 +e54624a8ebe3639d3b2360adb9ae0fa32f1bef57 jdk8u131-b32 +15006e8dc79bd0005d264bff0b1677a109cf5a02 jdk8u131-b33 +e6e35f065443533c81db69022a272927b0b20f69 jdk8u131-b34 a160009bbe1417d85f1c0eec890fdb17391b3637 jdk8u141-b00 e95a13de2d36050302a1af422967f5260fc8eabd jdk8u141-b01 936085d9aff0554a3bdab2fcbbec1d1864e656a2 jdk8u141-b02 @@ -768,6 +780,14 @@ 49cb4b2b45a3d6cd79d7ce11ba2abd0e203cafa6 aarch64-jdk8u144-b03 cdd4be91427c7759a1c3b4a31534ad145b68d15e aarch64-jdk8u151-b12 d2744852f3e64f7b0ba54f3a64ed5e2107e6ee68 jdk8u144-b01 +55899d2b99b0725d74eebc510a116423329ad6f0 jdk8u141-b31 +a3c4020f84aeb0dba467534239951f8818bdfb84 jdk8u141-b32 +b64b1dfdbe7cfe3859f1023c0f1fb0216bce4ae7 jdk8u144-b00 +d2744852f3e64f7b0ba54f3a64ed5e2107e6ee68 jdk8u144-b01 +a05113a4c91c59f44b9894e12aeda07a7534ff7e jdk8u144-b31 +c4f7f2878c4bc54dcc12eddbbcd90d4c7a5dddfe jdk8u144-b32 +785d45a4c0b715ff0131abda873e3c2f85874ac3 jdk8u144-b33 +71dee2264dddd5a2c90d8c6f3a3f4ffd8da02551 jdk8u144-b34 072e084bceeedeb75467e40ca77786ac9ef5227a jdk8u151-b00 5b0fa6e004312a5910a6a70e4fbc0f00a678e650 jdk8u151-b01 bd40efd56b4544ff9048d2f7be4cf108b281a6f3 jdk8u151-b02 @@ -814,3 +834,65 @@ 7a6e30d784a883172f33177fa51f14f70d9c65d0 aarch64-jdk8u161-b13 aa43d4bc6af06ef7a526f12996719421e2e9ec1d aarch64-jdk8u161-b14 ec093c19fc4403f82f121644c311f69af93e22a5 aarch64-jdk8u161-b15 +1cb70967c4d78a45a60d0d6eb64cb7fbe89ad005 jdk8u152-b16 +072e084bceeedeb75467e40ca77786ac9ef5227a jdk8u151-b00 +5b0fa6e004312a5910a6a70e4fbc0f00a678e650 jdk8u151-b01 +bd40efd56b4544ff9048d2f7be4cf108b281a6f3 jdk8u151-b02 +58243fea3fe2669e93350bb4b77e188623b85503 jdk8u151-b03 +27273bbb711a402efe5fcd332003ba419102f662 jdk8u151-b04 +0efdf2c7a21464e5f3d89474ffdfe81db61031fd jdk8u151-b05 +c6c870e267de694bc85dc4af23a648824063f95b jdk8u151-b06 +1442bc728814af451e2dd1a6719a64485d27e3a0 jdk8u122-b00 +f6030acfa5aec0e64d45adfac69b9e7e5c12bc74 jdk8u122-b01 +6b072c3a6db7ab06804c91aab77431799dfb5d47 jdk8u122-b02 +141beb4d854d213c1aefcc4406f09aa6b0809e43 jdk8u122-b03 +141beb4d854d213c1aefcc4406f09aa6b0809e43 jdk8u122-b03 +0000000000000000000000000000000000000000 jdk8u122-b03 +0000000000000000000000000000000000000000 jdk8u122-b03 +d8c1eb38a23286991238eed87ab04c331700839b jdk8u122-b03 +774f11d707e0ff685c131cd625d96e1f58527990 jdk8u122-b04 +000711011f8ab7ab5ea88e02086c48181b42ab8f jdk8u132-b00 +f7be58eb30bc2cdea8a8e0fb254f52f176f5b57d jdk8u152-b00 +072df97b6e2af59f5e2433ae6b2dbecb16b03cd8 jdk8u152-b01 +dbf817e782805bffcb9a0d84f452349926329d62 jdk8u152-b02 +824988d089dde02e15f04c3b994115f78b9408c9 jdk8u152-b03 +4c95cacb8ec77cbda2ae1d4e070b39ec6b527769 jdk8u152-b04 +9c692f8574178a5505efe39cdff1ea92d4f95cbd jdk8u152-b05 +636043375508d667052c84691c55d4c633376dbe jdk8u152-b06 +83998ef9e0b96e1f5f9d4667575a81e8aa06b981 jdk8u152-b07 +e62e091df75fd92bf9d8c573f6224132c99b33ea jdk8u152-b08 +eb71140d49732a226340c0e0a2224c0215fc161a jdk8u152-b09 +1442bc728814af451e2dd1a6719a64485d27e3a0 jdk8u122-b00 +f6030acfa5aec0e64d45adfac69b9e7e5c12bc74 jdk8u122-b01 +6b072c3a6db7ab06804c91aab77431799dfb5d47 jdk8u122-b02 +141beb4d854d213c1aefcc4406f09aa6b0809e43 jdk8u122-b03 +141beb4d854d213c1aefcc4406f09aa6b0809e43 jdk8u122-b03 +0000000000000000000000000000000000000000 jdk8u122-b03 +0000000000000000000000000000000000000000 jdk8u122-b03 +d8c1eb38a23286991238eed87ab04c331700839b jdk8u122-b03 +774f11d707e0ff685c131cd625d96e1f58527990 jdk8u122-b04 +000711011f8ab7ab5ea88e02086c48181b42ab8f jdk8u132-b00 +f7be58eb30bc2cdea8a8e0fb254f52f176f5b57d jdk8u152-b00 +072df97b6e2af59f5e2433ae6b2dbecb16b03cd8 jdk8u152-b01 +dbf817e782805bffcb9a0d84f452349926329d62 jdk8u152-b02 +824988d089dde02e15f04c3b994115f78b9408c9 jdk8u152-b03 +4c95cacb8ec77cbda2ae1d4e070b39ec6b527769 jdk8u152-b04 +9c692f8574178a5505efe39cdff1ea92d4f95cbd jdk8u152-b05 +a160009bbe1417d85f1c0eec890fdb17391b3637 jdk8u141-b00 +072e084bceeedeb75467e40ca77786ac9ef5227a jdk8u151-b00 +e9c7ecc5a9fcdcb31d4796b72493960c271dcb31 jdk8u161-b00 +3b1bfef6f82b72cc7e8d73a60d1faaf7818be6f3 jdk8u161-b01 +fef2bdb968d7caa0d4bd1714bd4571ca21edb25d jdk8u161-b02 +3742cb9c55fd997075a52581497829bd6f6b978a jdk8u161-b03 +3299bb548705c586c17fc31c815bb222e6a63370 jdk8u161-b04 +1c28a0748a119120a4c3a52b9a73d18ed2d1926a jdk8u161-b05 +7399fd6431c74464d3392a7d76715580039c50ea jdk8u161-b06 +cb84156d54b28d4e59159a513db7c4e9dc693f9e jdk8u161-b07 +cb84156d54b28d4e59159a513db7c4e9dc693f9e jdk8u161-b07 +0000000000000000000000000000000000000000 jdk8u161-b07 +0000000000000000000000000000000000000000 jdk8u161-b07 +22f4dc5bcb9955e02bb4e3b7fb847fd08339dd2d jdk8u161-b07 +e7c79f48e83772546a1d35d98101853e2ca17947 jdk8u161-b08 +2c4e596e0cc3281fe976d9a730677c0a15113153 jdk8u161-b09 +3eaad567db074e4d3df7d4088a4a029ef5ad1179 jdk8u161-b10 +8d358ca3cfb813af87aa4bed5a1e7fbb678ea6be jdk8u161-b11 diff --git a/make/Images.gmk b/make/Images.gmk --- a/make/Images.gmk +++ b/make/Images.gmk @@ -550,6 +550,9 @@ $(MKDIR) -p $(JDK_IMAGE_DIR)/db cd $(JDK_IMAGE_DIR)/db && $(UNZIP) -q -o $< -x */index.html */KEYS */test/* *javadoc/* */docs/* */demo/* 2> /dev/null cd $(JDK_IMAGE_DIR)/db && $(MV) db-derby-*-bin/* . && $(RM) -r db-derby-*-bin +ifneq ($(OPENJDK_TARGET_OS), windows) + $(RM) $(JDK_IMAGE_DIR)/db/bin/*.bat +endif $(MKDIR) -p $(@D) $(TOUCH) $@ diff --git a/make/profile-rtjar-includes.txt b/make/profile-rtjar-includes.txt --- a/make/profile-rtjar-includes.txt +++ b/make/profile-rtjar-includes.txt @@ -90,6 +90,7 @@ javax/sql \ javax/transaction \ javax/xml \ + jdk/xml/internal \ org/w3c \ org/xml/sax \ sun/net/httpserver \ diff --git a/src/share/classes/java/util/HashMap.java b/src/share/classes/java/util/HashMap.java --- a/src/share/classes/java/util/HashMap.java +++ b/src/share/classes/java/util/HashMap.java @@ -1398,7 +1398,7 @@ // what we're actually creating. SharedSecrets.getJavaOISAccess().checkArray(s, Map.Entry[].class, cap); @SuppressWarnings({"rawtypes","unchecked"}) - Node<K,V>[] tab = (Node<K,V>[])new Node[cap]; + Node<K,V>[] tab = (Node<K,V>[])new Node[cap]; table = tab; // Read the keys and values, and put the mappings in the HashMap diff --git a/src/share/classes/sun/management/MemoryPoolImpl.java b/src/share/classes/sun/management/MemoryPoolImpl.java --- a/src/share/classes/sun/management/MemoryPoolImpl.java +++ b/src/share/classes/sun/management/MemoryPoolImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, 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 @@ -304,8 +304,7 @@ getCount()); } void triggerAction() { - // Should not reach here - throw new AssertionError("Should not reach here"); + // do nothing } void clearAction() { // do nothing @@ -332,8 +331,7 @@ gcSensor.getCount()); } void triggerAction() { - // Should not reach here - throw new AssertionError("Should not reach here"); + // do nothing } void clearAction() { // do nothing diff --git a/src/share/classes/sun/misc/JavaObjectInputStreamAccess.java b/src/share/classes/sun/misc/JavaObjectInputStreamAccess.java deleted file mode 100644 --- a/src/share/classes/sun/misc/JavaObjectInputStreamAccess.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2016, 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 - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package sun.misc; - -import java.io.ObjectInputStream; - -/** - * The interface to specify methods for accessing {@code ObjectInputStream} - * @author sjiang - */ -public interface JavaObjectInputStreamAccess { - /** - * Sets a descriptor validating. - * @param ois stream to have the descriptors validated - * @param validator validator used to validate a descriptor. - */ - public void setValidator(ObjectInputStream ois, ObjectStreamClassValidator validator); -} diff --git a/src/share/classes/sun/misc/ObjectStreamClassValidator.java b/src/share/classes/sun/misc/ObjectStreamClassValidator.java deleted file mode 100644 --- a/src/share/classes/sun/misc/ObjectStreamClassValidator.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2016, 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 - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package sun.misc; - -import java.io.ObjectStreamClass; - -/** - * A callback used by {@code ObjectInputStream} to do descriptor validation. - * - * @author sjiang - */ -public interface ObjectStreamClassValidator { - /** - * This method will be called by ObjectInputStream to - * check a descriptor just before creating an object described by this descriptor. - * The object will not be created if this method throws a {@code RuntimeException}. - * @param descriptor descriptor to be checked. - */ - public void validateDescriptor(ObjectStreamClass descriptor); -} diff --git a/src/share/lib/security/java.security-aix b/src/share/lib/security/java.security-aix --- a/src/share/lib/security/java.security-aix +++ b/src/share/lib/security/java.security-aix @@ -803,7 +803,6 @@ # #crypto.policy=unlimited -# # The policy for the XML Signature secure validation mode. The mode is # enabled by setting the property "org.jcp.xml.dsig.secureValidation" to # true with the javax.xml.crypto.XMLCryptoContext.setProperty() method, diff --git a/test/javax/xml/ws/8172297/Main.java b/test/javax/xml/ws/8172297/Main.java new file mode 100644 --- /dev/null +++ b/test/javax/xml/ws/8172297/Main.java @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8172297 + * @summary Test that carriage-return and new-line characters + * are preserved in webservice parameters + * @compile ws/HelloWorld.java ws/HelloWorldImpl.java Main.java + * @run testng/othervm Main + */ + +import java.io.IOException; +import java.net.ServerSocket; +import java.net.URL; +import java.util.concurrent.CountDownLatch; + +import javax.xml.namespace.QName; +import javax.xml.ws.Endpoint; +import javax.xml.ws.Service; + +import org.testng.Assert; +import org.testng.annotations.Test; + +import ws.HelloWorld; +import ws.HelloWorldImpl; + +public class Main { + + @Test + public void runTest() throws Exception { + // + CountDownLatch serverInitSignal = new CountDownLatch(1); + CountDownLatch testDoneSignal = new CountDownLatch(1); + + WebserviceRunner serverThread = new WebserviceRunner(serverInitSignal, testDoneSignal); + (new Thread(serverThread)).start(); + + serverInitSignal.await(); + + boolean paramModified = runClientCode(serverThread.getPort()); + + testDoneSignal.countDown(); + + Assert.assertFalse(paramModified, "WS parameter was modified during round trip."); + } + + /* + * Connects to launched web service endpoint, sends message with CR/NL symbols and + * checks if it was modified during the round trip client/server communication. + */ + private boolean runClientCode(int port) throws Exception { + System.out.println("Launching WS client connection on " + port + " port"); + URL url = new URL("http://localhost:" + port + "/ws/hello?wsdl"); + QName qname = new QName("http://ws/", "HelloWorldImplService"); + Service service = Service.create(url, qname); + + HelloWorld hello = (HelloWorld) service.getPort(HelloWorld.class); + + logStringContent("Client input parameter", WS_PARAM_VALUE); + + String response = hello.getHelloWorldAsString(WS_PARAM_VALUE); + logStringContent("Client response parameter", response); + + return !WS_PARAM_VALUE.equals(response); + } + + /* + * Outputs the parameter value with newline and carriage-return symbols + * replaced with #CR and #NL text abbreviations. + */ + private static void logStringContent(String description, String parameter) { + String readableContent = parameter.replaceAll("\r", "#CR") + .replaceAll("\n", "#NL"); + System.out.println(description + ": '" + readableContent + "'"); + } + + /* Web service parameter value with newline and carriage-return symbols */ + private final static String WS_PARAM_VALUE = "\r\r\n\r\r CarriageReturn and " + +"NewLine \r\n\n Test \r\r\r\r"; + + /* + * Web service server thread that publishes WS on vacant port and waits + * for client to finalize testing + */ + class WebserviceRunner implements Runnable { + // Latch used to signalize when WS endpoint is initialized + private final CountDownLatch initSignal; + // Latch used to signalize when client completed testing + private final CountDownLatch doneSignal; + // Port where WS endpoint is published + private volatile int port = 0; + + // Constructor + WebserviceRunner(CountDownLatch initSignal, CountDownLatch doneSignal) { + this.initSignal = initSignal; + this.doneSignal = doneSignal; + } + + // Returns port of the published endpoint + public int getPort() { + return port; + } + + /* + * Publish web service on vacant port and waits for the client to + * complete testing. + */ + public void run() { + try { + // Find vacant port number + ServerSocket ss = new ServerSocket(0); + port = ss.getLocalPort(); + ss.close(); + + // Publish WebService + System.out.println("Publishing WebService on " + port + " port"); + Endpoint ep = Endpoint.publish("http://localhost:" + port + "/ws/hello", new HelloWorldImpl()); + + // Notify main thread that WS endpoint is published + initSignal.countDown(); + + // Wait for main thread to complete testing + System.out.println("Waiting for done signal from test client."); + doneSignal.await(); + + // Terminate WS endpoint + System.out.println("Got done signal from the client. Stopping WS endpoint."); + ep.stop(); + } catch (IOException ioe) { + System.out.println("Failed to get vacant port number:" + ioe); + } catch (InterruptedException ie) { + System.out.println("Failed to wait for test completion:" + ie); + } + } + } +} diff --git a/test/javax/xml/ws/8172297/ws/HelloWorld.java b/test/javax/xml/ws/8172297/ws/HelloWorld.java new file mode 100644 --- /dev/null +++ b/test/javax/xml/ws/8172297/ws/HelloWorld.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package ws; + +import javax.jws.WebMethod; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; +import javax.jws.soap.SOAPBinding.Style; +import javax.jws.soap.SOAPBinding.Use; + +//Web service endpoint interface +@WebService +@SOAPBinding(style = Style.DOCUMENT, use = Use.LITERAL) +public interface HelloWorld { + + @WebMethod + String getHelloWorldAsString(String name); +} diff --git a/test/javax/xml/ws/8172297/ws/HelloWorldImpl.java b/test/javax/xml/ws/8172297/ws/HelloWorldImpl.java new file mode 100644 --- /dev/null +++ b/test/javax/xml/ws/8172297/ws/HelloWorldImpl.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package ws; + +import javax.jws.WebService; + +// Simple web service implementation that echoes its parameter +@WebService(endpointInterface = "ws.HelloWorld") +public class HelloWorldImpl implements HelloWorld { + + @Override + public String getHelloWorldAsString(String name) { + System.out.println("Server-side parameter value: '" + + name.replaceAll("\r", "#CR") + .replaceAll("\n", "#NL") + "'"); + return name; + } +}