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);
res = new BaseAuthorization[0]; // assure empty list, otherwise risk of NPE
} catch (IOException ioe) {
Logger log = LoggerFactory.getLogger(SavedAuthenticationImpl.class);
log.error("Can not deserialize object, may cause rights to be lost.", ioe);
res = new BaseAuthorization[0]; // assure empty list, otherwise risk of NPE
}
return res;
}