Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

docs: catch actual exception in java doc comment#312

Merged
gcf-merge-on-green[bot] merged 5 commits intogoogleapis:masterfrom
suraj-qlogic:storage-309
May 13, 2020
Merged

docs: catch actual exception in java doc comment#312
gcf-merge-on-green[bot] merged 5 commits intogoogleapis:masterfrom
suraj-qlogic:storage-309

Conversation

@suraj-qlogic
Copy link
Contributor

Fixes#309

@googlebotgooglebot added the cla: yesThis human has signed the Contributor License Agreement. labelMay 12, 2020
@suraj-qlogicsuraj-qlogic requested a review fromelharoMay 12, 2020 16:36
@codecov
Copy link

codecovbot commentedMay 12, 2020
edited
Loading

Codecov Report

Merging#312 intomaster willincrease coverage by0.13%.
The diff coverage isn/a.

Impacted file tree graph

@@             Coverage Diff              @@##             master     #312      +/-   ##============================================+ Coverage     62.49%   62.62%   +0.13%- Complexity      552      553       +1============================================  Files            31       31                Lines          5007     5022      +15       Branches        449      480      +31     ============================================+ Hits           3129     3145      +16- Misses         1709     1711       +2+ Partials        169      166       -3
Impacted FilesCoverage ΔComplexity Δ
...e/src/main/java/com/google/cloud/storage/Blob.java82.08% <ø> (+0.10%)30.00 <0.00> (+1.00)
...rc/main/java/com/google/cloud/storage/Storage.java80.90% <ø> (ø)0.00 <0.00> (ø)
...om/google/cloud/storage/spi/v1/HttpStorageRpc.java1.52% <0.00%> (-0.01%)1.00% <0.00%> (ø%)
...ain/java/com/google/cloud/storage/StorageImpl.java80.27% <0.00%> (+0.12%)131.00% <0.00%> (ø%)
...main/java/com/google/cloud/storage/BucketInfo.java81.04% <0.00%> (+0.19%)84.00% <0.00%> (ø%)
...gle/cloud/storage/testing/RemoteStorageHelper.java64.51% <0.00%> (+0.58%)9.00% <0.00%> (ø%)
...in/java/com/google/cloud/storage/StorageBatch.java92.00% <0.00%> (+4.00%)13.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update5566daf...f320ab8. Read thecomment docs.

@@ -728,7 +728,7 @@ public ReadChannel reader(BlobSourceOption... options) {
* try (WriteChannel writer = blob.writer()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for the nested try block, one will do here

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Done

@@ -2505,7 +2505,7 @@ Blob create(
* try (WriteChannel writer = storage.writer(blobInfo)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

don't nest the try block, one is enough

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Done

@athakorathakor added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelMay 12, 2020
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelMay 12, 2020
@suraj-qlogicsuraj-qlogic requested a review fromelharoMay 12, 2020 17:53
Copy link
Contributor

@frankynfrankyn left a comment

Choose a reason for hiding this comment

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

1 nit, thank you for sending this@suraj-qlogic!

* try {
* writer.write(ByteBuffer.wrap(content, 0, content.length));
* } catch (Exception ex) {
* } catch (IOException ex) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The end} isn't aligned with the opening try(). Please fix the spacing. This should be done below as well.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Done

* } catch (IOException ex) {
* // handle exception
* }
* }</pre>
Copy link
Contributor

Choose a reason for hiding this comment

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

you still have an extra closing brace

Copy link
ContributorAuthor

@suraj-qlogicsuraj-qlogicMay 13, 2020
edited
Loading

Choose a reason for hiding this comment

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

@elharo ,I have gone throught code and found there is no extra closing brace.Here last closing brace indicate closing of {@code } tag.Can you please look once?

Copy link
Contributor

Choose a reason for hiding this comment

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

line 733, just before , same below

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@elharo

   * <pre>{@code   * byte[] content = "Hello, World!".getBytes(UTF_8);   * try (WriteChannel writer = blob.writer()) {   *     writer.write(ByteBuffer.wrap(content, 0, content.length));   * } catch (IOException ex) {   *   // handle exception   * }   * }</pre>

Here First closing} brace indicate closing of try block,Second } brace indicate closing
for catch clause.and last one} indicate closing of<pre>{@code so can we write document comment without ending<pre>{@code?

Copy link
Contributor

Choose a reason for hiding this comment

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

By my count you have two open braces and three close braces. Change line 733 from

}</pre> to</pre>

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Done

* } catch (IOException ex) {
* // handle exception
* }
* }</pre>
Copy link
Contributor

Choose a reason for hiding this comment

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

extra close brace

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Same as above.

@suraj-qlogicsuraj-qlogic requested a review fromelharoMay 13, 2020 13:43
* // handle exception
* }
*}</pre>
* </pre>
Copy link
Contributor

