Skip to content

Commit

Permalink
Make KeyValueEntryData validation not case-sensitive (#7143)
Browse files Browse the repository at this point in the history
* fix entry casing

* lowercase seperator as well

Co-authored-by: _tud <[email protected]>

* use regionMatches instead

* use regionMatches instead

* remove import

---------

Co-authored-by: sovdee <[email protected]>
Co-authored-by: _tud <[email protected]>
  • Loading branch information
3 people authored Oct 31, 2024
1 parent ba32d7a commit 8c91cc8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public boolean canCreateWith(Node node) {
if (key == null)
return false;
key = ScriptLoader.replaceOptions(key);
return key.startsWith(getKey() + getSeparator());
String prefix = getKey() + getSeparator();
return key.regionMatches(true, 0, prefix, 0, prefix.length());
}

}

0 comments on commit 8c91cc8

Please sign in to comment.