Use indexOf a char
This commit is contained in:
@@ -41,7 +41,7 @@ public class FilterDefinition {
|
||||
}
|
||||
|
||||
public FilterDefinition(String text) {
|
||||
int eqIdx = text.indexOf("=");
|
||||
int eqIdx = text.indexOf('=');
|
||||
if (eqIdx <= 0) {
|
||||
setName(text);
|
||||
return;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class PredicateDefinition {
|
||||
}
|
||||
|
||||
public PredicateDefinition(String text) {
|
||||
int eqIdx = text.indexOf("=");
|
||||
int eqIdx = text.indexOf('=');
|
||||
if (eqIdx <= 0) {
|
||||
throw new ValidationException("Unable to parse PredicateDefinition text '" + text + "'" +
|
||||
", must be of the form name=value");
|
||||
|
||||
@@ -56,7 +56,7 @@ public class RouteDefinition {
|
||||
public RouteDefinition() {}
|
||||
|
||||
public RouteDefinition(String text) {
|
||||
int eqIdx = text.indexOf("=");
|
||||
int eqIdx = text.indexOf('=');
|
||||
if (eqIdx <= 0) {
|
||||
throw new ValidationException("Unable to parse RouteDefinition text '" + text + "'" +
|
||||
", must be of the form name=value");
|
||||
|
||||
Reference in New Issue
Block a user