[Jersey-issues] [JIRA] Commented: (JERSEY-1732) ResourceDoclet silently does not generate paramDoc elements is resourcedoc.xml when number of params not matching number of paramTags

  • From: "najmi (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [Jersey-issues] [JIRA] Commented: (JERSEY-1732) ResourceDoclet silently does not generate paramDoc elements is resourcedoc.xml when number of params not matching number of paramTags
  • Date: Fri, 15 Feb 2013 15:54:53 +0000 (GMT+00:00)
  • Auto-submitted: auto-generated


    [ 
http://java.net/jira/browse/JERSEY-1732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=356200#action_356200
 ] 

najmi commented on JERSEY-1732:
-------------------------------

The following is a patch for a proposed fix. It must be applied while in 
.../jersey/contribs/wadl-resourcedoc-doclet directory.

Index: src/main/java/com/sun/jersey/wadl/resourcedoc/ResourceDoclet.java
===================================================================
--- src/main/java/com/sun/jersey/wadl/resourcedoc/ResourceDoclet.java   
(revision 5478)
+++ src/main/java/com/sun/jersey/wadl/resourcedoc/ResourceDoclet.java   
(working copy)
@@ -454,8 +454,11 @@
         /* only use both javadoc and reflection information when the number
          * of params are the same
          */
-        if ( parameters != null && paramTags != null
-                && parameters.length == paramTags.length ) {
+        if ( parameters != null && paramTags != null) {
+            if (parameters.length != paramTags.length ) {
+                LOG.warning("The method parameters must match @param tags in 
order and number. No param docs being generated for method: " + 
methodDoc.qualifiedName());
+                return;
+            }
             
             for ( int i = 0; i < parameters.length; i++ ) {
                 final Parameter parameter = parameters[i];

> ResourceDoclet silently does not generate paramDoc elements is 
> resourcedoc.xml when number of params not matching number of paramTags
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JERSEY-1732
>                 URL: http://java.net/jira/browse/JERSEY-1732
>             Project: jersey
>          Issue Type: Bug
>          Components: extensions
>    Affects Versions: 1.10
>            Reporter: najmi
>            Priority: Minor
>
> The com.sun.jersey.wadl.resourcedoc.ResourceDoclet class silently does not 
> generate paramDoc elements is resourcedoc.xml when number of params not 
> matching number of paramTags. Since no warning is emitted user has no idea 
> what is wrong. Proposed fix is to emit a clear warning in such cases.
> For details see:
> http://java.net/projects/jersey/lists/users/archive/2013-02/message/32

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Jersey-issues] [JIRA] Created: (JERSEY-1732) ResourceDoclet silently does not generate paramDoc elements is resourcedoc.xml when number of params not matching number of paramTags

najmi (JIRA) 02/15/2013

[Jersey-issues] [JIRA] Issue Comment Edited: (JERSEY-1732) ResourceDoclet silently does not generate paramDoc elements is resourcedoc.xml when number of params not matching number of paramTags

najmi (JIRA) 02/15/2013

[Jersey-issues] [JIRA] Commented: (JERSEY-1732) ResourceDoclet silently does not generate paramDoc elements is resourcedoc.xml when number of params not matching number of paramTags

najmi (JIRA) 02/15/2013

[Jersey-issues] [JIRA] Updated: (JERSEY-1732) ResourceDoclet silently does not generate paramDoc elements is resourcedoc.xml when number of params not matching number of paramTags

Marek Potociar (JIRA) 02/20/2013
Terms of Use; Privacy Policy; Copyright ©2013-2017 (revision 20160708.bf2ac18)
 
 
Close
loading
Please Confirm
Close