Skip to content

Commit

Permalink
Initialise transactionTemplate if needed (cBioPortal#55)
Browse files Browse the repository at this point in the history
JdbcUtil.getTransactionTemplate() returns
null causing null pointer exception.
  • Loading branch information
forus authored Jul 22, 2024
1 parent 2929643 commit 3bef9a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/mskcc/cbio/portal/dao/JdbcUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ public static void setDataSource(DataSource value) {
}

public static TransactionTemplate getTransactionTemplate() {
if (transactionTemplate == null) {
getDataSource();
}
return transactionTemplate;
}

Expand Down

0 comments on commit 3bef9a1

Please sign in to comment.