Skip to content

Commit

Permalink
The commit hides tree keys of tree builders.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalohlava committed May 21, 2014
1 parent 52dab5e commit 3492445
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/hex/gbm/DTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ public Key save(Key k) {
}

private Key defaultTreeKey() {
return Key.make("__Tree_"+Key.rand());
return Key.makeUserHidden(Key.make("__Tree_"+Key.rand()));
}

private static final SB TO_JAVA_BENCH_FUNC = new SB().
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/water/Key.java
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,15 @@ private static byte[] decodeKeyName(String what) {
}
}

public int hashCode() { return _hash; }
public boolean equals( Object o ) {
@Override public int hashCode() { return _hash; }
@Override public boolean equals( Object o ) {
if( o == null || ((Key)(o))._kb == null || _kb == null) return false;
if( this == o ) return true;
Key k = (Key)o;
return Arrays.equals(k._kb,_kb);
}

public int compareTo(Object o) {
@Override public int compareTo(Object o) {
assert (o instanceof Key);
return this.toString().compareTo(o.toString());
}
Expand Down

0 comments on commit 3492445

Please sign in to comment.