[
https://issues.apache.org/jira/browse/THRIFT-681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12802457#action_12802457
]
John Bartak edited comment on THRIFT-681 at 1/19/10 8:38 PM:
-------------------------------------------------------------
The section from the .thrift file that generated the attached screenshot:
{code}
/**
* Changes a message's status
* @param personId the person changing the status
* @param messageId the message to change the status of
* @param newStatus the new status of the message
* @exception AccessDeniedException thrown if the person does not have
access to the message
*/
void UpdateMessageStatus(1:string personId,2:string
messageId,3:MessageData.Status newStatus) throws
(1:Shared.SocialException socialError,2:Shared.SocialDatabaseException
databaseError,3:Shared.BadRevisionException
revisionException,4:Shared.ResourceNotFoundException
notFoundException,5:Shared.AccessDeniedException accessError),
{code}
The Java compiler generates the following code from the above definition:
{code}
/**
* Changes a message's status
* @param personId the person changing the status
* @param messageId the message to change the status of
* @param newStatus the new status of the message
* @exception AccessDeniedException thrown if the person does not have
access to the message
*
* @param personId
* @param messageId
* @param newStatus
*/
public void UpdateMessageStatus(String personId, String messageId,
com.autodesk.social.serviceContracts.Message.Status newStatus)
throws com.autodesk.social.serviceContracts.SocialException,
com.autodesk.social.serviceContracts.SocialDatabaseException,
com.autodesk.social.serviceContracts.BadRevisionException,
com.autodesk.social.serviceContracts.ResourceNotFoundException,
com.autodesk.social.serviceContracts.AccessDeniedException, TException;
{code}
This isn't totally ideal since the parameters get duplicated -- but that seems
like more of an issue with the Java compiler.
was (Author: johnbartak):
The section from the .thrift file that generated the attached screenshot:
/**
\* Changes a message's status
\* @param personId the person changing the status
\* @param messageId the message to change the status of
\* @param newStatus the new status of the message
\* @exception AccessDeniedException thrown if the person does not have
access to the message
*/
void UpdateMessageStatus(1:string personId,2:string
messageId,3:MessageData.Status newStatus) throws(1:Shared.SocialException
socialError,2:Shared.SocialDatabaseException
databaseError,3:Shared.BadRevisionException
revisionException,4:Shared.ResourceNotFoundException
notFoundException,5:Shared.AccessDeniedException accessError),
The Java compiler generates the following code from the above definition:
/**
* Changes a message's status
* @param personId the person changing the status
* @param messageId the message to change the status of
* @param newStatus the new status of the message
* @exception AccessDeniedException thrown if the person does not have
access to the message
*
* @param personId
* @param messageId
* @param newStatus
*/
public void UpdateMessageStatus(String personId, String messageId,
com.autodesk.social.serviceContracts.Message.Status newStatus) throws
com.autodesk.social.serviceContracts.SocialException,
com.autodesk.social.serviceContracts.SocialDatabaseException,
com.autodesk.social.serviceContracts.BadRevisionException,
com.autodesk.social.serviceContracts.ResourceNotFoundException,
com.autodesk.social.serviceContracts.AccessDeniedException, TException;
> The HTML generator does not handle JavaDoc style comments very well
> -------------------------------------------------------------------
>
> Key: THRIFT-681
> URL: https://issues.apache.org/jira/browse/THRIFT-681
> Project: Thrift
> Issue Type: Improvement
> Affects Versions: 0.2
> Reporter: John Bartak
> Attachments: screenshot-1.jpg, t_html_generator_JavaDoc.patch
>
>
> If you create comments using the standard JavaDoc conventions of @param and
> @exception, the output that gets generated isn't the cleanest. It would be
> better if the list of parameters and exceptions were placed in a table with
> the appropriate headers rather than just outputting the @param and @exception
> tags into the HTML output.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.