List of usage examples for javax.mail Folder hashCode
@HotSpotIntrinsicCandidate public native int hashCode();
From source file:net.wastl.webmail.server.WebMailSession.java
/** * This method tries to generate a unique folder identifier for the given folder. * This method generates an MD5 sum over the complete folder URL, if possible. * @see getFolderTree/*from www . jav a2s .co m*/ * @see net.wastl.webmail.misc.MD5 */ protected String generateFolderHash(Folder folder) { String id = Integer.toHexString(folder.hashCode()); // If possible, use the MD5-Sum for the folder ID because it is persistant over sessions try { MD5 md5 = new MD5(folder.getURLName()); id = md5.asHex(); } catch (MessagingException ex) { } return id; }