Title: Fix NullPointerException in `MethodsFunctionsChecker` by rcosta358 · Pull Request #150 · liquid-java/liquidjava · GitHub
Open Graph Title: Fix NullPointerException in `MethodsFunctionsChecker` by rcosta358 · Pull Request #150 · liquid-java/liquidjava
X Title: Fix NullPointerException in `MethodsFunctionsChecker` by rcosta358 · Pull Request #150 · liquid-java/liquidjava
Description: This PR fixes an issue where when a class had multiple methods and one method would throw an error related to a parametric refinement (e.g., InvalidRefinementError), the exception would abort the visitation of sibling methods during the first pass. Then, in second pass, when trying to get the function that should have been added to the context in the first pass, it is not there, and would throw a NullPointerException. This was because there were missing try-catch blocks in the getMethodRefinements and getConstructorRefinements (in this case, the first one). Example Reproduction public class SimpleTest { void testParam(@Refinement("y + 1") int y) {} int test() { return -1; } } // Cannot invoke "liquidjava.processor.context.RefinedFunction.getArguments()" because "fi" is null
Open Graph Description: This PR fixes an issue where when a class had multiple methods and one method would throw an error related to a parametric refinement (e.g., InvalidRefinementError), the exception would abort the v...
X Description: This PR fixes an issue where when a class had multiple methods and one method would throw an error related to a parametric refinement (e.g., InvalidRefinementError), the exception would abort the v...
Opengraph URL: https://github.com/liquid-java/liquidjava/pull/150
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:2b0c1aa2-ecf6-f778-d963-e34e1b4ddcec |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AD8E:19A9CE:677B49:93610E:6A631367 |
| html-safe-nonce | 01c5709cc3570c1a633e894790f0842c5f858adcf67220c70b0a3d83da66dee2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDhFOjE5QTlDRTo2NzdCNDk6OTM2MTBFOjZBNjMxMzY3IiwidmlzaXRvcl9pZCI6IjM2MDg2NDQ0Njc3OTk1NDAyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9f963f59dab412bd09626cb140f813cd4c1a5eb8f8cd4072fa813aa16835e43a |
| hovercard-subject-tag | pull_request:3284818240 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/liquid-java/liquidjava/pull/150/files |
| twitter:image | https://avatars.githubusercontent.com/u/76919550?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/76919550?s=400&v=4 |
| og:image:alt | This PR fixes an issue where when a class had multiple methods and one method would throw an error related to a parametric refinement (e.g., InvalidRefinementError), the exception would abort the v... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1a6c056e02f174fffc096c521ec0ff6fb83e40a2ec8cb8875466ec1524872dd6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/liquid-java/liquidjava git https://github.com/liquid-java/liquidjava.git |
| octolytics-dimension-user_id | 242831829 |
| octolytics-dimension-user_login | liquid-java |
| octolytics-dimension-repository_id | 258218369 |
| octolytics-dimension-repository_nwo | liquid-java/liquidjava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 258218369 |
| octolytics-dimension-repository_network_root_nwo | liquid-java/liquidjava |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6a93e25585f487ddff9e3996c06d5b869d6e1828 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width