diff options
author | Simon Rettberg | 2020-12-10 13:51:44 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-12-10 13:51:44 +0100 |
commit | 8c21d3ec1a6ab04e0011a7e988a3cdc8a8ae19ce (patch) | |
tree | 0f5dfbab25d5bf7b4e3d3ccdf4322bee4049eaff /src/main/java/org/openslx/satserver | |
parent | [RecompressArchive] Add forceRoot flag to chown/chgrp to root (diff) | |
download | tmlite-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.java | 13 |
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 ); + } } |