You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/10/06 13:19:00 UTC

[GitHub] [flink] kezhuw commented on a change in pull request #13124: [FLINK-18815][test-stability] Close safety net guarded closeable iff it is still registered

kezhuw commented on a change in pull request #13124:
URL: https://github.com/apache/flink/pull/13124#discussion_r500268405



##########
File path: flink-core/src/main/java/org/apache/flink/util/AbstractCloseableRegistry.java
##########
@@ -163,9 +163,9 @@ protected final void addCloseableInternal(Closeable closeable, T metaData) {
 	/**
 	 * Removes a mapping from the registry map, respecting locking.
 	 */
-	protected final void removeCloseableInternal(Closeable closeable) {
+	protected final boolean removeCloseableInternal(Closeable closeable, T object) {
 		synchronized (getSynchronizationLock()) {
-			closeableToRef.remove(closeable);
+			return closeableToRef.remove(closeable, object);

Review comment:
       @kezhuw For self-review. The paranoid concern does not hold, since java has only one approach to recycle unreachable object, it is overriding `Object.finalize`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org