From be38682ae262f8b84eb86740b624e59ebfeae5d6 Mon Sep 17 00:00:00 2001 From: Ann Priestman <apriestman@basistech.com> Date: Fri, 15 Nov 2019 13:56:46 -0500 Subject: [PATCH] Reduce scope of some methods. Change getImgInfoNat name. --- bindings/java/jni/dataModel_SleuthkitJNI.cpp | 2 +- bindings/java/jni/dataModel_SleuthkitJNI.h | 4 ++-- .../src/org/sleuthkit/datamodel/AbstractContent.java | 6 +++--- .../java/src/org/sleuthkit/datamodel/SleuthkitJNI.java | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bindings/java/jni/dataModel_SleuthkitJNI.cpp b/bindings/java/jni/dataModel_SleuthkitJNI.cpp index 25ea35479..daf05a52b 100644 --- a/bindings/java/jni/dataModel_SleuthkitJNI.cpp +++ b/bindings/java/jni/dataModel_SleuthkitJNI.cpp @@ -1459,7 +1459,7 @@ Java_org_sleuthkit_datamodel_SleuthkitJNI_openPoolNat(JNIEnv * env, * @param a_pool_info the pointer to the pool object * @param pool_block the block number of the pool volume */ -JNIEXPORT jlong JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_getImgInfoNat +JNIEXPORT jlong JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_getImgInfoForPoolNat (JNIEnv * env, jclass obj, jlong a_pool_info, jlong pool_block) { TSK_POOL_INFO *pool_info = castPoolInfo(env, a_pool_info); diff --git a/bindings/java/jni/dataModel_SleuthkitJNI.h b/bindings/java/jni/dataModel_SleuthkitJNI.h index 500aa6bed..a724200b0 100644 --- a/bindings/java/jni/dataModel_SleuthkitJNI.h +++ b/bindings/java/jni/dataModel_SleuthkitJNI.h @@ -297,10 +297,10 @@ JNIEXPORT jlong JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_openPoolNat /* * Class: org_sleuthkit_datamodel_SleuthkitJNI - * Method: getImgInfoNat + * Method: getImgInfoForPoolNat * Signature: (JJ)J */ -JNIEXPORT jlong JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_getImgInfoNat +JNIEXPORT jlong JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_getImgInfoForPoolNat (JNIEnv *, jclass, jlong, jlong); /* diff --git a/bindings/java/src/org/sleuthkit/datamodel/AbstractContent.java b/bindings/java/src/org/sleuthkit/datamodel/AbstractContent.java index a511934cd..63e43f05e 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/AbstractContent.java +++ b/bindings/java/src/org/sleuthkit/datamodel/AbstractContent.java @@ -201,7 +201,7 @@ public Content getDataSource() throws TskCoreException { * * @throws TskCoreException */ - public boolean isPoolContent() throws TskCoreException { + boolean isPoolContent() throws TskCoreException { Content myParent = getParent(); if (myParent == null) { return false; @@ -225,7 +225,7 @@ public boolean isPoolContent() throws TskCoreException { * * @throws TskCoreException */ - public Volume getPoolVolume() throws TskCoreException { + Volume getPoolVolume() throws TskCoreException { Content myParent = getParent(); if (myParent == null) { return null; @@ -256,7 +256,7 @@ public Volume getPoolVolume() throws TskCoreException { * * @throws TskCoreException */ - public Pool getPool() throws TskCoreException { + Pool getPool() throws TskCoreException { Content myParent = getParent(); if (myParent == null) { return null; diff --git a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java index 2f91626b7..0c0589bb1 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java +++ b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java @@ -834,7 +834,7 @@ public static long openVsPart(long vsHandle, long volId) throws TskCoreException * @throws TskCoreException exception thrown if critical error occurs within * TSK */ - public static long openPool(long imgHandle, long offset, SleuthkitCase skCase) throws TskCoreException { + static long openPool(long imgHandle, long offset, SleuthkitCase skCase) throws TskCoreException { getTSKReadLock(); try { if(! imgHandleIsValid(imgHandle)) { @@ -921,7 +921,7 @@ public static long openFs(long imgHandle, long fsOffset, SleuthkitCase skCase) t * @throws TskCoreException exception thrown if critical error occurs within * TSK */ - public static long openFsPool(long imgHandle, long fsOffset, long poolHandle, long poolBlock, SleuthkitCase skCase) throws TskCoreException { + static long openFsPool(long imgHandle, long fsOffset, long poolHandle, long poolBlock, SleuthkitCase skCase) throws TskCoreException { getTSKReadLock(); try { long fsHandle; @@ -941,7 +941,7 @@ public static long openFsPool(long imgHandle, long fsOffset, long poolHandle, lo //return cached fsHandle = imgOffSetToFsHandle.get(poolBlock); } else { - long poolImgHandle = getImgInfoNat(poolHandle, poolBlock); + long poolImgHandle = getImgInfoForPoolNat(poolHandle, poolBlock); HandleCache.getCaseHandles(caseDbPointer).poolImgCache.add(poolImgHandle); fsHandle = openFsNat(poolImgHandle, fsOffset); //cache it @@ -1087,7 +1087,7 @@ public static int readVs(long vsHandle, byte[] readBuffer, long offset, long len * * @throws TskCoreException */ - public static int readPool(long poolHandle, byte[] readBuffer, long offset, long len) throws TskCoreException { + static int readPool(long poolHandle, byte[] readBuffer, long offset, long len) throws TskCoreException { getTSKReadLock(); try { return readPoolNat(poolHandle, readBuffer, offset, len); @@ -1793,7 +1793,7 @@ public static long openFile(long fsHandle, long fileId, TSK_FS_ATTR_TYPE_ENUM at private static native long openPoolNat(long imgHandle, long offset) throws TskCoreException; - private static native long getImgInfoNat(long poolHandle, long poolOffset) throws TskCoreException; + private static native long getImgInfoForPoolNat(long poolHandle, long poolOffset) throws TskCoreException; private static native long openFsNat(long imgHandle, long fsId) throws TskCoreException; -- GitLab