Remove unused constructor, add close() to BoundaryIterator finalizer for now, remove unused debug method from NativeFuture
This commit is contained in:
parent
db4c3cf740
commit
b354c7fc00
|
@ -221,6 +221,7 @@ public class LocalityUtil {
|
|||
if(FDB.getInstance().warnOnUnclosed && !closed) {
|
||||
System.err.println("CloseableAsyncIterator not closed (getBoundaryKeys)");
|
||||
}
|
||||
close();
|
||||
}
|
||||
finally {
|
||||
super.finalize();
|
||||
|
|
|
@ -69,10 +69,8 @@ abstract class NativeFuture<T> extends CompletableFuture<T> implements AutoClose
|
|||
complete(val);
|
||||
}
|
||||
} catch(FDBException t) {
|
||||
assert(t.getCode() != 2015); // future_not_set not possible
|
||||
if(t.getCode() != 1102) { // future_released
|
||||
completeExceptionally(t);
|
||||
}
|
||||
assert(t.getCode() != 1102 && t.getCode() != 2015); // future_released, future_not_set not possible
|
||||
completeExceptionally(t);
|
||||
} catch(Throwable t) {
|
||||
completeExceptionally(t);
|
||||
} finally {
|
||||
|
@ -132,10 +130,6 @@ abstract class NativeFuture<T> extends CompletableFuture<T> implements AutoClose
|
|||
return cPtr;
|
||||
}
|
||||
|
||||
boolean isCleanedUp() {
|
||||
return isDone() && cPtr == 0;
|
||||
}
|
||||
|
||||
private native void Future_registerCallback(long cPtr, Runnable callback);
|
||||
private native void Future_blockUntilReady(long cPtr);
|
||||
private native boolean Future_isReady(long cPtr);
|
||||
|
|
|
@ -30,9 +30,6 @@ abstract class NativeObjectWrapper implements AutoCloseable {
|
|||
private boolean closed = false;
|
||||
private long cPtr;
|
||||
|
||||
public NativeObjectWrapper() {
|
||||
}
|
||||
|
||||
public NativeObjectWrapper(long cPtr) {
|
||||
this.cPtr = cPtr;
|
||||
if(this.cPtr == 0)
|
||||
|
|
Loading…
Reference in New Issue