Bug 1020312 - antlr-maven-plugin: NPE during grammar processing
Summary: antlr-maven-plugin: NPE during grammar processing
Alias: None
Product: Fedora
Classification: Fedora
Component: antlr-maven-plugin
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2013-10-17 12:23 UTC by Michal Srb
Modified: 2013-11-10 07:36 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2013-10-29 03:43:53 UTC

Attachments (Terms of Use)
grammar file (2.76 KB, text/x-csrc)
2013-10-17 12:23 UTC, Michal Srb
no flags Details
POM file (1.21 KB, text/xml)
2013-10-17 12:24 UTC, Michal Srb
no flags Details
proposed patch (3.56 KB, patch)
2013-10-17 12:25 UTC, Michal Srb
no flags Details | Diff

Description Michal Srb 2013-10-17 12:23:43 UTC
Created attachment 813291 [details]
grammar file

Description of problem:

antlr-maven-plugin throws NullPointerException during processing of the attached grammar (labelExpr.g). This is a bug in upstream, reported in [1].

Version-Release number of selected component (if applicable):

[1]: https://jira.codehaus.org/browse/MANTLR-34

How reproducible:

Steps to Reproduce:
1. copy pom.xml and labelExpr.g to the same directory
2. run "mvn -X clean antlr:generate" or "mvn-local -X clean antlr:generate"

Actual results:
Caused by: java.lang.NullPointerException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.mojo.antlr.metadata.MetadataExtracter.intrepret(MetadataExtracter.java:242)
	... 25 more

Expected results:
antlr-maven-plugin successfully processes the grammar file and generated files are in target/generated-sources/antlr/hudson/model/labels/*

Additional info:
Previous version 2.1 antlr-maven-plugin works fine. Proposed patch fixes the problem for me.

Comment 1 Michal Srb 2013-10-17 12:24:41 UTC
Created attachment 813292 [details]
POM file

Comment 2 Michal Srb 2013-10-17 12:25:30 UTC
Created attachment 813293 [details]
proposed patch

Comment 3 Fedora Update System 2013-10-18 23:28:47 UTC
antlr-maven-plugin-2.2-12.fc19 has been submitted as an update for Fedora 19.

Comment 4 Fedora Update System 2013-10-18 23:28:56 UTC
antlr-maven-plugin-2.2-12.fc20 has been submitted as an update for Fedora 20.

Comment 5 Fedora Update System 2013-10-19 09:07:54 UTC
Package antlr-maven-plugin-2.2-12.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing antlr-maven-plugin-2.2-12.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-10-29 03:43:53 UTC
antlr-maven-plugin-2.2-12.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2013-11-10 07:36:49 UTC
antlr-maven-plugin-2.2-12.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.