Skip to content
Permalink
Browse files
use 'modern' Java features as isEmpty and contains
  • Loading branch information
FSchumacher committed Mar 5, 2022
1 parent fe66021 commit 4e21125aef15040ef3b992492b69a5eef3698089
Showing 1 changed file with 2 additions and 2 deletions.
@@ -119,7 +119,7 @@ public void process() {

// Bug 15025 - save session value across samplers
if (shouldCache()){
if (value == null || value.length() == 0) {
if (value == null || value.isEmpty()) {
value = savedValue;
} else {
savedValue = value;
@@ -132,7 +132,7 @@ private void modify(HTTPSamplerBase sampler, String value) {
if (isPathExtension()) {
String oldPath = sampler.getPath();
int indexOfSessionId = oldPath.indexOf(SEMI_COLON + getArgumentName());
if(oldPath.indexOf(SEMI_COLON + getArgumentName())>=0) {
if(oldPath.contains(SEMI_COLON + getArgumentName())) {
int indexOfQuestionMark = oldPath.indexOf('?');
if(indexOfQuestionMark < 0) {
oldPath = oldPath.substring(0, indexOfSessionId);

0 comments on commit 4e21125

Please sign in to comment.