3956 change is supported method for hex and string viewer to lookup content using DataContentViewerUtility

This commit is contained in:
William Schaefer 2019-03-15 16:57:00 -04:00
parent 856647f08f
commit 2dc4351c21
2 changed files with 5 additions and 9 deletions

View File

@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011-2018 Basis Technology Corp.
* Copyright 2011-2019 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -605,12 +605,8 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
if (node == null) {
return false;
}
Content content = node.getLookup().lookup(Content.class);
if (content != null && content.getSize() > 0) {
return true;
}
return false;
Content content = DataContentViewerUtility.getDefaultContent(node);
return content != null && content.getSize() > 0;
}
@Override

View File

@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011-2018 Basis Technology Corp.
* Copyright 2011-2019 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -498,7 +498,7 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
if (node == null) {
return false;
}
Content content = node.getLookup().lookup(Content.class);
Content content = DataContentViewerUtility.getDefaultContent(node);
return (content != null && content.getSize() > 0);
}