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

Side Effect of toString() Method Invocation #4

Closed
llmhyy opened this issue May 22, 2016 · 0 comments
Closed

Side Effect of toString() Method Invocation #4

llmhyy opened this issue May 22, 2016 · 0 comments

Comments

@llmhyy
Copy link
Owner

llmhyy commented May 22, 2016

In the process of debugging, the string value of an object variable will be recorded by dynamically invoking its toString() method. However, a side-effect of such an operation is to modify the program state if the toString() writes some fields of the object variable.

A possible solution is to remember the program state before toString() method invocation and restore the state after the invocation is finished.

@llmhyy llmhyy changed the title The toString() method invocation may change the behavior of original program Side Effect of toString() Method Invocation May 22, 2016
@llmhyy llmhyy closed this as completed Jul 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant