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
Looking at the source and tracing down what is happening, the Java Parser doesn't know to treat top-level enum classes as a ClassBlock. Since fake injection requires a class block in the array, it fails to pass and thus nothing is actually injected to the class.
I have a singleton handler for secrets in my test example in a class HiddenTreasure.java
This class starts as:
public enum HiddenTreasure {
INSTANCE;
public static final String key = "akfjakgjag";
public static final String iv = "akfkjakgthg";
This is a valid class to provide fake values on, but nothing is added since the parser does not think it can. I do wonder why there is a separate parser to determine things like classes or functions vs just using the reflection API, but this is still an issue regardless. I can address it locally by modifying the class I am 'enigmafying', but it is still a gap in the full solution.
The text was updated successfully, but these errors were encountered:
Looking at the source and tracing down what is happening, the Java Parser doesn't know to treat top-level enum classes as a ClassBlock. Since fake injection requires a class block in the array, it fails to pass and thus nothing is actually injected to the class.
I have a singleton handler for secrets in my test example in a class
HiddenTreasure.java
This class starts as:
This is a valid class to provide fake values on, but nothing is added since the parser does not think it can. I do wonder why there is a separate parser to determine things like classes or functions vs just using the reflection API, but this is still an issue regardless. I can address it locally by modifying the class I am 'enigmafying', but it is still a gap in the full solution.
The text was updated successfully, but these errors were encountered: