-
-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add null annotations to registries #1134
Conversation
0ea8d24
to
d0f8846
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not yet do a full review but stumbled across some parts of this too while annotating the org.openhab.core.config.core
bundle which I would like to discuss with you (see my latest PR #1152).
...omation/src/main/java/org/openhab/core/automation/internal/provider/i18n/ModuleI18nUtil.java
Outdated
Show resolved
Hide resolved
...on/src/main/java/org/openhab/core/automation/module/provider/i18n/ModuleTypeI18nService.java
Outdated
Show resolved
Hide resolved
a2205a8
to
e6501c9
Compare
...omation.rest/src/main/java/org/openhab/core/automation/rest/internal/ModuleTypeResource.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a full review and now I understand the challenge with this. Took quite some time. I added some minor remarks and have to ask the same question regarding the bundle like before for the ConfigDescriptionI18nUtil
.
.../main/java/org/openhab/core/automation/internal/provider/AbstractResourceBundleProvider.java
Outdated
Show resolved
Hide resolved
...tomation/src/main/java/org/openhab/core/automation/internal/type/ModuleTypeRegistryImpl.java
Outdated
Show resolved
Hide resolved
...tomation/src/main/java/org/openhab/core/automation/internal/type/ModuleTypeRegistryImpl.java
Outdated
Show resolved
Hide resolved
...hab.core.automation/src/main/java/org/openhab/core/automation/template/TemplateRegistry.java
Outdated
Show resolved
Hide resolved
...penhab.core.ui/src/main/java/org/eclipse/smarthome/ui/internal/items/ItemUIRegistryImpl.java
Outdated
Show resolved
Hide resolved
...fig.core/src/main/java/org/eclipse/smarthome/config/core/i18n/ConfigDescriptionI18nUtil.java
Outdated
Show resolved
Hide resolved
aa935b4
to
132a671
Compare
Adds null annotations to all registries, the interfaces they implement and a few other classes. Also-by: Christoph Weitkamp <github@christophweitkamp.de> Signed-off-by: Wouter Born <github@maindrain.net>
132a671
to
f833408
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Great job. Thanks.
@@ -406,6 +399,7 @@ protected Bundle getBundle(String uid) { | |||
uri = new URI(prefix + ":" + uid + ".name"); | |||
} catch (URISyntaxException e) { | |||
logger.error("Constructed invalid uri '{}:{}.name'", prefix, uid, e); | |||
return Collections.emptyList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should return the default values here. I fixed it in https://github.com/openhab/openhab-core/pull/1161/files#diff-d90b601b2b68bbe8017ba644c98c6da1R387.
Adds null annotations to all registries, the interfaces they implement and a few other classes. Also-by: Christoph Weitkamp <github@christophweitkamp.de> Signed-off-by: Wouter Born <github@maindrain.net> GitOrigin-RevId: 2430256
Adds null annotations to all registries, the interfaces they implement and a few other classes.
There's also a PR to update the add-ons for this: https://github.com/openhab/openhab2-addons/pull/6233