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
For the following 4 properties: File_DeleteTempFile, ObjectInput_Close, StringBuffer_SingleThreadUsage, ObjectOutput_Close, violation locations would be shown as "Unknown." instead of the FQN of the Java file with line number.
Though we understand due to the formation of such properties it is hard to point out the exact place where the violation happens immediately, but at least it would be good if it could capture the location of TempFile creation or ObjectOutput opening and report it later. For example, we conceive is there any way to improve File_DeleteTempFile like:
File_DeleteTempFile(Filef) {
Locationl;
eventcreateafterreturning(Filef) :
call(File+ File.createTempFile(..)) { l = MOPLogging.getLocation(); }
...
@violation {
MOPLogging.out.println(Level.CRITICAL, __DEFAULT_MESSAGE);
MOPLogging.out.println(Level.CRITICAL, "A temporary file created at " + l + " has not been deleted.");
}
}
Is this feasible in JavaMOP? Thanks!
The text was updated successfully, but these errors were encountered:
For the following 4 properties: File_DeleteTempFile, ObjectInput_Close, StringBuffer_SingleThreadUsage, ObjectOutput_Close, violation locations would be shown as "Unknown." instead of the FQN of the Java file with line number.
Though we understand due to the formation of such properties it is hard to point out the exact place where the violation happens immediately, but at least it would be good if it could capture the location of TempFile creation or ObjectOutput opening and report it later. For example, we conceive is there any way to improve File_DeleteTempFile like:
Is this feasible in JavaMOP? Thanks!
The text was updated successfully, but these errors were encountered: