Repository: commons-text Updated Branches: refs/heads/master 85465e29a -> 377ea047b
Reuse constant instead of magic string. Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/377ea047 Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/377ea047 Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/377ea047 Branch: refs/heads/master Commit: 377ea047b960ee76dd6946d8c2b6561583fcf033 Parents: 85465e2 Author: Gary Gregory <[email protected]> Authored: Wed Sep 12 18:20:06 2018 -0600 Committer: Gary Gregory <[email protected]> Committed: Wed Sep 12 18:20:06 2018 -0600 ---------------------------------------------------------------------- .../org/apache/commons/text/lookup/ResourceBundleStringLookup.java | 2 +- .../java/org/apache/commons/text/lookup/ScriptStringLookup.java | 2 +- src/main/java/org/apache/commons/text/lookup/UrlStringLookup.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-text/blob/377ea047/src/main/java/org/apache/commons/text/lookup/ResourceBundleStringLookup.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/text/lookup/ResourceBundleStringLookup.java b/src/main/java/org/apache/commons/text/lookup/ResourceBundleStringLookup.java index 9e3e6d5..6d2212d 100644 --- a/src/main/java/org/apache/commons/text/lookup/ResourceBundleStringLookup.java +++ b/src/main/java/org/apache/commons/text/lookup/ResourceBundleStringLookup.java @@ -62,7 +62,7 @@ final class ResourceBundleStringLookup extends AbstractStringLookup { if (key == null) { return null; } - final String[] keys = key.split(":"); + final String[] keys = key.split(SPLIT_STR); final int keyLen = keys.length; if (keyLen != 2) { throw IllegalArgumentExceptions http://git-wip-us.apache.org/repos/asf/commons-text/blob/377ea047/src/main/java/org/apache/commons/text/lookup/ScriptStringLookup.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/text/lookup/ScriptStringLookup.java b/src/main/java/org/apache/commons/text/lookup/ScriptStringLookup.java index affb1a3..4705d31 100644 --- a/src/main/java/org/apache/commons/text/lookup/ScriptStringLookup.java +++ b/src/main/java/org/apache/commons/text/lookup/ScriptStringLookup.java @@ -62,7 +62,7 @@ final class ScriptStringLookup extends AbstractStringLookup { if (key == null) { return null; } - final String[] keys = key.split(":"); + final String[] keys = key.split(SPLIT_STR); final int keyLen = keys.length; if (keyLen != 2) { throw IllegalArgumentExceptions http://git-wip-us.apache.org/repos/asf/commons-text/blob/377ea047/src/main/java/org/apache/commons/text/lookup/UrlStringLookup.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/text/lookup/UrlStringLookup.java b/src/main/java/org/apache/commons/text/lookup/UrlStringLookup.java index e17e668..29e894e 100644 --- a/src/main/java/org/apache/commons/text/lookup/UrlStringLookup.java +++ b/src/main/java/org/apache/commons/text/lookup/UrlStringLookup.java @@ -62,7 +62,7 @@ final class UrlStringLookup extends AbstractStringLookup { if (key == null) { return null; } - final String[] keys = key.split(":"); + final String[] keys = key.split(SPLIT_STR); final int keyLen = keys.length; if (keyLen < 2) { throw IllegalArgumentExceptions.format("Bad URL key format [%s]; expected format is DocumentPath:Key.",
