Title: Issue · GitHub
Open Graph Title: Issue · androidannotations/androidannotations
X Title: Issue · androidannotations/androidannotations
Description: Fast Android Development. Easy maintainance. Contribute to androidannotations/androidannotations development by creating an account on GitHub.
Open Graph Description: Fast Android Development. Easy maintainance. Contribute to androidannotations/androidannotations development by creating an account on GitHub.
X Description: Fast Android Development. Easy maintainance. Contribute to androidannotations/androidannotations development by creating an account on GitHub.
Opengraph URL: https://github.com/androidannotations/androidannotations
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@DefaultStringSet does not return empty Set of Strings on default","articleBody":"**AA version: 3.2**\n\nThe documentation of `@DefaultStringSet` states that an empty Set of Strings is returned on default. The generated code on the other hand returns `null` by default. \n\n**Example:**\nBase interface:\n\n``` java\n@SharedPref(SharedPref.Scope.UNIQUE)\npublic interface PrefsClass {\n /* Documentation of @DefaultStringSet states:\n * \"Use on methods in SharedPref annotated class.\n * The generated method will return an empty java.util.Set of Strings by default.\"\n */\n @DefaultStringSet\n public Set\u003cString\u003e stringSetPref();\n}\n```\n\nGenerated code:\n\n``` java\npublic final class PrefsClass_ extends SharedPreferencesHelper{\n // ...\n public StringSetPrefField stringSetPref() {\n // returns null instead of empty Set\n return stringSetField(\"stringSetPref\", null);\n }\n}\n```\n\nExpected code:\n\n``` java\npublic final class PrefsClass_ extends SharedPreferencesHelper{\n // ...\n public StringSetPrefField stringSetPref() {\n // returns a new empty set (not necessarily HashSet)\n return stringSetField(\"stringSetPref\", new HashSet\u003cString\u003e());\n }\n}\n```\n","author":{"url":"https://github.com/ironjan","@type":"Person","name":"ironjan"},"datePublished":"2015-03-27T12:52:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1357/androidannotations/issues/1357"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:3037f38d-1346-b96c-908a-2a206b2ee902 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CC68:1A4A0D:AC28AB:F22FE3:6A605513 |
| html-safe-nonce | 6a7c0bda51b821512cf75bd93fb87156ffb607f5f9385831b2d75c59c01fe6c3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzY4OjFBNEEwRDpBQzI4QUI6RjIyRkUzOjZBNjA1NTEzIiwidmlzaXRvcl9pZCI6IjY2MDM5NzEzMzQyMDg3NzEzNDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ba08d2eaa1892a4bb277b77afd5ae64389518fb0fbc40bdf16fdc851812d4bf7 |
| hovercard-subject-tag | repository:3116751 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/androidannotations/androidannotations/issues/1357 |
| twitter:image | https://opengraph.githubassets.com/831b2cea72f89b2d1e38863aac93de01e02120da604fdfa2cc1a8f73c14a12b8/androidannotations/androidannotations |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/831b2cea72f89b2d1e38863aac93de01e02120da604fdfa2cc1a8f73c14a12b8/androidannotations/androidannotations |
| og:image:alt | Fast Android Development. Easy maintainance. Contribute to androidannotations/androidannotations development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60da8c2a42fa2bbf5f7567474990ec467836a84444262a58e200fa91b7f3d2d0 |
| turbo-cache-control | no-cache |
| go-import | github.com/androidannotations/androidannotations git https://github.com/androidannotations/androidannotations.git |
| octolytics-dimension-user_id | 1315313 |
| octolytics-dimension-user_login | androidannotations |
| octolytics-dimension-repository_id | 3116751 |
| octolytics-dimension-repository_nwo | androidannotations/androidannotations |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3116751 |
| octolytics-dimension-repository_network_root_nwo | androidannotations/androidannotations |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9824515e740d83d5eb82168a089b806ab0fe04a1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width