private final String className;
// we do this because supposedly Log.isLoggable() always does IO
private volatile int levelCacheC = 0;
private final boolean levelCache[];
public AndroidLogBackend(String className) {
// get the last part of the class name
String simpleName = LoggerFactory.getSimpleClassName(className);
// make sure that our tag length is not too long
int length = simpleName.length();
if (length > MAX_TAG_LENGTH) {
***** simpleName = this.className.substring(length - MAX_TAG_LENGTH, length);
}
this.className = simpleName;
// find the maximum level value
int maxLevel = 0;
for (Level level : Level.values()) {
int androidLevel = levelToAndroidLevel(level);
if (androidLevel > maxLevel) {
maxLevel = androidLevel;
}
}
levelCache = new boolean[maxLevel + 1];
refreshLevelCache();
}
Above this.className in com.j256.ormlite.android.AndroidLogBackend line 60 is always null and causes a NullPointerException. Because of this, I cannot instantiate a DatabaseHelper! I'm running ormlite-android v5.4 and ormlite-core v5.4.
Above this.className in com.j256.ormlite.android.AndroidLogBackend line 60 is always null and causes a NullPointerException. Because of this, I cannot instantiate a DatabaseHelper! I'm running ormlite-android v5.4 and ormlite-core v5.4.
https://github.com/j256/ormlite-android/blob/59c1b237df2ae1819db915f9a2525b182816ed7a/src/main/java/com/j256/ormlite/android/AndroidLogBackend.java#L60