We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hey,
Example framework: https://drive.google.com/file/d/1enz1-n3rW2TBfTYqQgrxRb8uAkW4d4oa/view?usp=sharing
Jadx generates a lot of embedded blocks, but the code could be simplified. An example is in class android.apex.ApexInfo:
android.apex.ApexInfo
public final void readFromParcel(Parcel _aidl_parcel) { int _aidl_start_pos = _aidl_parcel.dataPosition(); int _aidl_parcelable_size = _aidl_parcel.readInt(); if (_aidl_parcelable_size >= 0) { try { if (_aidl_parcel.dataPosition() - _aidl_start_pos < _aidl_parcelable_size) { this.moduleName = _aidl_parcel.readString(); if (_aidl_parcel.dataPosition() - _aidl_start_pos < _aidl_parcelable_size) { this.modulePath = _aidl_parcel.readString(); if (_aidl_parcel.dataPosition() - _aidl_start_pos < _aidl_parcelable_size) { this.preinstalledModulePath = _aidl_parcel.readString(); if (_aidl_parcel.dataPosition() - _aidl_start_pos < _aidl_parcelable_size) { this.versionCode = _aidl_parcel.readLong(); if (_aidl_parcel.dataPosition() - _aidl_start_pos < _aidl_parcelable_size) { this.versionName = _aidl_parcel.readString(); if (_aidl_parcel.dataPosition() - _aidl_start_pos < _aidl_parcelable_size) { boolean z = true; this.isFactory = _aidl_parcel.readInt() != 0; if (_aidl_parcel.dataPosition() - _aidl_start_pos < _aidl_parcelable_size) { if (_aidl_parcel.readInt() == 0) { z = false; } this.isActive = z; if (_aidl_start_pos <= Integer.MAX_VALUE - _aidl_parcelable_size) { _aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size); return; } throw new BadParcelableException("Overflow in the size of parcelable"); } else if (_aidl_start_pos <= Integer.MAX_VALUE - _aidl_parcelable_size) { _aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size); } else { throw new BadParcelableException("Overflow in the size of parcelable"); } } else if (_aidl_start_pos <= Integer.MAX_VALUE - _aidl_parcelable_size) { _aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size); } else { throw new BadParcelableException("Overflow in the size of parcelable"); } } else if (_aidl_start_pos <= Integer.MAX_VALUE - _aidl_parcelable_size) { _aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size); } else { throw new BadParcelableException("Overflow in the size of parcelable"); } } else if (_aidl_start_pos <= Integer.MAX_VALUE - _aidl_parcelable_size) { _aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size); } else { throw new BadParcelableException("Overflow in the size of parcelable"); } } else if (_aidl_start_pos <= Integer.MAX_VALUE - _aidl_parcelable_size) { _aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size); } else { throw new BadParcelableException("Overflow in the size of parcelable"); } } else if (_aidl_start_pos <= Integer.MAX_VALUE - _aidl_parcelable_size) { _aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size); } else { throw new BadParcelableException("Overflow in the size of parcelable"); } } else if (_aidl_start_pos <= Integer.MAX_VALUE - _aidl_parcelable_size) { _aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size); } else { throw new BadParcelableException("Overflow in the size of parcelable"); } } catch (Throwable th) { if (_aidl_start_pos > Integer.MAX_VALUE - _aidl_parcelable_size) { throw new BadParcelableException("Overflow in the size of parcelable"); } _aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size); throw th; } } else if (_aidl_start_pos <= Integer.MAX_VALUE - _aidl_parcelable_size) { _aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size); } else { throw new BadParcelableException("Overflow in the size of parcelable"); } }
Can jadx count the number of instructions in a block and see if it can be structured better/simplier?
The text was updated successfully, but these errors were encountered:
fix: better code styling for if-else blocks (#1455)
if-else
a71b3a7
@bagipro I commit a fix, I took too many various changes, but I hope it will not bring regressions 🙂
Sorry, something went wrong.
@skylot Thanks! It works perfectly now!
No branches or pull requests
Hey,
Example framework: https://drive.google.com/file/d/1enz1-n3rW2TBfTYqQgrxRb8uAkW4d4oa/view?usp=sharing
Jadx generates a lot of embedded blocks, but the code could be simplified. An example is in class
android.apex.ApexInfo
:Can jadx count the number of instructions in a block and see if it can be structured better/simplier?
The text was updated successfully, but these errors were encountered: