5060 fix some netbeans warnings

This commit is contained in:
William Schaefer 2019-05-24 14:12:31 -04:00
parent 41209cb053
commit b17b460e6a
2 changed files with 18 additions and 13 deletions

View File

@ -2,7 +2,7 @@
* *
* Autopsy Forensic Browser * Autopsy Forensic Browser
* *
* Copyright 2018 Basis Technology Corp. * Copyright 2019 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
@ -33,12 +33,6 @@ final public class CorrelationAttributeNormalizer {
//common seperators that may be removed for normalizing //common seperators that may be removed for normalizing
private static final String SEPERATORS_REGEX = "[\\s-:]"; private static final String SEPERATORS_REGEX = "[\\s-:]";
/**
* This is a utility class - no need for constructing or subclassing, etc...
*/
private CorrelationAttributeNormalizer() {
}
/** /**
* Normalize the data. Converts text to lower case, and ensures that the * Normalize the data. Converts text to lower case, and ensures that the
* data is a valid string of the format expected given the attributeType. * data is a valid string of the format expected given the attributeType.
@ -54,7 +48,7 @@ final public class CorrelationAttributeNormalizer {
throw new CorrelationAttributeNormalizationException("Attribute type was null."); throw new CorrelationAttributeNormalizationException("Attribute type was null.");
} }
if (data == null) { if (data == null) {
throw new CorrelationAttributeNormalizationException("Correlation attribute value was null."); throw new CorrelationAttributeNormalizationException("Correlation value was null.");
} }
String trimmedData = data.trim(); String trimmedData = data.trim();
@ -310,4 +304,11 @@ final public class CorrelationAttributeNormalizer {
throw new CorrelationAttributeNormalizationException("Data provided was not a valid Imsi. : " + data); throw new CorrelationAttributeNormalizationException("Data provided was not a valid Imsi. : " + data);
} }
} }
/**
* This is a utility class - no need for constructing or subclassing, etc...
*/
private CorrelationAttributeNormalizer() {
//Empty constructor
}
} }

View File

@ -1,7 +1,7 @@
/* /*
* Central Repository * Central Repository
* *
* Copyright 2015-2018 Basis Technology Corp. * Copyright 2015-2019 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
@ -36,15 +36,12 @@ import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.TskData; import org.sleuthkit.datamodel.TskData;
/** /**
* * Utility class for correlation attributes in the central repository
*/ */
public class EamArtifactUtil { public class EamArtifactUtil {
private static final Logger logger = Logger.getLogger(EamArtifactUtil.class.getName()); private static final Logger logger = Logger.getLogger(EamArtifactUtil.class.getName());
public EamArtifactUtil() {
}
@Messages({"EamArtifactUtil.emailaddresses.text=Email Addresses"}) @Messages({"EamArtifactUtil.emailaddresses.text=Email Addresses"})
public static String getEmailAddressAttrString() { public static String getEmailAddressAttrString() {
return Bundle.EamArtifactUtil_emailaddresses_text(); return Bundle.EamArtifactUtil_emailaddresses_text();
@ -373,4 +370,11 @@ public class EamArtifactUtil {
return false; return false;
} }
} }
/**
* Constructs a new EamArtifactUtil
*/
private EamArtifactUtil() {
//empty constructor
}
} }