Skip to content

Commit fcb703b

Browse files
authored
Merge pull request #24 from cBioPortal/Fix-Core-Dep-Issues-And-CnaUtils
Fix core dep issues and cna utils
2 parents aec1dce + fdda8ba commit fcb703b

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<groupId>org.mskcc.cbio</groupId>
1111
<artifactId>core</artifactId>
12-
<version>1.0.7-SNAPSHOT</version>
12+
<version>1.0.7</version>
1313

1414
<name>Portal Core</name>
1515
<description>Core libraries shared among other modules</description>

src/main/java/org/mskcc/cbio/portal/util/CnaUtil.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,18 @@ public static void storeCnaEvents(
5353
if (!CNA.AMP.equals(cnaEvent.getAlteration()) && !CNA.HOMDEL.equals(cnaEvent.getAlteration())) {
5454
continue;
5555
}
56-
57-
CnaEvent.Event event = cnaEvent.getEvent();
58-
if (existingCnaEvents.contains(event)) {
59-
cnaEvent.setEventId(event.getEventId());
56+
57+
// Revert PR https://github.com/cBioPortal/cbioportal-core/pull/1 breaks importer
58+
Optional<CnaEvent.Event> existingCnaEvent = existingCnaEvents
59+
.stream()
60+
.filter(e -> e.equals(cnaEvent.getEvent()))
61+
.findFirst();
62+
if (existingCnaEvent.isPresent()) {
63+
cnaEvent.setEventId(existingCnaEvent.get().getEventId());
6064
DaoCnaEvent.addCaseCnaEvent(cnaEvent, false);
6165
} else {
6266
DaoCnaEvent.addCaseCnaEvent(cnaEvent, true);
63-
existingCnaEvents.add(event);
67+
existingCnaEvents.add(cnaEvent.getEvent());
6468
}
6569
}
6670
}

src/main/resources/applicationContext-persistenceConnections.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
<property name="basePackage" value="org.mskcc.cbio.portal.persistence,org.cbioportal.persistence.mybatis" />
2828
</bean>
2929

30+
31+
<bean id="cacheMapUtil" class="org.cbioportal.persistence.cachemaputil.InactiveCacheMapUtil" />
32+
3033
<!-- enable component scanning (beware that this does not enable mapper scanning!) -->
3134
<context:component-scan base-package="org.mskcc.cbio.portal.util"/> <!-- - mainly to inject into global properties -->
3235
<context:component-scan base-package="org.cbioportal.persistence" />
@@ -35,6 +38,7 @@
3538
<!-- enable autowire -->
3639
<context:annotation-config />
3740

41+
3842
<!-- enable transaction demarcation with annotations -->
3943
<tx:annotation-driven />
4044

0 commit comments

Comments
 (0)