1
1
/*
2
- * Copyright 2002-2018 the original author or authors.
2
+ * Copyright 2002-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -958,21 +958,24 @@ private PropertyTokenHolder getPropertyNameTokens(String propertyName) {
958
958
return tokens ;
959
959
}
960
960
961
- private static int getPropertyNameKeyEnd (String propertyName , int startIndex ) {
961
+ private int getPropertyNameKeyEnd (String propertyName , int startIndex ) {
962
962
int unclosedPrefixes = 0 ;
963
963
int length = propertyName .length ();
964
964
for (int i = startIndex ; i < length ; i ++) {
965
965
switch (propertyName .charAt (i )) {
966
966
case PropertyAccessor .PROPERTY_KEY_PREFIX_CHAR :
967
- // The property name contains opening prefix(es)
967
+ // The property name contains opening prefix(es)...
968
968
unclosedPrefixes ++;
969
969
break ;
970
970
case PropertyAccessor .PROPERTY_KEY_SUFFIX_CHAR :
971
971
if (unclosedPrefixes == 0 ) {
972
- // No unclosed prefix(es) in the property name (left), this is the suffix we are looking for
972
+ // No unclosed prefix(es) in the property name (left) ->
973
+ // this is the suffix we are looking for.
973
974
return i ;
974
- } else {
975
- // This suffix does not close the initial prefix, but one that occurred within the property name
975
+ }
976
+ else {
977
+ // This suffix does not close the initial prefix but rather
978
+ // just one that occurred within the property name.
976
979
unclosedPrefixes --;
977
980
}
978
981
break ;
@@ -981,6 +984,7 @@ private static int getPropertyNameKeyEnd(String propertyName, int startIndex) {
981
984
return -1 ;
982
985
}
983
986
987
+
984
988
@ Override
985
989
public String toString () {
986
990
StringBuilder sb = new StringBuilder (getClass ().getName ());
0 commit comments