Conversation
Codecov Report
@@ Coverage Diff @@
## master #24 +/- ##
============================================
+ Coverage 80.95% 80.97% +0.02%
- Complexity 1721 1723 +2
============================================
Files 159 159
Lines 6395 6397 +2
Branches 830 831 +1
============================================
+ Hits 5177 5180 +3
Misses 907 907
+ Partials 311 310 -1
Continue to review full report at Codecov.
|
RaHery
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @alarribeau, @clementdenis, and @llbrt)
endpoints-framework/src/main/java/com/google/api/server/spi/response/ServletResponseResultWriter.java, line 96 at r1 (raw file):
} this.objectWriter = configureWriter(objectWriter); this.errorObjectWriter = objectWriter;
The method configureObject(..) is not a pure function: it may change the state of the input parameter objectWriter. If it does, the errorObjectWriter would inherit the side effect of this change.
It would be safer to assign a different object to errorObjectWriter instead of reusing the same instance.
|
From the ObjectWriter Javadoc:
So com.fasterxml.jackson.databind.ObjectWriter instances are effectively immutable, their state can't be changed, so the logic here should be OK. |
RaHery
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @alarribeau, @clementdenis, and @llbrt)
llbrt
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @alarribeau, @clementdenis, and @llbrt)
llbrt
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @alarribeau and @clementdenis)
RaHery
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @alarribeau)
No description provided.