From 2a51276fee1f6e624f6883ca34fe071dad03437e Mon Sep 17 00:00:00 2001 From: Karl Mortensen <kmortensen@basistech.com> Date: Tue, 28 Oct 2014 09:16:51 -0400 Subject: [PATCH] code review comments included --- .../datamodel/CarvedFileContainer.java | 18 ++++++++++++++++++ .../org/sleuthkit/datamodel/SleuthkitCase.java | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/bindings/java/src/org/sleuthkit/datamodel/CarvedFileContainer.java b/bindings/java/src/org/sleuthkit/datamodel/CarvedFileContainer.java index 915ecd60a..e40c518a5 100755 --- a/bindings/java/src/org/sleuthkit/datamodel/CarvedFileContainer.java +++ b/bindings/java/src/org/sleuthkit/datamodel/CarvedFileContainer.java @@ -1,3 +1,21 @@ +/* + * Sleuth Kit Data Model + * + * Copyright 2012-2014 Basis Technology Corp. + * Contact: carrier <at> sleuthkit <dot> org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.sleuthkit.datamodel; import java.util.List; diff --git a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java index c1bf2ecd5..965491cec 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java +++ b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java @@ -2728,7 +2728,7 @@ public LayoutFile addCarvedFile(String carvedFileName, long carvedFileSize, long * @throws org.sleuthkit.datamodel.TskCoreException */ public List<LayoutFile> addCarvedFiles(List<CarvedFileContainer> filesToAdd) throws TskCoreException { - if (filesToAdd != null) { + if (filesToAdd != null && filesToAdd.isEmpty() == false) { CaseDbTransaction localTrans = beginTransaction(); CaseDbConnection connection = localTrans.getConnection(); acquireExclusiveLock(); -- GitLab