diff --git a/pom.xml b/pom.xml index 7e151047..3b030136 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.mskcc.cbio core - 1.0.7-SNAPSHOT + 1.0.7 Portal Core Core libraries shared among other modules diff --git a/src/main/java/org/mskcc/cbio/portal/util/CnaUtil.java b/src/main/java/org/mskcc/cbio/portal/util/CnaUtil.java index f43e13bb..3cc6fd71 100644 --- a/src/main/java/org/mskcc/cbio/portal/util/CnaUtil.java +++ b/src/main/java/org/mskcc/cbio/portal/util/CnaUtil.java @@ -53,14 +53,18 @@ public static void storeCnaEvents( if (!CNA.AMP.equals(cnaEvent.getAlteration()) && !CNA.HOMDEL.equals(cnaEvent.getAlteration())) { continue; } - - CnaEvent.Event event = cnaEvent.getEvent(); - if (existingCnaEvents.contains(event)) { - cnaEvent.setEventId(event.getEventId()); + + // Revert PR https://github.com/cBioPortal/cbioportal-core/pull/1 breaks importer + Optional existingCnaEvent = existingCnaEvents + .stream() + .filter(e -> e.equals(cnaEvent.getEvent())) + .findFirst(); + if (existingCnaEvent.isPresent()) { + cnaEvent.setEventId(existingCnaEvent.get().getEventId()); DaoCnaEvent.addCaseCnaEvent(cnaEvent, false); } else { DaoCnaEvent.addCaseCnaEvent(cnaEvent, true); - existingCnaEvents.add(event); + existingCnaEvents.add(cnaEvent.getEvent()); } } } diff --git a/src/main/resources/applicationContext-persistenceConnections.xml b/src/main/resources/applicationContext-persistenceConnections.xml index 8cacc7f7..91b9737a 100644 --- a/src/main/resources/applicationContext-persistenceConnections.xml +++ b/src/main/resources/applicationContext-persistenceConnections.xml @@ -27,6 +27,9 @@ + + + @@ -35,6 +38,7 @@ +