jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1698313 - in /jmeter/trunk: src/components/org/apache/jmeter/assertions/ src/components/org/apache/jmeter/visualizers/backend/graphite/ src/core/org/apache/jmeter/gui/ src/protocol/http/org/apache/jmeter/protocol/http/sampler/ test/src/org...
Date Fri, 28 Aug 2015 11:49:49 GMT
Author: sebb
Date: Fri Aug 28 11:49:49 2015
New Revision: 1698313

URL: http://svn.apache.org/r1698313
Log:
Explicit box/unboxing (compiler warning found some bugs)

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/UndoHistory.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jmeter/trunk/test/src/org/apache/jorphan/util/TestConverter.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java?rev=1698313&r1=1698312&r2=1698313&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java Fri Aug 28
11:49:49 2015
@@ -335,8 +335,8 @@ class SMIMEAssertion {
             X509ExtensionUtil.getSubjectAlternativeNames(cert);
         for (Object altNameObj : subjectAltNames) {
             List<?> altName = (List<?>) altNameObj;
-            int type = (Integer) altName.get(0);
-            if (type == GeneralName.rfc822Name) {
+            Integer type = (Integer) altName.get(0);
+            if (type.intValue() == GeneralName.rfc822Name) {
                 String address = (String) altName.get(1);
                 res.add(address);
             }

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java?rev=1698313&r1=1698312&r2=1698313&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java
Fri Aug 28 11:49:49 2015
@@ -240,7 +240,7 @@ public class GraphiteBackendListenerClie
         for (int i = 0; i < percentilesStringArray.length; i++) {
             if(!StringUtils.isEmpty(percentilesStringArray[i].trim())) {
                 try {
-                    Float percentileValue = Float.parseFloat(percentilesStringArray[i].trim());
+                    Float percentileValue = Float.valueOf(percentilesStringArray[i].trim());
                     okPercentiles.put(
                             METRIC_OK_PERCENTILE_PREFIX+AbstractGraphiteMetricsSender.sanitizeString(format.format(percentileValue)),
                             percentileValue);

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/UndoHistory.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/UndoHistory.java?rev=1698313&r1=1698312&r2=1698313&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/UndoHistory.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/UndoHistory.java Fri Aug 28 11:49:49 2015
@@ -318,7 +318,7 @@ public class UndoHistory implements Tree
 
             for (int rowN = 0; rowN < tree.getRowCount(); rowN++) {
                 if (tree.isExpanded(rowN)) {
-                    savedExpanded.add(rowN);
+                    savedExpanded.add(Integer.valueOf(rowN));
                 }
             }
         }

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1698313&r1=1698312&r2=1698313&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Fri Aug 28 11:49:49 2015
@@ -915,7 +915,7 @@ public class HTTPHC4Impl extends HTTPHCA
         if (hostParts.length > 1) {
             String portString = hostParts[hostParts.length - 1];
             if (portString.matches("^\\d+$")) {
-                return Integer.valueOf(portString);
+                return Integer.parseInt(portString);
             }
         }
         return defaultValue;

Modified: jmeter/trunk/test/src/org/apache/jorphan/util/TestConverter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jorphan/util/TestConverter.java?rev=1698313&r1=1698312&r2=1698313&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jorphan/util/TestConverter.java (original)
+++ jmeter/trunk/test/src/org/apache/jorphan/util/TestConverter.java Fri Aug 28 11:49:49 2015
@@ -19,7 +19,6 @@
 package org.apache.jorphan.util;
 
 import java.text.DateFormat;
-import java.util.Arrays;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.GregorianCalendar;
@@ -67,8 +66,8 @@ public class TestConverter extends TestC
         cal.set(Calendar.SECOND, 0);
         cal.set(Calendar.MILLISECOND, 0);
         Date time = cal.getTime();
-        for (int formatId : Arrays.asList(DateFormat.SHORT, DateFormat.MEDIUM,
-                DateFormat.LONG, DateFormat.FULL)) {
+        for (int formatId : new int[]{DateFormat.SHORT, DateFormat.MEDIUM,
+                DateFormat.LONG, DateFormat.FULL}) {
             DateFormat formatter = DateFormat.getDateInstance(formatId);
             assertEquals(cal,
                     Converter.getCalendar(formatter.format(time), null));
@@ -116,8 +115,8 @@ public class TestConverter extends TestC
         cal.set(Calendar.SECOND, 0);
         cal.set(Calendar.MILLISECOND, 0);
         Date time = cal.getTime();
-        for (int formatId : Arrays.asList(DateFormat.SHORT, DateFormat.MEDIUM,
-                DateFormat.LONG, DateFormat.FULL)) {
+        for (int formatId : new int[]{DateFormat.SHORT, DateFormat.MEDIUM,
+                DateFormat.LONG, DateFormat.FULL}) {
             DateFormat formatter = DateFormat.getDateInstance(formatId);
             assertEquals(time,
                     Converter.getDate(formatter.format(time), null));



Mime
View raw message