Skip to content

Commit

Permalink
Use JMeterProperty#intValue for loop count directly (#5876)
Browse files Browse the repository at this point in the history
This will get rid of the roundtrip over a String in case,
the prop is already an IntegerProperty.
  • Loading branch information
FSchumacher committed May 11, 2023
1 parent fc230f6 commit 96bfab9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public int getLoops() {
) {
try {
JMeterProperty prop = getProperty(LOOPS);
nbLoops = Integer.valueOf(prop.getStringValue());
nbLoops = prop.getIntValue();
} catch (NumberFormatException e) {
nbLoops = 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ public String getContextProvider() {

public int getCommunicationstyle() {
JMeterProperty prop = getProperty(JMS_COMMUNICATION_STYLE);
return Integer.parseInt(prop.getStringValue());
return prop.getIntValue();
}

public String getCommunicationstyleString() {
Expand Down

0 comments on commit 96bfab9

Please sign in to comment.