diff options
Diffstat (limited to 'src/main/java/ftbsc/lll/proxies/QualifiableProxy.java')
-rw-r--r-- | src/main/java/ftbsc/lll/proxies/QualifiableProxy.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/ftbsc/lll/proxies/QualifiableProxy.java b/src/main/java/ftbsc/lll/proxies/QualifiableProxy.java index d245124..91ebaa1 100644 --- a/src/main/java/ftbsc/lll/proxies/QualifiableProxy.java +++ b/src/main/java/ftbsc/lll/proxies/QualifiableProxy.java @@ -37,10 +37,10 @@ public abstract class QualifiableProxy extends AbstractProxy { * @return the parent, or null if the parent was the root element */ protected static String extractParentFromFQN(String fqn) { - String lastSeparator = fqn.contains("$") ? "\\$" : "\\."; - String[] split = fqn.split(lastSeparator); - if(split.length == 1) return null; - return fqn.substring(0, split[split.length - 1].length() - 1); + String lastSeparator = fqn.contains("$") ? "$" : "."; + int pos = fqn.lastIndexOf(lastSeparator); + if(pos == -1) return null; + return fqn.substring(0, pos); } /** |