-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fix #26: split ConstantCollector into two classes #31
Conversation
* Created by bdanglot on 10/4/16. | ||
*/ | ||
public class DefaultConstantCollector extends AbstractProcessor<CtLiteral> { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class has no impact on the state of the program (contain only some checks and return statement). We should just remove it IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We collect all literals by default also in SMT mode.
b4aa50f
to
6e160c3
Compare
|
||
@Override | ||
public boolean isToBeProcessed(CtLiteral candidate) { | ||
CtMethod parent = candidate.getParent(CtMethod.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't care about the parent, remove the tests
if (candidate.getValue() instanceof Boolean) { | ||
return false; | ||
} else if (candidate.getValue() instanceof Number) {// 3 defaults value will be added anyway | ||
if (candidate.getValue().equals(1) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
…onstant-collector
No description provided.