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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to