You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "pingpingy1 (via GitHub)" <gi...@apache.org> on 2024/03/19 08:35:50 UTC
[PR] Add null guard for InstructionFactor.createInvoke [commons-bcel]
pingpingy1 opened a new pull request, #289:
URL: https://github.com/apache/commons-bcel/pull/289
In the current implementation of the `createInvoke` method, an NPE is thrown if the `argTypes` array is `null`. This commit adds a null guard that skips the for loop if this is the case.
Example:
```java
public static void main(String args[]) {
InstructionFactory factory= new InstructionFactory(new ClassGen(Repository.lookupClass(Object.class)));
factory.createInvoke("", "", Type.VOID, null, Const.INVOKESPECIAL, false);
}
```
```console
Exception in thread "main" java.lang.NullPointerException
at org.apache.bcel.generic.InstructionFactory.createInvoke(InstructionFactory.java:643)
at Test.main(Test.java:11)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add null guard for InstructionFactor.createInvoke [commons-bcel]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #289:
URL: https://github.com/apache/commons-bcel/pull/289#issuecomment-2028859917
## [Codecov](https://app.codecov.io/gh/apache/commons-bcel/pull/289?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 65.12%. Comparing base [(`f32c53c`)](https://app.codecov.io/gh/apache/commons-bcel/commit/f32c53cd1690d5cc4edf5e1939ec0e438e94f140?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`54278ee`)](https://app.codecov.io/gh/apache/commons-bcel/pull/289?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 48 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #289 +/- ##
============================================
+ Coverage 65.10% 65.12% +0.01%
- Complexity 3893 3895 +2
============================================
Files 364 364
Lines 15657 15657
Branches 1956 1957 +1
============================================
+ Hits 10194 10196 +2
+ Misses 4549 4548 -1
+ Partials 914 913 -1
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/commons-bcel/pull/289?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add null guard for InstructionFactory.createInvoke() [commons-bcel]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #289:
URL: https://github.com/apache/commons-bcel/pull/289#issuecomment-2029931534
@pingpingy1
TY for your PR; merged!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add null guard for InstructionFactory.createInvoke() [commons-bcel]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory merged PR #289:
URL: https://github.com/apache/commons-bcel/pull/289
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org