Addressed review comments and fixed a bug

This commit is contained in:
U-BASIS\dsmyda 2019-12-16 11:28:57 -05:00
parent 84fb527722
commit 02c7f63656
2 changed files with 6 additions and 6 deletions

View File

@ -89,7 +89,7 @@ final class XRYDeviceGenInfoFileParser extends AbstractSingleEntityParser {
@Override
void makeArtifact(List<XRYKeyValuePair> keyValuePairs, Content parent) throws TskCoreException {
List<BlackboardAttribute> attributes = new ArrayList<>();
for(int i = 0; i < keyValuePairs.size(); i++) {
for(int i = 0; i < keyValuePairs.size(); i+=2) {
Optional<BlackboardAttribute> attribute;
if(i + 1 == keyValuePairs.size()) {
attribute = getBlackboardAttribute(keyValuePairs.get(i));

View File

@ -35,7 +35,7 @@ class XRYKeyValuePair {
private final String value;
private final String namespace;
public XRYKeyValuePair(String key, String value, String namespace) {
XRYKeyValuePair(String key, String value, String namespace) {
this.key = key.trim();
this.value = value.trim();
this.namespace = namespace.trim();
@ -49,7 +49,7 @@ class XRYKeyValuePair {
*
* @param targetKey Key name to test.
*/
public boolean hasKey(String targetKey) {
boolean hasKey(String targetKey) {
String normalizedKey = key.toLowerCase();
String normalizedTargetKey = targetKey.trim().toLowerCase();
return normalizedKey.equals(normalizedTargetKey);
@ -58,21 +58,21 @@ class XRYKeyValuePair {
/**
* Retrieves the value contained within this pair.
*/
public String getValue() {
String getValue() {
return value;
}
/**
* Retrieves the key contained within this pair.
*/
public String getKey() {
String getKey() {
return key;
}
/**
* Retrieves the namespace contained within this pair.
*/
public String getNamespace() {
String getNamespace() {
return namespace;
}