File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
src/main/java/org/gephi/graph/impl Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -387,15 +387,25 @@ public boolean deepEquals(ColumnStore<T> obj) {
387387 return false ;
388388 }
389389 }
390+ if (itr2 .hasNext ()) {
391+ return false ;
392+ }
390393 return true ;
391394 }
392395
393396 public int deepHashCode () {
394397 int hash = 3 ;
395398 hash = 11 * hash + (this .elementType != null ? this .elementType .hashCode () : 0 );
396- ColumnStoreIterator itr = new ColumnStoreIterator ();
397- while (itr .hasNext ()) {
398- hash = 11 * hash + itr .next ().deepHashCode ();
399+ lock ();
400+ try {
401+ for (int i = 0 ; i < length ; i ++) {
402+ ColumnImpl c = columns [i ];
403+ if (c != null ) {
404+ hash = 11 * hash + c .deepHashCode ();
405+ }
406+ }
407+ } finally {
408+ unlock ();
399409 }
400410 // TODO what about timestampmap
401411 return hash ;
Original file line number Diff line number Diff line change @@ -161,11 +161,13 @@ public ColumnImpl getColumn(int index) {
161161
162162 @ Override
163163 public ColumnImpl getColumn (String id ) {
164+ store .checkNonNullObject (id );
164165 return store .getColumn (id .toLowerCase ());
165166 }
166167
167168 @ Override
168169 public boolean hasColumn (String id ) {
170+ store .checkNonNullObject (id );
169171 return store .hasColumn (id .toLowerCase ());
170172 }
171173
@@ -184,6 +186,7 @@ public void removeColumn(Column column) {
184186
185187 @ Override
186188 public void removeColumn (String id ) {
189+ store .checkNonNullObject (id );
187190 store .removeColumn (id .toLowerCase ());
188191 }
189192
You can’t perform that action at this time.
0 commit comments