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
During our running of JavaMOP we found that Enum_NoOrdinal and Enum_UserFriendlyName seem to be violated upon every method invocation on an Enum object and lead to large amount of violations. We're not sure what's the problem behind that, but it seems like a bug. Furthermore, violating these two properties won't lead to any substantial functional bugs or performance degradation in programs.
The text was updated successfully, but these errors were encountered:
@emopers I am not able to reproduce this problem when monitoring the code below via the jar created from those two properties, only the true violation is reported, nothing more:
public class Main {
public enum Day {
SUNDAY, MONDAY, TUESDAY, WEDNESDAY,
THURSDAY, FRIDAY, SATURDAY
}
public static void main(String[] args) {
// write your code here
System.out.println(Day.SATURDAY.name()); //only report violation if the second property is used.
System.out.println(Day.FRIDAY.ordinal()); //only report violation if the first property is used.
System.out.println(Day.THURSDAY.toString()); //no violation is reported
System.out.println(Day.TUESDAY.hashCode()); //no violation is reported
}
Can you provide a more concrete example that is reproducible?
During our running of JavaMOP we found that Enum_NoOrdinal and Enum_UserFriendlyName seem to be violated upon every method invocation on an Enum object and lead to large amount of violations. We're not sure what's the problem behind that, but it seems like a bug. Furthermore, violating these two properties won't lead to any substantial functional bugs or performance degradation in programs.
The text was updated successfully, but these errors were encountered: