Skip to content
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

feat(ast): Add support for Throwable causes [ggj] #801

Merged
merged 6 commits into from Jul 30, 2021
Merged

Conversation

miraleung
Copy link
Contributor

@miraleung miraleung commented Jul 30, 2021

This is needed for #804.

@miraleung miraleung requested a review from a team as a code owner July 30, 2021 20:25
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 30, 2021
@miraleung miraleung changed the title feat(ast): Add support for throwable causes [ggj] feat(ast): Add support for Throwable causes [ggj] Jul 30, 2021
@codecov
Copy link

codecov bot commented Jul 30, 2021

Codecov Report

Merging #801 (3c85b99) into master (e654bfb) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #801   +/-   ##
=======================================
  Coverage   91.28%   91.29%           
=======================================
  Files         140      140           
  Lines       14965    14979   +14     
  Branches     1074     1078    +4     
=======================================
+ Hits        13661    13675   +14     
  Misses       1009     1009           
  Partials      295      295           
Impacted Files Coverage Δ
...com/google/api/generator/engine/ast/ThrowExpr.java 100.00% <100.00%> (ø)
.../com/google/api/generator/engine/ast/TypeNode.java 92.48% <100.00%> (+0.11%) ⬆️
...i/generator/engine/writer/ImportWriterVisitor.java 92.82% <100.00%> (+0.06%) ⬆️
...api/generator/engine/writer/JavaWriterVisitor.java 99.21% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e654bfb...3c85b99. Read the comment docs.

Copy link
Contributor

@vam-google vam-google left a comment

Choose a reason for hiding this comment

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

LGTM


if (causeExpr() != null) {
Preconditions.checkState(
ConcreteReference.withClazz(Throwable.class)
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor, but probably we don't have to create reference each time, and can have it as a static final constant in this class.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, added to TypeNode.

@miraleung miraleung merged commit 7fdeece into master Jul 30, 2021
@miraleung miraleung deleted the dev/throw-cause branch July 30, 2021 22:13
suztomo pushed a commit that referenced this pull request Mar 21, 2023
🤖 I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
suztomo pushed a commit that referenced this pull request Mar 21, 2023
🤖 I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants