From 396519f5597738ac368e33f87404565e10d31816 Mon Sep 17 00:00:00 2001 From: Michael Nitschinger Date: Wed, 15 Jan 2014 11:25:50 +0100 Subject: [PATCH] Using SystemPropertyUtil for prperty parsing. --- .../io/netty/microbench/util/AbstractMicrobenchmark.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/microbench/src/test/java/io/netty/microbench/util/AbstractMicrobenchmark.java b/microbench/src/test/java/io/netty/microbench/util/AbstractMicrobenchmark.java index 739a13033c..efb315d412 100644 --- a/microbench/src/test/java/io/netty/microbench/util/AbstractMicrobenchmark.java +++ b/microbench/src/test/java/io/netty/microbench/util/AbstractMicrobenchmark.java @@ -16,6 +16,7 @@ package io.netty.microbench.util; import io.netty.util.ResourceLeakDetector; +import io.netty.util.internal.SystemPropertyUtil; import org.junit.Test; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Measurement; @@ -89,18 +90,18 @@ public class AbstractMicrobenchmark { } protected int getWarmupIterations() { - return Integer.parseInt(System.getProperty("warmupIterations", "-1")); + return SystemPropertyUtil.getInt("warmupIterations", -1); } protected int getMeasureIterations() { - return Integer.parseInt(System.getProperty("measureIterations", "-1")); + return SystemPropertyUtil.getInt("measureIterations", -1); } protected int getForks() { - return Integer.parseInt(System.getProperty("forks", "-1")); + return SystemPropertyUtil.getInt("forks", -1); } protected String getReportDir() { - return System.getProperty("perfReportDir", null); + return SystemPropertyUtil.get("perfReportDir"); } }