@ Internal public static void closeSafetyNetAndGuardedResourcesForThread ( ) { SafetyNetCloseableRegistry registry = REGISTRIES . get ( ) ; if ( null != registry ) { REGISTRIES . remove ( ) ; IOUtils . closeQuietly ( registry ) ; } }
Closes the safety net for a thread . This closes all remaining unclosed streams that were opened by safety - net - guarded file systems . After this method was called no streams can be opened any more from any FileSystem instance that was obtained while the thread was guarded by the safety net .