public BaseAuthorization[] getAuthorizations() {
BaseAuthorization[] res = new BaseAuthorization[authorizations.length];
try {
for (int i = 0; i < authorizations.length; i++) {
ByteArrayInputStream bais = new ByteArrayInputStream(authorizations[i]);
JBossObjectInputStream deserialize = new JBossObjectInputStream(bais);
Object obj = deserialize.readObject();
res[i] = (BaseAuthorization) obj;
}
} catch (ClassNotFoundException cnfe) {
Logger log = LoggerFactory.getLogger(SavedAuthenticationImpl.class);
log.error("Can not deserialize object, may cause rights to be lost.", cnfe);