-
Notifications
You must be signed in to change notification settings - Fork 86
docs: catch actual exception in java doc comment #312
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
Changes from all commits
47dcb7f
16cf135
bed6047
7db165e
f320ab8
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 |
|---|---|---|
|
|
@@ -726,11 +726,9 @@ public ReadChannel reader(BlobSourceOption... options) { | |
| * <pre>{@code | ||
| * byte[] content = "Hello, World!".getBytes(UTF_8); | ||
| * try (WriteChannel writer = blob.writer()) { | ||
| * try { | ||
| * writer.write(ByteBuffer.wrap(content, 0, content.length)); | ||
| * } catch (Exception ex) { | ||
| * // handle exception | ||
| * } | ||
| * } catch (IOException ex) { | ||
| * // handle exception | ||
| * } | ||
| * }</pre> | ||
|
Contributor
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. you still have an extra closing brace
Contributor
Author
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.
Contributor
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. line 733, just before , same below
Contributor
Author
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. Here First closing
Contributor
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. By my count you have two open braces and three close braces. Change line 733 from
Contributor
Author
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. Done |
||
| * | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2503,11 +2503,9 @@ Blob create( | |
| * byte[] content = "Hello, World!".getBytes(UTF_8); | ||
| * BlobInfo blobInfo = BlobInfo.newBuilder(blobId).setContentType("text/plain").build(); | ||
| * try (WriteChannel writer = storage.writer(blobInfo)) { | ||
|
Contributor
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. don't nest the try block, one is enough
Contributor
Author
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. Done |
||
| * try { | ||
| * writer.write(ByteBuffer.wrap(content, 0, content.length)); | ||
| * } catch (Exception ex) { | ||
| * // handle exception | ||
| * } | ||
| * } catch (IOException ex) { | ||
| * // handle exception | ||
| * } | ||
| * }</pre> | ||
|
Contributor
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. extra close brace
Contributor
Author
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. Same as above. |
||
| * | ||
|
|
||
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.
no need for the nested try block, one will do here
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.
Done