From 2053561ae852f45c1675b5767e58512ca642cbc0 Mon Sep 17 00:00:00 2001 From: Ceki Gulcu Date: Thu, 23 Feb 2017 21:22:31 +0100 Subject: [PATCH] remove JMS related code --- logback-classic/pom.xml | 6 ------ .../java/ch/qos/logback/classic/net/SocketReceiver.java | 5 ++++- .../test/java/ch/qos/logback/classic/net/PackageTest.java | 2 +- logback-core/pom.xml | 6 ------ .../src/test/java/ch/qos/logback/core/net/PackageTest.java | 2 +- logback-site/src/site/pages/news.html | 4 ++++ pom.xml | 7 +------ 7 files changed, 11 insertions(+), 21 deletions(-) diff --git a/logback-classic/pom.xml b/logback-classic/pom.xml index 7d8e4245d..8cb645403 100755 --- a/logback-classic/pom.xml +++ b/logback-classic/pom.xml @@ -117,12 +117,6 @@ ${slf4j.version} test - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - compile - true - javax.servlet javax.servlet-api diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/net/SocketReceiver.java b/logback-classic/src/main/java/ch/qos/logback/classic/net/SocketReceiver.java index 3e49699db..c803907af 100644 --- a/logback-classic/src/main/java/ch/qos/logback/classic/net/SocketReceiver.java +++ b/logback-classic/src/main/java/ch/qos/logback/classic/net/SocketReceiver.java @@ -28,6 +28,7 @@ import javax.net.SocketFactory; import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.LoggerContext; +import ch.qos.logback.classic.net.server.HardenedLoggingEventInputStream; import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.core.net.DefaultSocketConnector; import ch.qos.logback.core.net.AbstractSocketAppender; @@ -153,9 +154,10 @@ public class SocketReceiver extends ReceiverBase implements Runnable, SocketConn } private void dispatchEvents(LoggerContext lc) { + ObjectInputStream ois = null; try { socket.setSoTimeout(acceptConnectionTimeout); - ObjectInputStream ois = new ObjectInputStream(socket.getInputStream()); + ois = new HardenedLoggingEventInputStream(socket.getInputStream()); socket.setSoTimeout(0); addInfo(receiverId + "connection established"); while (true) { @@ -172,6 +174,7 @@ public class SocketReceiver extends ReceiverBase implements Runnable, SocketConn } catch (ClassNotFoundException ex) { addInfo(receiverId + "unknown event class: " + ex); } finally { + CloseUtil.closeQuietly(ois); CloseUtil.closeQuietly(socket); socket = null; addInfo(receiverId + "connection closed"); diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/net/PackageTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/net/PackageTest.java index 884fa2c05..f03e8fc7d 100644 --- a/logback-classic/src/test/java/ch/qos/logback/classic/net/PackageTest.java +++ b/logback-classic/src/test/java/ch/qos/logback/classic/net/PackageTest.java @@ -18,7 +18,7 @@ import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; @RunWith(Suite.class) -@SuiteClasses({ SyslogAppenderTest.class, DilutedSMTPAppenderTest.class, JMSQueueAppenderTest.class, JMSTopicAppenderTest.class, SMTPAppender_GreenTest.class, +@SuiteClasses({ SyslogAppenderTest.class, DilutedSMTPAppenderTest.class, SMTPAppender_GreenTest.class, SMTPAppender_SubethaSMTPTest.class, SocketReceiverTest.class, SSLSocketReceiverTest.class }) public class PackageTest { } \ No newline at end of file diff --git a/logback-core/pom.xml b/logback-core/pom.xml index b83d5fae3..7925f6177 100755 --- a/logback-core/pom.xml +++ b/logback-core/pom.xml @@ -34,12 +34,6 @@ compile true - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - compile - true - org.mockito mockito-core diff --git a/logback-core/src/test/java/ch/qos/logback/core/net/PackageTest.java b/logback-core/src/test/java/ch/qos/logback/core/net/PackageTest.java index 45a8d7cd6..29f146af4 100644 --- a/logback-core/src/test/java/ch/qos/logback/core/net/PackageTest.java +++ b/logback-core/src/test/java/ch/qos/logback/core/net/PackageTest.java @@ -17,7 +17,7 @@ import org.junit.runner.RunWith; import org.junit.runners.Suite; @RunWith(Suite.class) -@Suite.SuiteClasses({ AbstractSocketAppenderTest.class, DefaultSocketConnectorTest.class, AbstractSSLSocketAppenderTest.class, +@Suite.SuiteClasses({ DefaultSocketConnectorTest.class, AbstractSSLSocketAppenderTest.class, ch.qos.logback.core.net.server.PackageTest.class, ch.qos.logback.core.net.ssl.PackageTest.class }) public class PackageTest { } diff --git a/logback-site/src/site/pages/news.html b/logback-site/src/site/pages/news.html index df4162c5a..4899968d7 100755 --- a/logback-site/src/site/pages/news.html +++ b/logback-site/src/site/pages/news.html @@ -40,6 +40,10 @@ href="https://jira.qos.ch/browse/LOGBACK-1247">LOGBACK-1247 by Jakob Bergendahl who also provided the relevant pull request.

+ +

Removed JMSQueueAppender and + JMSTopicAppender. These appenders were undocumented + and had no apparent users.

Remove comment in logback-classic's META-INF/services/javax.servlet.ServletContainerInitializer diff --git a/pom.xml b/pom.xml index 72e7fe3b1..484833020 100755 --- a/pom.xml +++ b/pom.xml @@ -190,11 +190,6 @@ jetty-server ${jetty.version} - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.0 - javax.servlet @@ -211,7 +206,7 @@ org.mockito mockito-core - 1.10.19 + 2.7.9 -- GitLab