Browse Source

recuse in hashOf for Collections

tags/2.0.1
Jonathan Cobb 5 years ago
parent
commit
708996280e
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/main/java/org/cobbzilla/util/daemon/ZillaRuntime.java

+ 2
- 1
src/main/java/org/cobbzilla/util/daemon/ZillaRuntime.java View File

@@ -339,7 +339,8 @@ public class ZillaRuntime {
public static String hashOf (Object... things) { public static String hashOf (Object... things) {
final StringBuilder b = new StringBuilder(); final StringBuilder b = new StringBuilder();
for (Object thing : things) { for (Object thing : things) {
b.append(thing == null ? "null" : thing).append(":::");
if (b.length() > 0) b.append(":::");
b.append(thing == null ? "null" : (thing instanceof Collection ? hashOf(thing) : ""+thing));
} }
return b.toString(); return b.toString();
} }


Loading…
Cancel
Save