if (currentChrId == null || currentChrId != resultChrId) {
if (currentChrId == null || !currentChrId.equals(resultChrId)) {
    private void writeGFF(ObjectStore os, File destinationDirectory)        throws ObjectStoreException, IOException, ChangeVetoException, IllegalArgumentException,               IllegalSymbolException {        Results results =            PostProcessUtil.findLocations(os, Chromosome.class, BioEntity.class, false);        Iterator resIter = results.iterator();        PrintWriter gffWriter = null;        // a Map of object classes to counts        Map objectCounts = null;        // the last Chromosome seen        Integer currentChrId = null;        Chromosome currentChr = null;        while (resIter.hasNext()) {            ResultsRow rr = (ResultsRow) resIter.next();            Integer resultChrId = (Integer) rr.get(0);            BioEntity feature = (BioEntity) rr.get(1);            Location loc = (Location) rr.get(2);            if (currentChrId == null || currentChrId != resultChrId) {                currentChr = (Chromosome) os.getObjectById(resultChrId);                writeChromosomeFasta(destinationDirectory, currentChr);                File gffFile = chromosomeGFFFile(destinationDirectory, currentChr);                if (gffWriter != null) {                    gffWriter.close();                }                gffWriter = new PrintWriter(new FileWriter(gffFile));                writeFeature(gffWriter, currentChr, currentChr, null, new Integer(0));                objectCounts = new HashMap();                currentChrId = resultChrId;            }            writeFeature(gffWriter, currentChr, feature, loc,                         (Integer) objectCounts.get(feature.getClass()));            incrementCount(objectCounts, feature);        }        gffWriter.close();    }