diff --git a/core/src/main/java/org/mskcc/cbio/oncokb/cache/CacheFetcher.java b/core/src/main/java/org/mskcc/cbio/oncokb/cache/CacheFetcher.java index fe7c89c7a..62b4a2248 100644 --- a/core/src/main/java/org/mskcc/cbio/oncokb/cache/CacheFetcher.java +++ b/core/src/main/java/org/mskcc/cbio/oncokb/cache/CacheFetcher.java @@ -122,11 +122,7 @@ public Map> getCanonicalEnsemblGenesByChromosome(Refere continue; } String chromosome = ensemblGene.getChromosome(); - - if (!chromosomeEnsemblGenesMap.containsKey(chromosome)) { - chromosomeEnsemblGenesMap.put(chromosome, new HashSet<>()); - } - + chromosomeEnsemblGenesMap.putIfAbsent(chromosome, new HashSet<>()); chromosomeEnsemblGenesMap.get(chromosome).add(ensemblGene); } }