Skip to content

Commit

Permalink
[ISSUE-#4436] Fix parse label expression error problem (#4465)
Browse files Browse the repository at this point in the history
* fix parse label expression error problem

* ignore VariableDeclarationUsageDistance checkstyle

* fix check style
  • Loading branch information
horizonzy authored Dec 14, 2020
1 parent 19a04bf commit 6bf46e9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ private static int checkInnerSyntax(List<String> elements, int start) {
return -1;
}

final String labelConsumer = elements.get(index++).split(CONSUMER_PREFIX)[1];

index = skipEmpty(elements, index);
if (index >= elements.size()) {
return -1;
Expand All @@ -275,9 +277,8 @@ private static int checkInnerSyntax(List<String> elements, int start) {
return -1;
}

String labelProvider = elements.get(index).split(PROVIDER_PREFIX)[1];
final String labelProvider = elements.get(index).split(PROVIDER_PREFIX)[1];

String labelConsumer = elements.get(index++).split(CONSUMER_PREFIX)[1];
if (!labelConsumer.equals(labelProvider)) {
return -1;
}
Expand Down

0 comments on commit 6bf46e9

Please sign in to comment.