From a87bdf88528c84ba54a69128f4987d94938f79ce Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 2 Aug 2019 11:33:28 -0400 Subject: [PATCH] 4595 include bundle messages for two additional messages that may be displayed --- .../centralrepository/datamodel/Bundle.properties-MERGED | 1 + .../datamodel/CorrelationAttributeInstance.java | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/Bundle.properties-MERGED index 07e9e34bcf..c94c442588 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/Bundle.properties-MERGED @@ -7,6 +7,7 @@ AbstractSqlEamDb.cannotUpgrage.message=Currently selected database platform "{0} AbstractSqlEamDb.failedToReadMajorVersion.message=Failed to read schema version for Central Repository. AbstractSqlEamDb.failedToReadMinorVersion.message=Failed to read schema minor version for Central Repository. AbstractSqlEamDb.upgradeSchema.incompatible=The selected Central Repository is not compatible with the current version of the application, please upgrade the application if you wish to use this Central Repository. +CorrelationAttributeInstance.invalidName.message=Invalid database table name. Name must start with a lowercase letter and can only contain lowercase letters, numbers, and '_'. CorrelationAttributeInstance.nullName.message=Database name is null. CorrelationType.DOMAIN.displayName=Domains CorrelationType.EMAIL.displayName=Email Addresses diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeInstance.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeInstance.java index a67148e771..efc8d13de2 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeInstance.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeInstance.java @@ -276,10 +276,11 @@ public class CorrelationAttributeInstance implements Serializable { * @param supported Is this Type currently supported * @param enabled Is this Type currently enabled. */ - @Messages({"CorrelationAttributeInstance.nullName.message=Database name is null."}) + @Messages({"CorrelationAttributeInstance.nullName.message=Database name is null.", + "CorrelationAttributeInstance.invalidName.message=Invalid database table name. Name must start with a lowercase letter and can only contain lowercase letters, numbers, and '_'."}) public Type(int typeId, String displayName, String dbTableName, Boolean supported, Boolean enabled) throws EamDbException { if (dbTableName == null) { - throw new EamDbException("dbTableName is null"); + throw new EamDbException(Bundle.CorrelationAttributeInstance_nullName_message()); } this.typeId = typeId; this.displayName = displayName; @@ -287,7 +288,7 @@ public class CorrelationAttributeInstance implements Serializable { this.supported = supported; this.enabled = enabled; if (!Pattern.matches(DB_NAMES_REGEX, dbTableName)) { - throw new EamDbException("Invalid database table name. Name must start with a lowercase letter and can only contain lowercase letters, numbers, and '_'."); // NON-NLS + throw new EamDbException(Bundle.CorrelationAttributeInstance_nullName_message()); // NON-NLS } }