[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2669) NullPointerException when empty byte array resource is added to KnowledgeBuilder

Mark Proctor (JIRA) jira-events at lists.jboss.org
Tue May 17 23:08:00 EDT 2011


    [ https://issues.jboss.org/browse/JBRULES-2669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602775#comment-12602775 ] 

Mark Proctor commented on JBRULES-2669:
---------------------------------------

it now throws an IllegalArgumentException if byte == null or byte.length == 0

> NullPointerException when empty byte array resource is added to KnowledgeBuilder
> --------------------------------------------------------------------------------
>
>                 Key: JBRULES-2669
>                 URL: https://issues.jboss.org/browse/JBRULES-2669
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 5.1.0.FINAL
>            Reporter: Samuli Saarinen
>            Assignee: Mark Proctor
>
> Following code produces the NPE
> {code:java}
> @Test
> public void testEmptyByteResource() throws Exception {
> 	KnowledgeBuilder builder = KnowledgeBuilderFactory.newKnowledgeBuilder();
> 	builder.add(ResourceFactory.newByteArrayResource(new byte[0]), ResourceType.DRL);
> }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list