@SuppressWarnings("unchecked") @Override protected void deserialize() throws IOException { clearMaps(); if (byteArray == null) return; ByteArrayInputStream in = new ByteArrayInputStream(byteArray); ObjectInputStream oin = new ObjectInputStream(in); try { helper.roleMap = (TreeMap<String, GeoServerRole>) oin.readObject(); helper.role_parentMap = (HashMap<GeoServerRole, GeoServerRole>) oin.readObject(); helper.user_roleMap = (TreeMap<String, SortedSet<GeoServerRole>>) oin.readObject(); helper.group_roleMap = (TreeMap<String, SortedSet<GeoServerRole>>) oin.readObject(); } catch (ClassNotFoundException e) { throw new IOException(e); } }