You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2016/07/14 19:57:20 UTC

[jira] [Commented] (UIMA-4618) jcasgen maven plugin reports only NPE for reserved feature name

    [ https://issues.apache.org/jira/browse/UIMA-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15378250#comment-15378250 ] 

Marshall Schor commented on UIMA-4618:
--------------------------------------

anyone got a test case for this?

The code in JCasGen core checks against a table of reservedFeatureNames (see lines 118-121 in uima-tools project, in src/main/javajet/jcasgen/templates/JCasType.javajet).  Here's that code snip:
{code}
	 if (Jg.reservedFeatureNames.contains(featUName))
	   jg.error.newError(IError.ERROR, 
		 jg.getString("reservedNameUsed", new Object[] { featName, td.getName() }),
		 null);
{code}

So I guess the Maven JCasGen plugin (which has code to handle errors) is not handling the returned error, but instead throwing a NPE.


> jcasgen maven plugin reports only NPE for reserved feature name
> ---------------------------------------------------------------
>
>                 Key: UIMA-4618
>                 URL: https://issues.apache.org/jira/browse/UIMA-4618
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework, jcasgen-maven-plugin
>    Affects Versions: 2.8.1SDK
>            Reporter: Peter Klügl
>            Priority: Minor
>             Fix For: 2.8.2SDK
>
>
> When the maven plugin is applied on a type system that contains a type that sepcifies a feature with a reserved name, e.g., type or address, then only an NPE is thrown without any indicator what went wrong (with the default logging settings). Some error message/logging in the default use case could save some time searching for the problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)