{"action":"created","issue":{"url":"https://api.github.com/repos/JMRI/JMRI/issues/280","labels_url":"https://api.github.com/repos/JMRI/JMRI/issues/280/labels{/name}","comments_url":"https://api.github.com/repos/JMRI/JMRI/issues/280/comments","events_url":"https://api.github.com/repos/JMRI/JMRI/issues/280/events","html_url":"https://github.com/JMRI/JMRI/pull/280","id":119210237,"number":280,"title":"Possibly fix NPEs saving connections","user":{"login":"rhwood","id":297232,"avatar_url":"https://avatars.githubusercontent.com/u/297232?v=3","gravatar_id":"","url":"https://api.github.com/users/rhwood","html_url":"https://github.com/rhwood","followers_url":"https://api.github.com/users/rhwood/followers","following_url":"https://api.github.com/users/rhwood/following{/other_user}","gists_url":"https://api.github.com/users/rhwood/gists{/gist_id}","starred_url":"https://api.github.com/users/rhwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhwood/subscriptions","organizations_url":"https://api.github.com/users/rhwood/orgs","repos_url":"https://api.github.com/users/rhwood/repos","events_url":"https://api.github.com/users/rhwood/events{/privacy}","received_events_url":"https://api.github.com/users/rhwood/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-27T15:10:36Z","updated_at":"2015-11-29T13:52:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JMRI/JMRI/pulls/280","html_url":"https://github.com/JMRI/JMRI/pull/280","diff_url":"https://github.com/JMRI/JMRI/pull/280.diff","patch_url":"https://github.com/JMRI/JMRI/pull/280.patch"},"body":"I think the problem with the NPEs saving connections was that when the\nconnection changed modes (from simulator to serial for example), the\nold connection was not being removed from the ConnectionConfigManager\n(CCM).\n\nThis has been fixed by implementing dispose() in the\nAbstractConnectionConfig to remove the connection from the CCM and\nhaving all subclasses call that implementation. Redundant overriding\nimplementations of dispose() have been removed.\n\nThis change also calls setInstance() whenever any ConnectionConfig is\nregistered. This sometimes throws errors, but they seem to be benign,\nand may only indicate that code needs to be cleaned up."},"comment":{"url":"https://api.github.com/repos/JMRI/JMRI/issues/comments/160417597","html_url":"https://github.com/JMRI/JMRI/pull/280#issuecomment-160417597","issue_url":"https://api.github.com/repos/JMRI/JMRI/issues/280","id":160417597,"user":{"login":"DanielBoudreau","id":14431911,"avatar_url":"https://avatars.githubusercontent.com/u/14431911?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielBoudreau","html_url":"https://github.com/DanielBoudreau","followers_url":"https://api.github.com/users/DanielBoudreau/followers","following_url":"https://api.github.com/users/DanielBoudreau/following{/other_user}","gists_url":"https://api.github.com/users/DanielBoudreau/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielBoudreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielBoudreau/subscriptions","organizations_url":"https://api.github.com/users/DanielBoudreau/orgs","repos_url":"https://api.github.com/users/DanielBoudreau/repos","events_url":"https://api.github.com/users/DanielBoudreau/events{/privacy}","received_events_url":"https://api.github.com/users/DanielBoudreau/received_events","type":"User","site_admin":false},"created_at":"2015-11-29T13:52:56Z","updated_at":"2015-11-29T13:52:56Z","body":"Haven’t tried it.  Commit to the head and I’ll take a look.\n\n \n\nDan\n\n \n\nFrom: Randall Wood [mailto:notifications@github.com] \nSent: Sunday, November 29, 2015 7:47 AM\nTo: JMRI/JMRI <JMRI@noreply.github.com>\nSubject: Re: [JMRI] Possibly fix NPEs saving connections (#280)\n\n \n\nDoes this work for anyone?\n\n—\nReply to this email directly or view it on GitHub <https://github.com/JMRI/JMRI/pull/280#issuecomment-160415036> .  <https://github.com/notifications/beacon/ANw2p_xcSws63vL0Kuz0krv6rvevdGFTks5pKutBgaJpZM4GqjYK.gif> \n\n"}}