Open kismeter opened 6 years ago
Thank you for this example. Now I'm working exactly on this issue in finally extract procedure, but still without success. But in latest master branch I made commit which skips finally block extraction if errors occurs and decompiled code looks like this:
public int getContactCount() {
Cursor cursor = null;
try {
cursor = mContext.getContentResolver().query(Contacts.CONTENT_URI, ContactsDictionaryConstants.PROJECTION_ID_ONLY, null, null, null);
if (cursor == null) {
if (cursor != null) {
cursor.close();
}
return 0;
}
int count = cursor.getCount();
if (cursor == null) {
return count;
}
cursor.close();
return count;
} catch (SQLiteException e) {
Log.e(TAG, "SQLiteException in the remote Contacts process.", e);
if (cursor != null) {
cursor.close();
}
return 0;
} catch (Throwable th) {
if (cursor != null) {
cursor.close();
}
throw th;
}
}
It is not compilable, but almost correct and better than error.
checked for some other finally related code, the finally block will decompiled as Throwable.
## The actually source code is below:
## when using jadx to decompile met the exception: