Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

fix NPE in Configuration.toString() #3169

Merged
merged 1 commit into from
Mar 22, 2017

Conversation

sjsf
Copy link
Contributor

@sjsf sjsf commented Mar 22, 2017

fixes #3167
Signed-off-by: Simon Kaufmann simon.kfm@googlemail.com

fixes eclipse-archived#3167
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
Copy link
Contributor

@maggu2810 maggu2810 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment about unnecessary function calls.

@@ -221,7 +221,7 @@ public String toString() {
sb.append(", ");
}
sb.append(String.format("{key=%s; type=%s; value=%s}", prop.getKey(),
prop.getValue().getClass().getSimpleName(), prop.getValue()));
prop.getValue() != null ? prop.getValue().getClass().getSimpleName() : "?", prop.getValue()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to use a temp. variable instead of calling the method getValue() three times if only one call is necessary. 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point - why did you merge it then? 😉
-> #3171

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the code itself is okay and I have not been sure, if such stuff is a good reason to not approve the changes.

@maggu2810 maggu2810 merged commit 034ba55 into eclipse-archived:master Mar 22, 2017
sjsf pushed a commit to sjsf/smarthome that referenced this pull request Mar 22, 2017
...as correctly pointed out in eclipse-archived#3169

relates to eclipse-archived#3169
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
@sjsf sjsf deleted the fixNPEinConfiguration branch March 22, 2017 08:14
maggu2810 pushed a commit that referenced this pull request Mar 22, 2017
...as correctly pointed out in #3169

relates to #3169
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
@kaikreuzer kaikreuzer modified the milestone: 0.9.0 Jun 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPE in Configuration.toString()
3 participants