[jboss-jira] [JBoss JIRA] (JBRULES-3366) When adding resources using both MVEL and Java dialects the JavaDialect constructor fails when dialectData is found and stored.
Alan Zall (JIRA)
jira-events at lists.jboss.org
Tue Apr 3 10:56:47 EDT 2012
[ https://issues.jboss.org/browse/JBRULES-3366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681327#comment-12681327 ]
Alan Zall commented on JBRULES-3366:
------------------------------------
It requires two uses of java and one or more mvel. The second time into the PackageStore constructor, " pkg.getDialectRuntimeRegistry().getDialectData( ID )" does not return null so "data" is set and is still null from the initialization. This causes the NullPointerException when creating the wrapper.
> When adding resources using both MVEL and Java dialects the JavaDialect constructor fails when dialectData is found and stored.
> -------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBRULES-3366
> URL: https://issues.jboss.org/browse/JBRULES-3366
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-compiler
> Affects Versions: 5.3.1.Final
> Environment: Linux
> Reporter: Alan Zall
> Assignee: Mario Fusco
>
> In the constructor of JavaDialect, if pkg.getDialectRuntimeRegistry().getDialectData( ID ) returns a non null value, then a null is passed into the PackageStore constructor.
> if ( pkg.getDialectRuntimeRegistry().getDialectData( ID ) == null ) {
> data = new JavaDialectRuntimeData();
> this.pkg.getDialectRuntimeRegistry().setDialectData( ID,
> data );
> data.onAdd( this.pkg.getDialectRuntimeRegistry(),
> this.packageBuilder.getRootClassLoader() );
> }
> this.packageStoreWrapper = new PackageStore( data,
> this.results );
> is fixed by:
> if (( data = (JavaDialectRuntimeData) pkg.getDialectRuntimeRegistry().getDialectData( ID )) == null ) {
> data = new JavaDialectRuntimeData();
> this.pkg.getDialectRuntimeRegistry().setDialectData( ID,
> data );
> data.onAdd( this.pkg.getDialectRuntimeRegistry(),
> this.packageBuilder.getRootClassLoader() );
> }
> this.packageStoreWrapper = new PackageStore( data, this.results );
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list