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

ASF GitHub Bot commented on CXFXJC-14:
--------------------------------------

GitHub user lauroschuck opened a pull request:

    https://github.com/apache/cxf-xjc-utils/pull/3

    [CXFXJC-14] Anonymous enum simpleType causes NPE

    When I tried to use the Javadoc plugin on a certain XSD, it failed with a 
NPE. It is caused by a null TypeName object when trying to verify custom 
bindings for enums. A test case is included with example files, and the fix.
    
    Link for this bug on JIRA: https://issues.apache.org/jira/browse/CXFXJC-14

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lauroschuck/cxf-xjc-utils 
anonymous-enum-npe-fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cxf-xjc-utils/pull/3.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3
    
----
commit c893bee8ad53f8076f1161e169120850c3713412
Author: Lauro Schuck <[email protected]>
Date:   2015-10-21T23:35:54Z

    Added failing test for NPE issue

commit 562c3355b489a95f0539ace5e1f6b937dfb9cafa
Author: Lauro Schuck <[email protected]>
Date:   2015-10-21T23:41:20Z

    Fixing NPE caused by null enum TypeName

----


> Anonymous enum simpleType causes NPE
> ------------------------------------
>
>                 Key: CXFXJC-14
>                 URL: https://issues.apache.org/jira/browse/CXFXJC-14
>             Project: CXF XJC Utils
>          Issue Type: Bug
>          Components: Maven Plugin
>    Affects Versions: 3.0.5
>            Reporter: Lauro Schuck
>
> The Javadoc plugin fails with a NullPointerException when trying to verify 
> the presence of custom bindings on anonymous xsd:simpleType for enums:
> {noformat}
> java.lang.NullPointerException: null
>       at 
> org.apache.cxf.xjc.javadoc.JavadocInserter.isCustomBindingApplied(JavadocInserter.java:91)
>       at 
> org.apache.cxf.xjc.javadoc.JavadocInserter.addJavadoc(JavadocInserter.java:78)
>       at 
> org.apache.cxf.xjc.javadoc.JavadocInserter.addJavadocsToEnums(JavadocInserter.java:73)
>       at 
> org.apache.cxf.xjc.javadoc.JavadocInserter.addJavadocs(JavadocInserter.java:51)
>       at org.apache.cxf.xjc.javadoc.JavadocPlugin.run(JavadocPlugin.java:61)
> {noformat}



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

Reply via email to