{"action":"created","issue":{"url":"https://api.github.com/repos/shylux/ch.bfh.bti7081.s2015.rot/issues/11","labels_url":"https://api.github.com/repos/shylux/ch.bfh.bti7081.s2015.rot/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/shylux/ch.bfh.bti7081.s2015.rot/issues/11/comments","events_url":"https://api.github.com/repos/shylux/ch.bfh.bti7081.s2015.rot/issues/11/events","html_url":"https://github.com/shylux/ch.bfh.bti7081.s2015.rot/issues/11","id":78498475,"number":11,"title":"Thread aktualisiert nicht das Hauptobjekt","user":{"login":"tanns2","id":11090098,"avatar_url":"https://avatars.githubusercontent.com/u/11090098?v=3","gravatar_id":"","url":"https://api.github.com/users/tanns2","html_url":"https://github.com/tanns2","followers_url":"https://api.github.com/users/tanns2/followers","following_url":"https://api.github.com/users/tanns2/following{/other_user}","gists_url":"https://api.github.com/users/tanns2/gists{/gist_id}","starred_url":"https://api.github.com/users/tanns2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanns2/subscriptions","organizations_url":"https://api.github.com/users/tanns2/orgs","repos_url":"https://api.github.com/users/tanns2/repos","events_url":"https://api.github.com/users/tanns2/events{/privacy}","received_events_url":"https://api.github.com/users/tanns2/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-05-20T12:10:13Z","updated_at":"2015-05-20T14:09:13Z","closed_at":"2015-05-20T12:53:21Z","body":"In der Klasse TestStatePattern wird eine neue TimeActivity erstellt, die dann einen Thread startet. Der Thread hat eine Referenz auf die Activity und setzt nach ablaufen des Soft und Hardlimites den Status der Activity auf Failed -> das funktioniert. Allerdings sind die Änderungen in der Callerklasse TestStatePattern nicht wirksam, obwohl die Activity als volatile deklariert ist und sogar der Thread durch das Interface \"Shareable\" in der TestStatePatternklasse die Methode setActivty aufruft und wieder die aktuelle Activity (sie ist korrekt, der Status stimmt) der Instanzvariable zuweisen soll. Der Leider cheggt das die TestStatePattern allerdings nicht richtig und es ist immer noch auf dem Initialstatus \"TimeActivityReady\". </latein>\r\n\r\nKann jemand vielleicht helfen oder sieht den Fehler? Der Ablauf des Statepattern funktioniert sonst, \"einzig\" das Teilen der Variable macht noch Probleme.\r\n\r\nVielen Dank euch allen\r\n\r\nhttps://github.com/shylux/ch.bfh.bti7081.s2015.rot/blob/StatePattern/src/main/java/ch/bfh/bti7081/s2015/red/PatientApp/lifeUp/InProgress.java\r\nhttps://github.com/shylux/ch.bfh.bti7081.s2015.rot/blob/StatePattern/src/main/java/ch/bfh/bti7081/s2015/red/PatientApp/lifeUp/TimeActivityManager.java\r\nhttps://github.com/shylux/ch.bfh.bti7081.s2015.rot/blob/StatePattern/src/main/java/ch/bfh/bti7081/s2015/red/PatientApp/lifeUp/TimeActivityReady.java\r\n"},"comment":{"url":"https://api.github.com/repos/shylux/ch.bfh.bti7081.s2015.rot/issues/comments/103900680","html_url":"https://github.com/shylux/ch.bfh.bti7081.s2015.rot/issues/11#issuecomment-103900680","issue_url":"https://api.github.com/repos/shylux/ch.bfh.bti7081.s2015.rot/issues/11","id":103900680,"user":{"login":"tanns2","id":11090098,"avatar_url":"https://avatars.githubusercontent.com/u/11090098?v=3","gravatar_id":"","url":"https://api.github.com/users/tanns2","html_url":"https://github.com/tanns2","followers_url":"https://api.github.com/users/tanns2/followers","following_url":"https://api.github.com/users/tanns2/following{/other_user}","gists_url":"https://api.github.com/users/tanns2/gists{/gist_id}","starred_url":"https://api.github.com/users/tanns2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanns2/subscriptions","organizations_url":"https://api.github.com/users/tanns2/orgs","repos_url":"https://api.github.com/users/tanns2/repos","events_url":"https://api.github.com/users/tanns2/events{/privacy}","received_events_url":"https://api.github.com/users/tanns2/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T14:09:13Z","updated_at":"2015-05-20T14:09:13Z","body":"WO wei mr de dä instanziere - isch ja eher generou. nei i has o grad gmerkt, de cha ja d activites ga reiche ir DB."}}