Java Security tryDestroy(Object destroyable)

Here you can find the source of tryDestroy(Object destroyable)

Description

try Destroy

License

Open Source License

Declaration

public static void tryDestroy(Object destroyable) 

Method Source Code

//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) {
            }
        }
    }
}

Related

  1. parseDirectives(byte[] buf)
  2. secretKey(final String key)
  3. serializeKerberosTicket(KerberosTicket tgt)
  4. stringToByte_8859_1(String str, boolean useUTF8)
  5. ticketToCreds(KerberosTicket kerbTicket)