diff --git a/bindings/java/src/org/sleuthkit/datamodel/AddDataSourceCallbacks.java b/bindings/java/src/org/sleuthkit/datamodel/AddDataSourceCallbacks.java index 2e5ee97dc7d1090fcd1963cd45d2aba474730f7c..ac4912ad33434d58ee146ba4ff1479730d5c47d0 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/AddDataSourceCallbacks.java +++ b/bindings/java/src/org/sleuthkit/datamodel/AddDataSourceCallbacks.java @@ -24,13 +24,6 @@ * Provides callbacks at key points during the process of adding a data source to a case database. */ public interface AddDataSourceCallbacks { - /** - * Call when the data source has been completely added to the case database. - * - * @param dataSourceObjectId The object ID of the new data source - */ - void onDataSourceAdded(long dataSourceObjectId); - /** * Call to add a set of file object IDs that have been added to the database. * diff --git a/bindings/java/src/org/sleuthkit/datamodel/DefaultAddDataSourceCallbacks.java b/bindings/java/src/org/sleuthkit/datamodel/DefaultAddDataSourceCallbacks.java index 920f6079dcb79813f1faaacbdd30eb40988441ac..db378ae750103d5f4b08f0f389a6fef766cd8f62 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/DefaultAddDataSourceCallbacks.java +++ b/bindings/java/src/org/sleuthkit/datamodel/DefaultAddDataSourceCallbacks.java @@ -24,15 +24,8 @@ * Do-nothing version of AddDataSourceCallbacks */ public class DefaultAddDataSourceCallbacks implements AddDataSourceCallbacks { - - @Override - public void onDataSourceAdded(long dataSourceObjectId) { - // Do nothing - } - - @Override - public void onFilesAdded(List<Long> fileObjectIds) { - // Do nothing - } - + @Override + public void onFilesAdded(List<Long> fileObjectIds) { + // Do nothing + } } diff --git a/bindings/java/src/org/sleuthkit/datamodel/JniDbHelper.java b/bindings/java/src/org/sleuthkit/datamodel/JniDbHelper.java index 8c6c1d545bf191500fcf022558d8af95c3e2e502..95df24bf8c5fbc19fca86e9eaa08bfb88206d64c 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/JniDbHelper.java +++ b/bindings/java/src/org/sleuthkit/datamodel/JniDbHelper.java @@ -107,6 +107,8 @@ void finish() { /** * Add a new image to the database. * Intended to be called from the native code during the add image process. + * Will not be called if the image was added to the database prior to starting + * the add image process. * * @param type Type of image. * @param ssize Sector size. @@ -131,14 +133,6 @@ long addImageInfo(int type, long ssize, String timezone, caseDb.addImageNameJNI(objId, paths[i], i, trans); } commitTransaction(); - - try { - addDataSourceCallbacks.onDataSourceAdded(objId); - } catch (Exception ex) { - // Exception firewall - we do not want to return to the native code without - // passing it the data source ID - logger.log(Level.SEVERE, "Unexpected error from data source added callback", ex); - } return objId; } catch (TskCoreException ex) { logger.log(Level.SEVERE, "Error adding image to the database", ex);