You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2015/03/04 20:54:38 UTC
[jira] [Resolved] (LOG4J2-972)
org.apache.logging.log4j.core.net.ssl.TlsSyslogInputStreamReader does not
need to create temp Integer objects
[ https://issues.apache.org/jira/browse/LOG4J2-972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Gregory resolved LOG4J2-972.
---------------------------------
Resolution: Fixed
Pushed fix to git master.
> 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