Bug 724190 (BRMS-133)

Summary: NPE when building imported drl package
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Jaroslaw Kijanowski <kijanowski>
Component: BRM (Guvnor)Assignee: Toni Rikkola <toni>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: high    
Version: 5.0.0 GA   
Target Milestone: ---   
Target Release: 5.0.1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/BRMS-133
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-28 13:25:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jaroslaw Kijanowski 2009-06-01 09:56:30 UTC
Date of First Response: 2009-09-11 03:27:37
securitylevel_name: Public

Comment 1 Jaroslaw Kijanowski 2009-06-01 09:56:51 UTC
Link: Added: This issue depends GUVNOR-327


Comment 2 Jaroslaw Kijanowski 2009-08-28 13:25:01 UTC
Verified in 5.0.1 CR1

Comment 3 Dana Mison 2009-09-11 07:27:37 UTC
Please confirm the following for the Release Notes documentation and fill in the missing information.  (CAUSE & FIX)

Dot point explanations are fine:

The CAUSE (what was actually broken)
 * 

CONSEQUENCES of the bug (how users might have encountered it)
 * If whitespace characters (such as tabs or spaces) were the only content of the first line after the package declaration in an imported DRL file, the resulting package would fail to build. 
 * The DRL file would import without error but attempting to build the package would fail and present an error message.

The FIX (what was changed to eliminate this bug)
 *

RESULTS of the fix (what now happens for users)
 * Packages created by importing these DRL files will now build without error.

Comment 4 Jaroslaw Kijanowski 2009-09-11 11:02:08 UTC
Assigning this to Toni since he has fixed this bug and may answer these questions

Comment 5 Toni Rikkola 2009-09-15 09:17:22 UTC
The CAUSE (what was actually broken)
 * Package header contained whitespace characters and the parser was trying to find imports, templates or globals.

CONSEQUENCES of the bug (how users might have encountered it)
 * If whitespace characters (such as tabs or spaces) were the only content of the first line after the package declaration in an imported DRL file, the resulting package would fail to build.
 * If the drools.package file was changed and uploaded using WebDAV or file uploader in Guvnor and the file after this contained only whitespace characters, the package would fail to build. 

The FIX (what was changed to eliminate this bug)
 * Whitespaces are removed before the parser tries to parse. Empty header causes no problems.

RESULTS of the fix (what now happens for users)
 * Packages with whitespaces in the header file (drools.package) will now build without error. 


Comment 6 Dana Mison 2009-09-16 07:06:44 UTC
Thanks for the clarification :-)