diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java index c5e5643..d89380a 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java @@ -967,8 +967,12 @@ public class BDBRepositoryBuilder extends AbstractRepositoryBuilder { private Constructor<BDBRepository> getRepositoryConstructor()
throws ClassCastException, ClassNotFoundException, NoSuchMethodException
{
- String className = getClass().getPackage().getName() + '.' +
- getBDBProduct().name() + "_Repository";
+ String packageName;
+ {
+ String thisClassName = getClass().getName();
+ packageName = thisClassName.substring(0, thisClassName.lastIndexOf('.'));
+ }
+ String className = packageName + '.' + getBDBProduct().name() + "_Repository";
Class repoClass = Class.forName(className);
if (BDBRepository.class.isAssignableFrom(repoClass)) {
return repoClass.getDeclaredConstructor
|