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
In Casts#castWithPrimitives(...) there seems to be a typo. When converting Number values with boolean.class as the type, it returns true when the given value is 0, and false when the value is 1.
The Java Virtual Machine encodes boolean array components using 1 to represent true and 0 to represent false. Where Java programming language boolean values are mapped by compilers to values of Java Virtual Machine type int, the compilers must use the same encoding.
Below I am attaching a list of all calls to this method:
In
Casts#castWithPrimitives(...)
there seems to be a typo. When convertingNumber
values withboolean.class
as the type, it returnstrue
when the given value is0
, andfalse
when the value is1
.threadtear/core/src/main/java/me/nov/threadtear/util/reflection/Casts.java
Lines 17 to 25 in f0a13d5
As of Java 16, Java Virtual Machine Specification says:
Below I am attaching a list of all calls to this method:
when converting values on stack in
BasicReferenceHandler
;threadtear/core/src/main/java/me/nov/threadtear/analysis/stack/BasicReferenceHandler.java
Line 65 in f0a13d5
when building
ConstantValue
;threadtear/core/src/main/java/me/nov/threadtear/analysis/stack/ConstantValue.java
Line 18 in f0a13d5
when updating proxy field values in
StringObfuscationStringer
threadtear/core/src/main/java/me/nov/threadtear/execution/stringer/StringObfuscationStringer.java
Line 162 in f0a13d5
Not much to fix, but I could send a PR if you want.
The text was updated successfully, but these errors were encountered: