Skip to content

Commit

Permalink
Avoid EmptyStackException due to simple typo: declare foo ; int end
Browse files Browse the repository at this point in the history
  • Loading branch information
wlaun authored and mdproctor committed May 26, 2011
1 parent e2af0de commit c96e3a2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drools-compiler/src/main/java/org/drools/lang/DRLParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,15 @@ public TypeDeclarationDescr declare() throws RecognitionException {
*/
private void field( DeclareDescrBuilder declare ) {
FieldDescrBuilder field = null;
String fname = null;
try {
String fname = label( DroolsEditorType.IDENTIFIER );
fname = label( DroolsEditorType.IDENTIFIER );
if ( state.failed ) return;

} catch ( RecognitionException re ) {
reportError( re );
}

try {
field = helper.start( FieldDescrBuilder.class,
fname,
null );
Expand Down

0 comments on commit c96e3a2

Please sign in to comment.