Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-09-14 12:54:49 -0400
committerRyan D. Brooks2010-09-14 12:54:49 -0400
commit74225843949515181df78245bfcb31147a805ba9 (patch)
tree93f998f89457d9df6ef5ace11c6127216d56bb47 /plugins/org.eclipse.osee.framework.core.datastore
parentf0f991b4f728f2e7550016da91eb2e8d2c8c750c (diff)
downloadorg.eclipse.osee-74225843949515181df78245bfcb31147a805ba9.tar.gz
org.eclipse.osee-74225843949515181df78245bfcb31147a805ba9.tar.xz
org.eclipse.osee-74225843949515181df78245bfcb31147a805ba9.zip
refactor: Directly support String.format in OseeCoreException constructors
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.datastore')
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseArtifactTypeAccessor.java8
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseBranchAccessor.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseTransactionRecordAccessor.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManager.java2
4 files changed, 8 insertions, 8 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseArtifactTypeAccessor.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseArtifactTypeAccessor.java
index a62ff79c5d..53e2ac3f5b 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseArtifactTypeAccessor.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseArtifactTypeAccessor.java
@@ -135,12 +135,12 @@ public class DatabaseArtifactTypeAccessor extends AbstractDatabaseAccessor<Artif
ArtifactType superArtType = cache.getById(superArtTypeId);
if (baseArtType == null) {
- throw new OseeInvalidInheritanceException(String.format(
- "ArtifactType [%s] which inherits from [%s] is null", artTypeId, superArtType));
+ throw new OseeInvalidInheritanceException("ArtifactType [%s] which inherits from [%s] is null",
+ artTypeId, superArtType);
}
if (superArtType == null) {
- throw new OseeInvalidInheritanceException(String.format(
- "ArtifactType [%s] which inherits from null artifact [%s]", artTypeId, superArtType));
+ throw new OseeInvalidInheritanceException("ArtifactType [%s] which inherits from null artifact [%s]",
+ artTypeId, superArtType);
}
baseToSuperTypes.put(baseArtType, superArtType);
}
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseBranchAccessor.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseBranchAccessor.java
index 46459432b7..bf74fa70cb 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseBranchAccessor.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseBranchAccessor.java
@@ -147,8 +147,8 @@ public class DatabaseBranchAccessor extends AbstractDatabaseAccessor<Branch> {
Branch childBranch = entry.getKey();
Branch parentBranch = branchCache.getById(entry.getValue());
if (parentBranch == null) {
- throw new BranchDoesNotExist(String.format("Parent Branch id:[%s] does not exist for child branch [%s]",
- entry.getValue(), entry.getKey()));
+ throw new BranchDoesNotExist("Parent Branch id:[%s] does not exist for child branch [%s]",
+ entry.getValue(), entry.getKey());
}
childBranch.setParentBranch(parentBranch);
}
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseTransactionRecordAccessor.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseTransactionRecordAccessor.java
index e3746b23c1..f391eb44dd 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseTransactionRecordAccessor.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseTransactionRecordAccessor.java
@@ -99,7 +99,7 @@ public class DatabaseTransactionRecordAccessor implements ITransactionDataAccess
toReturn = loadFirstTransactionRecord(cache, branch, SELECT_BRANCH_TRANSACTIONS, branch.getId());
break;
default:
- throw new OseeStateException(String.format("Transaction Type [%s] is not supported", transactionType));
+ throw new OseeStateException("Transaction Type [%s] is not supported", transactionType);
}
return toReturn;
}
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManager.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManager.java
index 9d7e5c75e3..1340f0cd57 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManager.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManager.java
@@ -130,7 +130,7 @@ public abstract class SqlManager {
case BOOLEAN:
return !Strings.isValid(value) ? false : Boolean.parseBoolean(value);
default:
- throw new OseeDataStoreException("unexpected column type: " + columnType);
+ throw new OseeDataStoreException("unexpected column type [%s]", columnType);
}
}

Back to the top