public int[] recover() throws SimpleXAResourceException { int[] nodePhases = persistentNodePool.recover(); int[] stringPhases = persistentStringPool.recover(); // If both are empty then return empty. if (nodePhases.length == 0 && stringPhases.length == 0) { return nodePhases; } // Else if the intersection is empty *error*, TIntHashSet phaseSet = new TIntHashSet(nodePhases); phaseSet.retainAll(stringPhases); if (phaseSet.isEmpty()) { throw new SimpleXAResourceException("No matching phases between Node and String Pools."); } //else return the intersection. return phaseSet.toArray(); }