Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usefulness of property Enumeration_Obsolete #234

Open
emopers opened this issue Apr 21, 2016 · 1 comment
Open

Usefulness of property Enumeration_Obsolete #234

emopers opened this issue Apr 21, 2016 · 1 comment

Comments

@emopers
Copy link

emopers commented Apr 21, 2016

Hi we're thinking of the usefulness of property Enumeration_Obsolete. First in Java API, it just stated that "using Iterator in preference to Enumeration", which seems not to be officially depreciated as obsolete. Furthermore, StringTokenizer is the sole implementation of this interface in JDK and widely used by developers now.
From our observation this property triggered large amount of violations when running JavaMOP over many open source projects. So we'd suggest that this property could at least, just check for the instances implementing Enumeration that are not StringTokenizer. This would help to eliminate the noise generated during monitoring.

@xiaohe27
Copy link
Contributor

xiaohe27 commented Apr 22, 2016

@emopers , I agree with your arguments. You can modify the behavior of monitoring by improving the mop spec, specifically the abstraction level of the point cuts. Currently, it is defined as "Enumeration+.*(..)", so every method invocation with that prefix will generate an abstract "use" event. We can make it more accurate by providing more fine-grained, e.g. conditional point cuts, so the events will be generated only if the method receiver is not an instance of StringTokenizer. Let me know if you need further help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants