Skip to content

Commit

Permalink
Access inherited variables with this. intead of super.
Browse files Browse the repository at this point in the history
the confusion that triggered the change: The use of super. indicates that the subclass also declares one with the same name, but you are trying to not set that somehow?
  • Loading branch information
forus committed Jun 19, 2024
1 parent ab51a4b commit 96acec5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public GeneticAlterationIncrementalImporter(
List<Integer> fileOrderedSampleList
) throws DaoException {

super.geneticProfileId = geneticProfileId;
this.geneticProfileId = geneticProfileId;
this.geneticAlterationMap = daoGeneticAlteration.getGeneticAlterationMapForEntityIds(geneticProfileId, null);
this.fileOrderedSampleList = fileOrderedSampleList;

Expand All @@ -39,11 +39,11 @@ public GeneticAlterationIncrementalImporter(
}
});
// add all new sample ids at the end
super.orderedSampleList = new ArrayList<>(savedOrderedSampleList);
this.orderedSampleList = new ArrayList<>(savedOrderedSampleList);
List<Integer> newSampleIds = this.fileOrderedSampleList.stream().filter(sampleId -> !savedOrderedSampleList.contains(sampleId)).toList();
super.orderedSampleList.addAll(newSampleIds);
this.orderedSampleList.addAll(newSampleIds);
DaoGeneticProfileSamples.deleteAllSamplesInGeneticProfile(this.geneticProfileId);
super.storeOrderedSampleList();
this.storeOrderedSampleList();
daoGeneticAlteration.deleteAllRecordsInGeneticProfile(this.geneticProfileId);
}

Expand Down

0 comments on commit 96acec5

Please sign in to comment.