Choose a reason for hiding this comment

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

You do need this}</pre> closing bracket to close{@code... } on line 726

@elharo
dpyxdV2b95J

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@frankynfrankyn left a comment

Choose a reason for hiding this comment

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

LGTM

@frankynfrankyn added the automergeMerge the pull request once unit tests and other checks pass. labelMay 13, 2020
@gcf-merge-on-greengcf-merge-on-greenbot merged commit9201de5 intogoogleapis:masterMay 13, 2020
@suraj-qlogicsuraj-qlogic deleted the storage-309 branchMay 15, 2020 03:41
gcf-merge-on-greenbot pushed a commit that referenced this pull requestJun 11, 2020
🤖 I have created a release \*beep\* \*boop\* ---## [1.109.0](https://www.github.com/googleapis/java-storage/compare/v1.108.0...v1.109.0) (2020-06-11)### Features* adopt flatten-maven-plugin and java-shared-dependencies ([#325](https://www.github.com/googleapis/java-storage/issues/325)) ([209cae3](https://www.github.com/googleapis/java-storage/commit/209cae322932a4f87729fe4c5176a4f11962cfae))* stub implementation of StorageRpc for the sake of testing ([#351](https://www.github.com/googleapis/java-storage/issues/351)) ([dd58025](https://www.github.com/googleapis/java-storage/commit/dd5802555eb0351a5afa2f2f197cb93ca6d3b66e))### Bug Fixes* blob.reload() does not work as intuitively expected ([#308](https://www.github.com/googleapis/java-storage/issues/308)) ([a2bab58](https://www.github.com/googleapis/java-storage/commit/a2bab58ccd89f48e8d4a8ee2dd776b201598420d))### Documentation* **fix:** update client documentation link ([#324](https://www.github.com/googleapis/java-storage/issues/324)) ([eb8940c](https://www.github.com/googleapis/java-storage/commit/eb8940cc6a88b5e2b3dea8d0ab2ffc1e350ab924))* Add doc for equals method in blob ([#311](https://www.github.com/googleapis/java-storage/issues/311)) ([91fc36a](https://www.github.com/googleapis/java-storage/commit/91fc36a6673e30d1cfa8c4da51b874e1fd0b0535))* catch actual exception in java doc comment ([#312](https://www.github.com/googleapis/java-storage/issues/312)) ([9201de5](https://www.github.com/googleapis/java-storage/commit/9201de559fe4218abd2e4fac47beac62454547cf)), closes [#309](https://www.github.com/googleapis/java-storage/issues/309)* update CONTRIBUTING.md to include code formatting ([#534](https://www.github.com/googleapis/java-storage/issues/534)) ([#315](https://www.github.com/googleapis/java-storage/issues/315)) ([466d08f](https://www.github.com/googleapis/java-storage/commit/466d08f9835a0f1dd00b5c9b3a08551be68d03ad))* update readme to point client libarary documentation ([#317](https://www.github.com/googleapis/java-storage/issues/317)) ([8650f80](https://www.github.com/googleapis/java-storage/commit/8650f806736beec7bf7ab09a337b333bbf144f7b))### Dependencies* update dependency com.google.api.grpc:proto-google-common-protos to v1.18.0 ([#301](https://www.github.com/googleapis/java-storage/issues/301)) ([ff2dee2](https://www.github.com/googleapis/java-storage/commit/ff2dee2ce41d37787f0866ae740d3cd7f3b2bbd6))* update dependency com.google.apis:google-api-services-storage to v1-rev20200410-1.30.9 ([#296](https://www.github.com/googleapis/java-storage/issues/296)) ([2e55aa2](https://www.github.com/googleapis/java-storage/commit/2e55aa2c8b9c78df9eebfe748fe72dcaae63ff81))* update dependency com.google.apis:google-api-services-storage to v1-rev20200430-1.30.9 ([#319](https://www.github.com/googleapis/java-storage/issues/319)) ([3d03fa3](https://www.github.com/googleapis/java-storage/commit/3d03fa3381cfbb76d1501ec3d2ad14742a8a58dd))* update dependency com.google.cloud:google-cloud-conformance-tests to v0.0.11 ([#320](https://www.github.com/googleapis/java-storage/issues/320)) ([6c18c88](https://www.github.com/googleapis/java-storage/commit/6c18c882cfe0c35b310a518e6044847e6fbeab94))---This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

2 more reviewers

@elharoelharoelharo approved these changes

@frankynfrankynfrankyn approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

automergeMerge the pull request once unit tests and other checks pass.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Don't recommend catching java.lang.Exception

6 participants

@suraj-qlogic@elharo@frankyn@googlebot@yoshi-kokoro@athakor

[8]ページ先頭

©2009-2026 Movatter.jp