void (final Object userObject) { final Object oldObject = getUserObject(); try { super.setUserObject(userObject); } finally { if (oldObject instanceof VirtualFilePointer pointer) { Disposer.dispose((Disposable)pointer); } } }