summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/satserver
diff options
context:
space:
mode:
authorSimon Rettberg2020-12-10 13:51:44 +0100
committerSimon Rettberg2020-12-10 13:51:44 +0100
commit8c21d3ec1a6ab04e0011a7e988a3cdc8a8ae19ce (patch)
tree0f5dfbab25d5bf7b4e3d3ccdf4322bee4049eaff /src/main/java/org/openslx/satserver
parent[RecompressArchive] Add forceRoot flag to chown/chgrp to root (diff)
downloadtmlite-bwlp-8c21d3ec1a6ab04e0011a7e988a3cdc8a8ae19ce.tar.gz
tmlite-bwlp-8c21d3ec1a6ab04e0011a7e988a3cdc8a8ae19ce.tar.xz
tmlite-bwlp-8c21d3ec1a6ab04e0011a7e988a3cdc8a8ae19ce.zip
[MountVmStore] Better handling of concurrent invocations
Diffstat (limited to 'src/main/java/org/openslx/satserver')
-rw-r--r--src/main/java/org/openslx/satserver/util/Util.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/satserver/util/Util.java b/src/main/java/org/openslx/satserver/util/Util.java
index 55dc76b..262fd56 100644
--- a/src/main/java/org/openslx/satserver/util/Util.java
+++ b/src/main/java/org/openslx/satserver/util/Util.java
@@ -116,5 +116,18 @@ public class Util
return defaultValue;
}
}
+
+ /**
+ * Compare two strings for equality.
+ * null and "" are not considered equal.
+ */
+ public static boolean strcmp(String a, String b)
+ {
+ if ( a == null && b == null )
+ return true;
+ if ( a == null || b == null )
+ return false;
+ return a.equals( b );
+ }
}