{"action":"opened","issue":{"url":"https://api.github.com/repos/JodaOrg/joda-beans/issues/135","repository_url":"https://api.github.com/repos/JodaOrg/joda-beans","labels_url":"https://api.github.com/repos/JodaOrg/joda-beans/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/JodaOrg/joda-beans/issues/135/comments","events_url":"https://api.github.com/repos/JodaOrg/joda-beans/issues/135/events","html_url":"https://github.com/JodaOrg/joda-beans/issues/135","id":191857901,"number":135,"title":"Optionally disable generation of clone() method for Bean types","user":{"login":"bcamel","id":356990,"avatar_url":"https://avatars.githubusercontent.com/u/356990?v=3","gravatar_id":"","url":"https://api.github.com/users/bcamel","html_url":"https://github.com/bcamel","followers_url":"https://api.github.com/users/bcamel/followers","following_url":"https://api.github.com/users/bcamel/following{/other_user}","gists_url":"https://api.github.com/users/bcamel/gists{/gist_id}","starred_url":"https://api.github.com/users/bcamel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcamel/subscriptions","organizations_url":"https://api.github.com/users/bcamel/orgs","repos_url":"https://api.github.com/users/bcamel/repos","events_url":"https://api.github.com/users/bcamel/events{/privacy}","received_events_url":"https://api.github.com/users/bcamel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-27T12:07:33Z","updated_at":"2016-11-27T12:07:33Z","closed_at":null,"body":"Apparently GWT 2.7.0 does not (easily) support `Object#clone()` [(see here)](https://code.google.com/archive/p/google-web-toolkit/issues/5068)\r\n\r\nIn `BeanGen.java` we can see that an override for `Object#clone()` will be omitted in the following cases\r\n\r\n```\r\n private void generateClone() {\r\n        if (data.isManualClone() || \r\n            data.isImmutable()   ||\r\n            (data.isRootClass() == false && data.isConstructable() == false)) {\r\n            return;\r\n        }\r\n...\r\n```\r\n\r\nThese cases are obviously not feasible workarounds for the GWT issue (given we are implementing a `Bean` rather than an `ImmutableBean`).\r\n\r\nWould it be undesirable to add a new attribute e.g. `cloneable` to the `BeanDefinition` annotation to optionally switch off the override of `clone()` ?\r\n"}}
{"actor":{"display_login":"bcamel"}}