{"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":3,"created_at":"2015-11-27T15:10:36Z","updated_at":"2015-11-29T14:47:38Z","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/160420107","html_url":"https://github.com/JMRI/JMRI/pull/280#issuecomment-160420107","issue_url":"https://api.github.com/repos/JMRI/JMRI/issues/280","id":160420107,"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},"created_at":"2015-11-29T14:47:38Z","updated_at":"2015-11-29T14:47:38Z","body":"I wouldn't be asking for a code review and testing prior to dumping changes into master if I was confident they did not introduce new errors that need to be fixed prior to making it into the nightly builds."}}