mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 09:17:42 +00:00
Address review comments
This commit is contained in:
parent
22a04601c3
commit
15e296145d
@ -83,7 +83,7 @@ public class ApplicationContentViewer extends javax.swing.JPanel implements Data
|
|||||||
* mimetype
|
* mimetype
|
||||||
*/
|
*/
|
||||||
private ContentViewer getSupportingViewer(String mimeType) {
|
private ContentViewer getSupportingViewer(String mimeType) {
|
||||||
return mimeTypeToViewerMap.containsKey(mimeType) ? mimeTypeToViewerMap.get(mimeType) : null;
|
return mimeTypeToViewerMap.get(mimeType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -104,6 +104,9 @@ public class ApplicationContentViewer extends javax.swing.JPanel implements Data
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setNode(Node selectedNode) {
|
public void setNode(Node selectedNode) {
|
||||||
|
|
||||||
|
resetComponent();
|
||||||
|
|
||||||
if (selectedNode == null) {
|
if (selectedNode == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -208,16 +211,9 @@ public class ApplicationContentViewer extends javax.swing.JPanel implements Data
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int isPreferred(Node node) {
|
public int isPreferred(Node node) {
|
||||||
if (node == null) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
AbstractFile file = node.getLookup().lookup(AbstractFile.class);
|
AbstractFile file = node.getLookup().lookup(AbstractFile.class);
|
||||||
if (file == null) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
String mimeType = file.getMIMEType();
|
String mimeType = file.getMIMEType();
|
||||||
|
|
||||||
if (Strings.isNullOrEmpty(mimeType)) {
|
if (Strings.isNullOrEmpty(mimeType)) {
|
||||||
LOGGER.log(Level.INFO, "Mimetype not known for file: {0}", file.getName()); //NON-NLS
|
LOGGER.log(Level.INFO, "Mimetype not known for file: {0}", file.getName()); //NON-NLS
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user