mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
tolerate null arguments, just return them
This commit is contained in:
@@ -76,6 +76,7 @@ public class ReplacePathToMacroMap extends PathMacroMap {
|
||||
}
|
||||
|
||||
public String substitute(String text, boolean caseSensitive) {
|
||||
if (text == null) return null;
|
||||
for (final String path : getPathIndex()) {
|
||||
final String macro = get(path);
|
||||
text = replacePathMacro(text, path, macro, caseSensitive);
|
||||
|
||||
@@ -34,6 +34,7 @@ public class ExpandMacroToPathMap extends PathMacroMap {
|
||||
}
|
||||
|
||||
public String substitute(String text, boolean caseSensitive) {
|
||||
if (text == null) return null;
|
||||
for (Map.Entry<String, String> entry : entries()) {
|
||||
// when replacing macros with actual paths the replace utility may be used as always 'case-sensitive'
|
||||
// for case-insensitive file systems there will be no unnecesary toLowerCase() transforms.
|
||||
|
||||
Reference in New Issue
Block a user