Skip to content

Conversation

@SauravP97
Copy link

#781 Resolve ClassCastException in App.java
Resolved ClassCastException thrown because ConfigureForUnixVisitor didn't implements HayesVisitor.
Implemented AllModemVisitor in ConfigureForUnixVisitor class and added visit(Hayes hayes) method.

@SauravP97
Copy link
Author

What just happened !! ... Why the Travis CI build failed . Can anyone explain me the possible reasons

@npathai
Copy link
Contributor

npathai commented Aug 15, 2018

@SauravP97 Actually the ClassCastException is expected. The whole point of Acyclic visitor is that you can only implement the type interfaces that you are actually interested in visiting. In this case ConfigureForUnixVisitor is only interested in visiting Zoom modems. So when called with Hayes modem, it just skips calling visit on that visitor because types don't match.

I agree that classcast is not a proper way, I will change it to using instanceof check instead and remove the error log to info log with proper message. Thanks for the PR though. Let me know if you have any futher doubts.

@SauravP97
Copy link
Author

Thanks a lot for clearing that issue. Actually this is my first PR to a repository so I'm a kind of newbie.
So can I ask whether my PR will get merged or not ?

@npathai
Copy link
Contributor

npathai commented Aug 17, 2018

@SauravP97 I apologize that I won't be able to accept this PR in current state because it doesn't solve the actual issue. But I surely can guide you solving it the proper way if you would still like to contribute on this issue. Let me know.

@npathai
Copy link
Contributor

npathai commented Aug 28, 2018

@SauravP97 If you are interested then reply. Else we can close this PR.

@npathai
Copy link
Contributor

npathai commented Sep 11, 2018

Closing this in favor of PR #794

@npathai npathai closed this Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants