logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4J2-972) org.apache.logging.log4j.core.net.ssl.TlsSyslogInputStreamReader does not need to create temp Integer objects
Date Wed, 04 Mar 2015 19:52:38 GMT
Gary Gregory created LOG4J2-972:
-----------------------------------

             Summary: org.apache.logging.log4j.core.net.ssl.TlsSyslogInputStreamReader does
not need to create temp Integer objects
                 Key: LOG4J2-972
                 URL: https://issues.apache.org/jira/browse/LOG4J2-972
             Project: Log4j 2
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.2
         Environment: Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T
Maven home: C:\Java\apache-maven-3.2.5
Java version: 1.7.0_75, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_75\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
            Reporter: Gary Gregory
             Fix For: 2.2.1


org.apache.logging.log4j.core.net.ssl.TlsSyslogInputStreamReader does not need to create temp
Integer objects.

{noformat}
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TlsSyslogInputStreamReader.java
b/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TlsSyslogInputStreamReader.java
index 4622dd0..8ea3142 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TlsSyslogInputStreamReader.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TlsSyslogInputStreamReader.java
@@ -86,6 +86,6 @@
 
     private void calculateNextMessageLength() {
         final byte[] length = Arrays.copyOfRange(lengthBuffer, 0, position);
-        nextMessageLength = new Integer(new String(length));
+        nextMessageLength = Integer.parseInt(new String(length));
     }
 }
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message