{"action":"reopened","issue":{"url":"https://api.github.com/repos/hcSomething/virtualProject/issues/5","repository_url":"https://api.github.com/repos/hcSomething/virtualProject","labels_url":"https://api.github.com/repos/hcSomething/virtualProject/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/hcSomething/virtualProject/issues/5/comments","events_url":"https://api.github.com/repos/hcSomething/virtualProject/issues/5/events","html_url":"https://github.com/hcSomething/virtualProject/issues/5","id":382034601,"node_id":"MDU6SXNzdWUzODIwMzQ2MDE=","number":5,"title":"线程安全","user":{"login":"likeAwind","id":11746765,"node_id":"MDQ6VXNlcjExNzQ2NzY1","avatar_url":"https://avatars2.githubusercontent.com/u/11746765?v=4","gravatar_id":"","url":"https://api.github.com/users/likeAwind","html_url":"https://github.com/likeAwind","followers_url":"https://api.github.com/users/likeAwind/followers","following_url":"https://api.github.com/users/likeAwind/following{/other_user}","gists_url":"https://api.github.com/users/likeAwind/gists{/gist_id}","starred_url":"https://api.github.com/users/likeAwind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/likeAwind/subscriptions","organizations_url":"https://api.github.com/users/likeAwind/orgs","repos_url":"https://api.github.com/users/likeAwind/repos","events_url":"https://api.github.com/users/likeAwind/events{/privacy}","received_events_url":"https://api.github.com/users/likeAwind/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-19T02:31:44Z","updated_at":"2018-11-19T12:36:17Z","closed_at":null,"author_association":"NONE","body":"public List<UnionEntity> getUnionEntity(){\r\n\t\treturn unionEntitys;\r\n\t}\r\n\t/**\r\n\t * 创建工会\r\n\t * @param uname\r\n\t * @param pname\r\n\t * @return\r\n\t */\r\n\tpublic boolean createUnion(String uname, String pname) {\r\n\t\tlock.lock();\r\n\t\ttry {\r\n\t\t\tif(getUnionEntityByName(uname) != null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tUnionEntity ue = new UnionEntity(uname, pname);\r\n\t\t\tunionEntitys.add(ue);\r\n\t\t\tnew PlayerDaoImpl().insert(ue);  //插入数据库\r\n\t\t\treturn true;\r\n\t\t}finally {\r\n\t\t\tlock.unlock();\r\n\t\t}\r\n\t}\r\n\r\n\r\nunionEntitys 这样书写是否还是会出现 并发失败问题？"}}
{"actor":{"display_login":"hcSomething"}}