This is an automated email from the ASF dual-hosted git repository. rgoers pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-log4j-server.git
commit 88fe407f03bc8963efcebf29f72bac2b80b5984f Author: Gary Gregory <[email protected]> AuthorDate: Mon Oct 29 17:41:37 2018 -0600 [LOG4J2-2493] Remove deprecated code. Still a bit more to do. --- .../log4j/server/AbstractSocketServerTest.java | 5 -- .../server/TcpSerializedSocketServerTest.java | 63 ---------------------- .../server/UdpSerializedSocketServerTest.java | 58 -------------------- 3 files changed, 126 deletions(-) diff --git a/log4j-server/src/test/java/org/apache/logging/log4j/server/AbstractSocketServerTest.java b/log4j-server/src/test/java/org/apache/logging/log4j/server/AbstractSocketServerTest.java index 2e2c0d0..758716b 100644 --- a/log4j-server/src/test/java/org/apache/logging/log4j/server/AbstractSocketServerTest.java +++ b/log4j-server/src/test/java/org/apache/logging/log4j/server/AbstractSocketServerTest.java @@ -37,7 +37,6 @@ import org.apache.logging.log4j.core.appender.AppenderLoggingException; import org.apache.logging.log4j.core.appender.ConsoleAppender; import org.apache.logging.log4j.core.appender.SocketAppender; import org.apache.logging.log4j.core.layout.PatternLayout; -import org.apache.logging.log4j.core.layout.SerializedLayout; import org.apache.logging.log4j.core.net.Protocol; import org.apache.logging.log4j.jackson.json.layout.JsonLayout; import org.apache.logging.log4j.jackson.xml.layout.XmlLayout; @@ -98,10 +97,6 @@ public abstract class AbstractSocketServerTest { protected abstract Layout<? extends Serializable> createLayout(); - protected Layout<? extends Serializable> createSerializedLayout() { - return SerializedLayout.createLayout(); - } - protected Layout<String> createXmlLayout() { return XmlLayout.newBuilder() .setLocationInfo(true) diff --git a/log4j-server/src/test/java/org/apache/logging/log4j/server/TcpSerializedSocketServerTest.java b/log4j-server/src/test/java/org/apache/logging/log4j/server/TcpSerializedSocketServerTest.java deleted file mode 100644 index 7b0a3c1..0000000 --- a/log4j-server/src/test/java/org/apache/logging/log4j/server/TcpSerializedSocketServerTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache license, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the license for the specific language governing permissions and - * limitations under the license. - */ -package org.apache.logging.log4j.server; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.Serializable; - -import org.apache.logging.log4j.core.Layout; -import org.apache.logging.log4j.core.LoggerContext; -import org.apache.logging.log4j.core.net.Protocol; -import org.junit.AfterClass; -import org.junit.BeforeClass; - -public class TcpSerializedSocketServerTest extends AbstractSocketServerTest { - - private static TcpSocketServer<ObjectInputStream> server; - - @BeforeClass - public static void setupClass() throws Exception { - LoggerContext.getContext(false).reconfigure(); - server = TcpSocketServer.createSerializedSocketServer(PORT_NUM); - thread = server.startNewThread(); - } - - @AfterClass - public static void tearDownClass() { - try { - server.shutdown(); - } catch (final IOException e) { - e.printStackTrace(); - } - try { - thread.join(); - } catch (final InterruptedException e) { - // ignore - } - } - - public TcpSerializedSocketServerTest() { - super(Protocol.TCP, PORT, false); - } - - @Override - protected Layout<? extends Serializable> createLayout() { - return super.createSerializedLayout(); - } - -} diff --git a/log4j-server/src/test/java/org/apache/logging/log4j/server/UdpSerializedSocketServerTest.java b/log4j-server/src/test/java/org/apache/logging/log4j/server/UdpSerializedSocketServerTest.java deleted file mode 100644 index be826c9..0000000 --- a/log4j-server/src/test/java/org/apache/logging/log4j/server/UdpSerializedSocketServerTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache license, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the license for the specific language governing permissions and - * limitations under the license. - */ -package org.apache.logging.log4j.server; - -import java.io.ObjectInputStream; -import java.io.Serializable; - -import org.apache.logging.log4j.core.Layout; -import org.apache.logging.log4j.core.LoggerContext; -import org.apache.logging.log4j.core.net.Protocol; -import org.junit.AfterClass; -import org.junit.BeforeClass; - -public class UdpSerializedSocketServerTest extends AbstractSocketServerTest { - - private static UdpSocketServer<ObjectInputStream> server; - - @BeforeClass - public static void setupClass() throws Exception { - LoggerContext.getContext(false).reconfigure(); - server = UdpSocketServer.createSerializedSocketServer(PORT_NUM); - thread = server.startNewThread(); - } - - @AfterClass - public static void tearDownClass() { - server.shutdown(); - try { - thread.join(); - } catch (final InterruptedException e) { - // ignore - } - } - - public UdpSerializedSocketServerTest() { - super(Protocol.UDP, PORT, true); - } - - @Override - protected Layout<? extends Serializable> createLayout() { - return super.createSerializedLayout(); - } - -}
