https://codereview.appspot.com/199390043/diff/20001/main/classes/core/src/com/ibm/icu/impl/ICUResourceBundleReader.java File main/classes/core/src/com/ibm/icu/impl/ICUResourceBundleReader.java (right): https://codereview.appspot.com/199390043/diff/20001/main/classes/core/src/com/ibm/icu/impl/ICUResourceBundleReader.java#newcode340 main/classes/core/src/com/ibm/icu/impl/ICUResourceBundleReader.java:340: @SuppressWarnings("resource") // Closed by getByteBufferFromInputStream(). On 2015/02/13 15:31:26, roubert ...
9 years, 11 months ago
(2015-02-13 17:14:50 UTC)
#4
https://codereview.appspot.com/199390043/diff/20001/main/classes/core/src/com...
File main/classes/core/src/com/ibm/icu/impl/ICUResourceBundleReader.java
(right):
https://codereview.appspot.com/199390043/diff/20001/main/classes/core/src/com...
main/classes/core/src/com/ibm/icu/impl/ICUResourceBundleReader.java:340:
@SuppressWarnings("resource") // Closed by getByteBufferFromInputStream().
On 2015/02/13 15:31:26, roubert (google) wrote:
> On 2015/02/05 01:50:26, markus.icu wrote:
> > If it helps, we could rename that to
> > getByteBufferFromInputStreamAndCloseStream() ...
>
> That's a very long name. But I've made the change now to see how it looks. Do
> you think it's an improvement like this, or should I revert that change again?
I think it helps, because it makes it clear that the caller need not worry about
the stream.
Optional: It might be ok now to remove the comments from the @SuppressWarnings,
but they are probably still somewhat useful, they make it clear what is being
suppressed.
https://codereview.appspot.com/199390043/diff/20001/main/classes/core/src/com...
File main/classes/core/src/com/ibm/icu/impl/URLHandler.java (right):
https://codereview.appspot.com/199390043/diff/20001/main/classes/core/src/com...
main/classes/core/src/com/ibm/icu/impl/URLHandler.java:47: try {
On 2015/02/13 15:31:26, roubert (google) wrote:
> On 2015/02/05 01:50:26, markus.icu wrote:
> > Three nested "try"... Optional: Reduce nesting by moving variable
declarations
> > out (here: br) and moving the finally block to the outer, existing "try",
with
> a
> > conditional close? (if (br != null) { br.close(); })
>
> That seems like too many changes at the same time, I'd rather do that
> separately.
I was suggesting these to reduce the number of changes from the trunk. It would
be nice if we didn't have to indent further than currently (also to keep "svn
blame" useful) unless not nesting makes the code noticeably harder to
understand.
https://codereview.appspot.com/199390043/diff/60001/main/classes/core/src/com...
File
main/classes/core/src/com/ibm/icu/impl/duration/impl/ResourceBasedPeriodFormatterDataService.java
(right):
https://codereview.appspot.com/199390043/diff/60001/main/classes/core/src/com...
main/classes/core/src/com/ibm/icu/impl/duration/impl/ResourceBasedPeriodFormatterDataService.java:133:
"Failed to close() resource " + name);
Please add e as the second parameter (the cause).
https://codereview.appspot.com/199390043/diff/60001/main/tests/core/src/com/i...
File main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatTest.java
(right):
https://codereview.appspot.com/199390043/diff/60001/main/tests/core/src/com/i...
main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatTest.java:1712:
@SuppressWarnings("resource") // Closed by ResourceReader.
// InputStream is will be closed by the ResourceReader.
On 2015/02/13 20:16:31, roubert (google) wrote: > Committed patchset #6 (id:100001) manually as 37034 (presubmit ...
9 years, 11 months ago
(2015-02-13 20:59:49 UTC)
#8
Message was sent while issue was closed.
On 2015/02/13 20:16:31, roubert (google) wrote:
> Committed patchset #6 (id:100001) manually as 37034 (presubmit successful).
Thanks. I did not have bandwidth to review your changes in last two weeks..
Markus, thanks for the review.
Issue 199390043: ticket:11463: ICU4J ought to always close() resources
(Closed)
Created 9 years, 11 months ago by roubert (google)
Modified 9 years, 11 months ago
Reviewers: yoshito_umaoka_us.ibm.com, markus.icu, yoshito
Base URL: svn+ssh://source.icu-project.org/repos/icu/icu4j/trunk
Comments: 48