Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-11-03 13:30:14 -0400
committerRyan D. Brooks2010-11-03 13:30:14 -0400
commit0f277b143f912cfc3e3017b59a21965dec4f360e (patch)
tree8388cbfadeb380ecf27fe6d82fe0e9bb7b6fd054 /plugins/org.eclipse.osee.framework.database
parent939a9008f24991bb25443ed508e1cbbe0fa640d3 (diff)
downloadorg.eclipse.osee-0f277b143f912cfc3e3017b59a21965dec4f360e.tar.gz
org.eclipse.osee-0f277b143f912cfc3e3017b59a21965dec4f360e.tar.xz
org.eclipse.osee-0f277b143f912cfc3e3017b59a21965dec4f360e.zip
refactor: Cleanup warnings
Diffstat (limited to 'plugins/org.eclipse.osee.framework.database')
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java8
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DatabaseInfoManager.java3
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DbTransaction.java2
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IOseeSequence.java3
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/Activator.java3
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeDatabaseServiceImpl.java7
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeSequenceImpl.java3
7 files changed, 15 insertions, 14 deletions
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java
index b7f9b61ddd..f66c4b83c1 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.framework.database.core;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.core.operation.AbstractOperation;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
@@ -28,7 +27,7 @@ public abstract class AbstractDbTxOperation extends AbstractOperation {
this.databaseService = databaseService;
}
- protected IOseeDatabaseService getDatabaseService() throws OseeDataStoreException {
+ protected IOseeDatabaseService getDatabaseService() {
return databaseService;
}
@@ -41,15 +40,18 @@ public abstract class AbstractDbTxOperation extends AbstractOperation {
protected abstract void doTxWork(IProgressMonitor monitor, OseeConnection connection) throws OseeCoreException;
protected void handleTxException(IProgressMonitor monitor, Exception ex) {
+ // default implementation
}
+ @SuppressWarnings("unused")
protected void handleTxFinally(IProgressMonitor monitor) throws OseeCoreException {
+ // default implementation
}
private final class Transaction extends DbTransaction {
private final IProgressMonitor monitor;
- private Transaction(IProgressMonitor monitor) throws OseeCoreException {
+ private Transaction(IProgressMonitor monitor) {
super();
this.monitor = monitor;
}
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DatabaseInfoManager.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DatabaseInfoManager.java
index 187dce207a..47a38538d4 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DatabaseInfoManager.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DatabaseInfoManager.java
@@ -23,9 +23,10 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
-public class DatabaseInfoManager {
+public final class DatabaseInfoManager {
private DatabaseInfoManager() {
+ //Utility Class
}
public static IDatabaseInfo getDefault() throws OseeDataStoreException {
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DbTransaction.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DbTransaction.java
index af8ebec682..3f540fb852 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DbTransaction.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DbTransaction.java
@@ -48,6 +48,7 @@ public abstract class DbTransaction {
* <b>Override to handle transaction exception</b>
*/
protected void handleTxException(Exception ex) {
+ // override to add additional code to exception handling
}
/**
@@ -55,6 +56,7 @@ public abstract class DbTransaction {
* the end of the transaction, regardless of exceptions. <br/>
* <b>Override to add additional code to finally block</b>
*/
+ @SuppressWarnings("unused")
protected void handleTxFinally() throws OseeCoreException {
// override to add additional code to finally
}
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IOseeSequence.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IOseeSequence.java
index 71a8088d95..2348eb049a 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IOseeSequence.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IOseeSequence.java
@@ -11,7 +11,6 @@
package org.eclipse.osee.framework.database.core;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
/**
* @author Roberto E. Escobar
@@ -69,5 +68,5 @@ public interface IOseeSequence {
int getNextImportMappedIndexId() throws OseeCoreException;
- void clear() throws OseeDataStoreException;
+ void clear();
}
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/Activator.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/Activator.java
index 388d2dfee9..0029b142d7 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/Activator.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/Activator.java
@@ -31,9 +31,6 @@ public class Activator implements BundleActivator, IOseeDatabaseServiceProvider
private ServiceTracker dbTracker;
private DatabaseInfoProvider databaseInfoProvider;
- public Activator() {
- }
-
@Override
public void start(BundleContext bundleContext) throws Exception {
instance = this;
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeDatabaseServiceImpl.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeDatabaseServiceImpl.java
index 69e06d75ee..9b91f2a7d9 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeDatabaseServiceImpl.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeDatabaseServiceImpl.java
@@ -57,7 +57,7 @@ public class OseeDatabaseServiceImpl implements IOseeDatabaseService {
}
@Override
- public IOseeSequence getSequence() throws OseeDataStoreException {
+ public IOseeSequence getSequence() {
return oseeSequence;
}
@@ -101,6 +101,7 @@ public class OseeDatabaseServiceImpl implements IOseeDatabaseService {
return new OseeStatementImpl(getDefaultConnectionPool(), (OseeConnectionImpl) connection, autoClose);
}
+ @SuppressWarnings("unused")
@Override
public IOseeStatement getStatement(int resultSetType, int resultSetConcurrency) throws OseeDataStoreException {
throw new UnsupportedOperationException("This needs to be implemented");
@@ -159,8 +160,8 @@ public class OseeDatabaseServiceImpl implements IOseeDatabaseService {
if ((exlist = ex.getNextException()) != null) {
OseeLog.log(Activator.class, Level.SEVERE, "This is the nested exception", exlist);
}
- throw new OseeCoreException(
- "sql update failed: \n%s\n%s", query, StatementUtil.getBatchErrorMessage(dataList), ex);
+ throw new OseeCoreException("sql update failed: \n%s\n%s", query,
+ StatementUtil.getBatchErrorMessage(dataList), ex);
} finally {
StatementUtil.close(preparedStatement);
}
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeSequenceImpl.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeSequenceImpl.java
index 7709bee7d9..bf88069cf2 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeSequenceImpl.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeSequenceImpl.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.framework.database.internal.core;
import java.util.HashMap;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.IOseeSequence;
import org.eclipse.osee.framework.database.core.OseeConnection;
@@ -50,7 +49,7 @@ public class OseeSequenceImpl implements IOseeSequence {
}
@Override
- public synchronized void clear() throws OseeDataStoreException {
+ public synchronized void clear() {
sequences.clear();
}

Back to the top