原创

FaceRadar Autopsy 4.21.0 Netbeans プラットフォーム モジュールの非推奨コードを更新する最良の方法

温馨提示:
本文最后更新于 2024年04月12日,已超过 48 天没有更新。若文章内的图片失效(无法正常加载),请留言反馈或直接联系我

Autopsy プラットフォームを使用する一部の廃止されたメソッドを更新する際に問題が発生します。

分析結果の下にカスタムプロパティが欲しいです!

JavaDocは扱いにくいので嫌いです。https://sleuthkit.org/sleuthkit/docs/jni-docs/4.12.1/deprecated.html

                BlackboardArtifact artifact = file.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ITEM);
                BlackboardAttribute attribute = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID(), PTDetectorIngestModuleFactory.getModuleName(), "PT Detected Faces");
                artifact.addAttribute(attribute);

                // This method is thread-safe with per ingest job reference counted
                // management of shared data.
                addToBlackboardPostCount(context.getJobId(), 1L);

                // Fire an event to notify any listeners for blackboard postings.
                ModuleDataEvent event = new ModuleDataEvent(PTDetectorIngestModuleFactory.getModuleName(), BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ITEM);
                IngestServices.getInstance().fireModuleDataEvent(event);

クリーンにしてビルドすると次のような結果が得られます。

Compiling 7 source files to C:\Users\cam30\OneDrive\Documents\NetBeansProjects\FaceRadar-master\build\classes
Ignoring source, target and bootclasspath as release has been set
C:\Users\cam30\OneDrive\Documents\NetBeansProjects\FaceRadar-master\src\com\sazquatch\faceradar\autopsy\FaceRadarFileIngestModule.java:108: warning: [deprecation] TSK_INTERESTING_FILE_HIT in ARTIFACT_TYPE has been deprecated
                BlackboardArtifact artifact = file.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT);
C:\Users\cam30\OneDrive\Documents\NetBeansProjects\FaceRadar-master\src\com\sazquatch\faceradar\autopsy\FaceRadarFileIngestModule.java:108: warning: [deprecation] newArtifact(ARTIFACT_TYPE) in AbstractContent has been deprecated
                BlackboardArtifact artifact = file.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT);
C:\Users\cam30\OneDrive\Documents\NetBeansProjects\FaceRadar-master\src\com\sazquatch\faceradar\autopsy\FaceRadarFileIngestModule.java:109: warning: [deprecation] BlackboardAttribute(int,String,String) in BlackboardAttribute has been deprecated
                BlackboardAttribute attribute = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID(), FaceRadarIngestModuleFactory.getModuleName(), "FaceRadar Detected Faces");
C:\Users\cam30\OneDrive\Documents\NetBeansProjects\FaceRadar-master\src\com\sazquatch\faceradar\autopsy\FaceRadarFileIngestModule.java:117: warning: [deprecation] TSK_INTERESTING_FILE_HIT in ARTIFACT_TYPE has been deprecated
                ModuleDataEvent event = new ModuleDataEvent(FaceRadarIngestModuleFactory.getModuleName(), BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT);
C:\Users\cam30\OneDrive\Documents\NetBeansProjects\FaceRadar-master\src\com\sazquatch\faceradar\autopsy\FaceRadarFileIngestModule.java:118: warning: [deprecation] fireModuleDataEvent(ModuleDataEvent) in IngestServices has been deprecated
                IngestServices.getInstance().fireModuleDataEvent(event);
正文到此结束
热门推荐
本文目录