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

Add equality to Path, BeanSetting, Block; don't load duplicate Paths in Block #682

Merged
merged 9 commits into from Jan 22, 2016

Conversation

bobjacobsen
Copy link
Member

This adds equals() and hashCode() to Path, BeanSetting and Block (plus JUnit tests) so code can e.g. check for duplicate/equals Paths in a Block.

No longer load duplicate Paths in into a Block, e.g. if a file is read for a second time.

Related to #677, #678

pabender and others added 3 commits January 20, 2016 23:37
bobjacobsen added a commit that referenced this pull request Jan 22, 2016
Add equality to Path, BeanSetting, Block; don't load duplicate Paths in Block
@bobjacobsen bobjacobsen merged commit db22af1 into JMRI:master Jan 22, 2016
@bobjacobsen bobjacobsen deleted the test-duplicate-file-reads branch January 23, 2016 17:46
@kjlisby
Copy link
Contributor

kjlisby commented Feb 7, 2016

It seems that with this commit, my signal mast logic no longer reacts to block occupancy changes.

That is, if I check out the commit just before this one, my signal masts works fine. But checking out this one or a newer commit, the reaction to block occupancy changes no longer works.

BR
Lisby

@kjlisby
Copy link
Contributor

kjlisby commented Feb 7, 2016

BTW: As a symptom, I see this null pointer exception from time to time:

2016-02-07 14:22:33,672 ptionhandler.UncaughtExceptionHandler ERROR - Unhandled Exception: java.lang.NullPointerException [B03-B09 B14-B15]
java.lang.NullPointerException
at jmri.implementation.DefaultSignalMastLogic$DestinationMast.checkStateDetails(DefaultSignalMastLogic.java:1948)
at jmri.implementation.DefaultSignalMastLogic$DestinationMast$1.run(DefaultSignalMastLogic.java:1841)
at java.lang.Thread.run(Thread.java:745)

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

Successfully merging this pull request may close these issues.

None yet

4 participants