You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2019/08/22 10:36:22 UTC
[jmeter] 02/03: Formatting of code no other change
This is an automated email from the ASF dual-hosted git repository.
fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
commit 1461aa986e7d2d1fafd7e14e81a52cefe1a9d218
Author: Felix Schumacher <fe...@internetallee.de>
AuthorDate: Tue Aug 20 22:15:37 2019 +0200
Formatting of code no other change
---
.../java/org/apache/jmeter/util/XPathUtil.java | 26 +++++++++-------------
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/src/core/src/main/java/org/apache/jmeter/util/XPathUtil.java b/src/core/src/main/java/org/apache/jmeter/util/XPathUtil.java
index f2cb5e3..fb53a3f 100644
--- a/src/core/src/main/java/org/apache/jmeter/util/XPathUtil.java
+++ b/src/core/src/main/java/org/apache/jmeter/util/XPathUtil.java
@@ -485,33 +485,29 @@ public class XPathUtil {
}
}
-
public static List<String[]> namespacesParse(String namespaces) {
List<String[]> res = new ArrayList<>();
int length = namespaces.length();
int startWord = 0;
boolean afterEqual = false;
int positionLastKey = -1;
- for(int i = 0; i < length; i++) {
+ for (int i = 0; i < length; i++) {
char actualChar = namespaces.charAt(i);
- if(actualChar=='=' && !afterEqual) {
- String [] tmp = new String[2];
+ if (actualChar == '=' && !afterEqual) {
+ String[] tmp = new String[2];
tmp[0] = namespaces.substring(startWord, i);
res.add(tmp);
afterEqual = true;
- startWord = i+1;
+ startWord = i + 1;
positionLastKey++;
- }
- else if(namespaces.charAt(i)=='\n' && afterEqual) {
+ } else if (namespaces.charAt(i) == '\n' && afterEqual) {
afterEqual = false;
- res.get(positionLastKey)[1]= namespaces.substring(startWord, i);
- startWord = i+1;
- }
- else if(namespaces.charAt(i)=='\n') {
- startWord = i+1;
- }
- else if(i==length-1 && afterEqual) {
- res.get(positionLastKey)[1]= namespaces.substring(startWord, i+1);
+ res.get(positionLastKey)[1] = namespaces.substring(startWord, i);
+ startWord = i + 1;
+ } else if (namespaces.charAt(i) == '\n') {
+ startWord = i + 1;
+ } else if (i == length - 1 && afterEqual) {
+ res.get(positionLastKey)[1] = namespaces.substring(startWord, i + 1);
}
}
return res;