Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2011-08-03 19:40:17 +0000
committerRyan D. Brooks2011-08-03 19:40:17 +0000
commit0783b58cce6c815a3bda232b3ff703e33ff74253 (patch)
tree1582491b8d0b763b21419aa3a41b876bc76bcde0 /plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee
parent3ae4b4e26658854aac1204d7522c60f64c61799d (diff)
downloadorg.eclipse.osee-0783b58cce6c815a3bda232b3ff703e33ff74253.tar.gz
org.eclipse.osee-0783b58cce6c815a3bda232b3ff703e33ff74253.tar.xz
org.eclipse.osee-0783b58cce6c815a3bda232b3ff703e33ff74253.zip
refactor: Remove superfluous null checks of IOseeStatement
Diffstat (limited to 'plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee')
-rw-r--r--plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/GraphLoader.java14
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/GraphLoader.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/GraphLoader.java
index 7ed0a7ea3dc..e535f3854fb 100644
--- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/GraphLoader.java
+++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/GraphLoader.java
@@ -106,11 +106,8 @@ public class GraphLoader {
if (source != null) {
connect(source, txModel);
} else {
- OseeLog.logf(
- Activator.class,
- Level.SEVERE,
- "Invalid parent transaction id of [%s] for branch [%s]", parentTxId,
- branchModel.getBranch());
+ OseeLog.logf(Activator.class, Level.SEVERE,
+ "Invalid parent transaction id of [%s] for branch [%s]", parentTxId, branchModel.getBranch());
// StubBranchModel stubModel = graphCache.getStubBranchModel();
// TxModel stubTxModel = stubModel.addTx(parentTxId);
// graphCache.addTxModel(stubTxModel);
@@ -145,9 +142,8 @@ public class GraphLoader {
private static List<TxData> getTxData(int queryId) throws OseeCoreException {
List<TxData> txDatas = new ArrayList<TxData>();
- IOseeStatement chStmt = null;
+ IOseeStatement chStmt = ConnectionHandler.getStatement();
try {
- chStmt = ConnectionHandler.getStatement();
chStmt.runPreparedQuery(GET_TRANSACTION_DATA, queryId);
while (chStmt.next()) {
Branch branch = BranchManager.getBranch(chStmt.getInt("branch_id"));
@@ -158,9 +154,7 @@ public class GraphLoader {
txDatas.add(txData);
}
} finally {
- if (chStmt != null) {
- chStmt.close();
- }
+ chStmt.close();
}
return txDatas;
}

Back to the top