Here you can find the source of tryDestroy(Object destroyable)
public static void tryDestroy(Object destroyable)
//package com.java2s; // The MIT License (MIT) import javax.security.auth.DestroyFailedException; import javax.security.auth.Destroyable; public class Main { public static void tryDestroy(Object destroyable) { if (!(destroyable instanceof Destroyable)) { return; }/*from w w w . j a v a 2 s.c o m*/ Destroyable obj = (Destroyable) destroyable; if (!obj.isDestroyed()) { try { obj.destroy(); } catch (DestroyFailedException ignore) { } } } }