-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Return null on GET 404 #1206
Return null on GET 404 #1206
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,9 @@ public PagedList<BatchAccount> listByGroup(String resourceGroupName) { | |
|
||
@Override | ||
protected BatchAccountImpl wrapModel(BatchAccountInner inner) { | ||
if (inner == null) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. might be simpler/cleaner to just say: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually find inline conditionals hard to read, particularly in this case the line gets too long with the inline constructor call. Inline conditionals are forbidden in Sun's original checkstyle rules: http://checkstyle.sourceforge.net/config_coding.html#AvoidInlineConditionals but we are not reinforcing it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
return null; | ||
} | ||
return new BatchAccountImpl( | ||
inner.name(), | ||
inner, | ||
|
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.
might be simpler/cleaner to just say:
return (inner == null) ? inner : new .... ;