mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Addressed review comments and fixed a bug
This commit is contained in:
parent
84fb527722
commit
02c7f63656
@ -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));
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user