mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 01:07:42 +00:00
fixed issue whre modules were not being shown
This commit is contained in:
parent
10764b7ea3
commit
3a3402cc72
@ -222,27 +222,18 @@ public final class IngestModuleLoader {
|
|||||||
//netbeans uses custom class loader, otherwise can't load classes from other modules
|
//netbeans uses custom class loader, otherwise can't load classes from other modules
|
||||||
|
|
||||||
final Class<?> moduleClass = Class.forName(location, false, classLoader);
|
final Class<?> moduleClass = Class.forName(location, false, classLoader);
|
||||||
|
final Type intf = moduleClass.getGenericSuperclass();
|
||||||
final Type[] intfs = moduleClass.getGenericInterfaces();
|
|
||||||
|
|
||||||
if (intfs.length != 0 && pType != null) {
|
if (pType != null) {
|
||||||
//check if one of the module interfaces matches the pipeline type
|
|
||||||
boolean interfaceFound = false;
|
|
||||||
Class<?> moduleMeta = ((IngestModuleMapping) pType).getIngestModuleInterface();
|
Class<?> moduleMeta = ((IngestModuleMapping) pType).getIngestModuleInterface();
|
||||||
String moduleIntNameCan = moduleMeta.getCanonicalName();
|
String moduleIntNameCan = moduleMeta.getCanonicalName();
|
||||||
String[] moduleIntNameTok = moduleIntNameCan.split(" ");
|
String[] moduleIntNameTok = moduleIntNameCan.split(" ");
|
||||||
String moduleIntName = moduleIntNameTok[moduleIntNameTok.length - 1];
|
String moduleIntName = moduleIntNameTok[moduleIntNameTok.length - 1];
|
||||||
for (Type intf : intfs) {
|
|
||||||
String intNameCan = intf.toString();
|
String intNameCan = intf.toString();
|
||||||
String[] intNameCanTok = intNameCan.split(" ");
|
String[] intNameCanTok = intNameCan.split(" ");
|
||||||
String intName = intNameCanTok[intNameCanTok.length - 1];
|
String intName = intNameCanTok[intNameCanTok.length - 1];
|
||||||
if (intName.equals(moduleIntName)) {
|
if (!intName.equals(moduleIntName)) {
|
||||||
interfaceFound = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (interfaceFound == false) {
|
|
||||||
moduleErrors = true;
|
moduleErrors = true;
|
||||||
logger.log(Level.WARNING, "Module class: " + location
|
logger.log(Level.WARNING, "Module class: " + location
|
||||||
+ " does not implement correct interface: " + moduleMeta.getName()
|
+ " does not implement correct interface: " + moduleMeta.getName()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user