Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Don't recommend catching java.lang.Exception #309

Closed
elharo opened this issue May 12, 2020 · 0 comments · Fixed by #312
Closed

Don't recommend catching java.lang.Exception #309

elharo opened this issue May 12, 2020 · 0 comments · Fixed by #312
Assignees
Labels
api: storage Issues related to the googleapis/java-storage API. documentation Improvements or additions to documentation good first issue This issue is a good place to started contributing to this repository. help wanted We'd love to have community involvement on this issue. priority: p2 Moderately-important priority. Fix may not be included in next release. type: docs Improvement to the documentation for an API.

Comments

@elharo
Copy link
Contributor

elharo commented May 12, 2020

https://googleapis.dev/java/google-cloud-storage/latest/com/google/cloud/storage/Blob.html#writer-com.google.cloud.storage.Storage.BlobWriteOption...-

sample code includes a catch block for java.lang.Exception. Per Effective Java et al, this is an antipattern. The sample code should catch only the actual exceptions expected to be thrown.

@elharo elharo added documentation Improvements or additions to documentation help wanted We'd love to have community involvement on this issue. good first issue This issue is a good place to started contributing to this repository. type: docs Improvement to the documentation for an API. priority: p2 Moderately-important priority. Fix may not be included in next release. api: storage Issues related to the googleapis/java-storage API. labels May 12, 2020
@suraj-qlogic suraj-qlogic self-assigned this May 12, 2020
gcf-merge-on-green bot pushed a commit that referenced this issue Jun 11, 2020
🤖 I have created a release \*beep\* \*boop\* 
---
## [1.109.0](https://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://github.com/googleapis/java-storage/issues/325)) ([209cae3](https://github.com/googleapis/java-storage/commit/209cae322932a4f87729fe4c5176a4f11962cfae))
* stub implementation of StorageRpc for the sake of testing ([#351](https://github.com/googleapis/java-storage/issues/351)) ([dd58025](https://github.com/googleapis/java-storage/commit/dd5802555eb0351a5afa2f2f197cb93ca6d3b66e))


### Bug Fixes

* blob.reload() does not work as intuitively expected ([#308](https://github.com/googleapis/java-storage/issues/308)) ([a2bab58](https://github.com/googleapis/java-storage/commit/a2bab58ccd89f48e8d4a8ee2dd776b201598420d))


### Documentation

* **fix:** update client documentation link ([#324](https://github.com/googleapis/java-storage/issues/324)) ([eb8940c](https://github.com/googleapis/java-storage/commit/eb8940cc6a88b5e2b3dea8d0ab2ffc1e350ab924))
* Add doc for equals method in blob ([#311](https://github.com/googleapis/java-storage/issues/311)) ([91fc36a](https://github.com/googleapis/java-storage/commit/91fc36a6673e30d1cfa8c4da51b874e1fd0b0535))
* catch actual exception in java doc comment ([#312](https://github.com/googleapis/java-storage/issues/312)) ([9201de5](https://github.com/googleapis/java-storage/commit/9201de559fe4218abd2e4fac47beac62454547cf)), closes [#309](https://github.com/googleapis/java-storage/issues/309)
* update CONTRIBUTING.md to include code formatting ([#534](https://github.com/googleapis/java-storage/issues/534)) ([#315](https://github.com/googleapis/java-storage/issues/315)) ([466d08f](https://github.com/googleapis/java-storage/commit/466d08f9835a0f1dd00b5c9b3a08551be68d03ad))
* update readme to point client libarary documentation ([#317](https://github.com/googleapis/java-storage/issues/317)) ([8650f80](https://github.com/googleapis/java-storage/commit/8650f806736beec7bf7ab09a337b333bbf144f7b))


### Dependencies

* update dependency com.google.api.grpc:proto-google-common-protos to v1.18.0 ([#301](https://github.com/googleapis/java-storage/issues/301)) ([ff2dee2](https://github.com/googleapis/java-storage/commit/ff2dee2ce41d37787f0866ae740d3cd7f3b2bbd6))
* update dependency com.google.apis:google-api-services-storage to v1-rev20200410-1.30.9 ([#296](https://github.com/googleapis/java-storage/issues/296)) ([2e55aa2](https://github.com/googleapis/java-storage/commit/2e55aa2c8b9c78df9eebfe748fe72dcaae63ff81))
* update dependency com.google.apis:google-api-services-storage to v1-rev20200430-1.30.9 ([#319](https://github.com/googleapis/java-storage/issues/319)) ([3d03fa3](https://github.com/googleapis/java-storage/commit/3d03fa3381cfbb76d1501ec3d2ad14742a8a58dd))
* update dependency com.google.cloud:google-cloud-conformance-tests to v0.0.11 ([#320](https://github.com/googleapis/java-storage/issues/320)) ([6c18c88](https://github.com/googleapis/java-storage/commit/6c18c882cfe0c35b310a518e6044847e6fbeab94))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
api: storage Issues related to the googleapis/java-storage API. documentation Improvements or additions to documentation good first issue This issue is a good place to started contributing to this repository. help wanted We'd love to have community involvement on this issue. priority: p2 Moderately-important priority. Fix may not be included in next release. type: docs Improvement to the documentation for an API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants