summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core/src/main/java')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtils.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtils.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtils.java
index efc47337..e753f19f 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtils.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtils.java
@@ -109,8 +109,8 @@ public class KeyValueUtils {
* @param suffix Suffix of this key
* @return Prefix {String} of the key or null if input key does not ends with postfix string
*/
- public static String getPrefixFromKey(String key, String suffix) {
- if (key != null && key.endsWith(suffix)) {
+ public static String getPrefixFromKey(String key, String suffix) {
+ if (key != null && suffix != null && key.endsWith(suffix)) {
final String idPreforeSuffix = key.substring(0, key.length()-suffix.length());
if (idPreforeSuffix.endsWith(KEY_DELIMITER))
return idPreforeSuffix.substring(0, idPreforeSuffix.length()-1);