You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've observed that Jadx sometimes produces excessively long statements with nested ternary operators, which can impact code readability and understandability.
In this case, Jadx generates a single-line expression that represents the same functionality using nested ternary operators. While this condensed form is more compact, it sacrifices readability significantly. The deeply nested ternary operators can be challenging to parse and comprehend, especially when dealing with multiple levels of conditions. In this case, the change from the multiple if structure to the single-line ternary expression has decreased the code's understandability.
I think keep the multiple if structure OR format the nested ternary operators in the following way might be a helpful improvement. Thank you.
Describe your idea
Description:
Hi, I've observed that Jadx sometimes produces excessively long statements with nested ternary operators, which can impact code readability and understandability.
Here is an example:
The following code snippet is from org/apache/commons/codec/binary/Conversion.java in the project commons-lang
The corresponding code generated by Jadx:
In this case, Jadx generates a single-line expression that represents the same functionality using nested ternary operators. While this condensed form is more compact, it sacrifices readability significantly. The deeply nested ternary operators can be challenging to parse and comprehend, especially when dealing with multiple levels of conditions. In this case, the change from the multiple
if
structure to the single-line ternary expression has decreased the code's understandability.I think keep the multiple
if
structure OR format the nested ternary operators in the following way might be a helpful improvement. Thank you.The corresponding .class file can be found here
JDK version: openjdk 17.0.5
Jadx version: jadx-1.4.7.297-3599b248
The text was updated successfully, but these errors were encountered: