aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ackelcn (Jira)" <j...@apache.org>
Subject [jira] [Commented] (ARIES-1988) Code comment with issue numbers
Date Wed, 24 Jun 2020 04:56:00 GMT

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

ackelcn commented on ARIES-1988:
--------------------------------

I created this pull request to highlight the new comments:

https://github.com/apache/aries/pull/109

> Code comment with issue numbers
> -------------------------------
>
>                 Key: ARIES-1988
>                 URL: https://issues.apache.org/jira/browse/ARIES-1988
>             Project: Aries
>          Issue Type: Improvement
>            Reporter: ackelcn
>            Priority: Major
>
> When I read the code of aries, I find some comments with issue numbers. One of them comes
from AbstractServiceRegistryContext.java:
> {code:java}
> public AbstractServiceRegistryContext(BundleContext callerContext, Hashtable<?, ?>
environment) {
>    ...
>    env.putAll((Map<? extends String, ? extends Object>) environment);
>         // ARIES-397:, If the caller has provided a BundleContext
>         // in the hashtable, use this in preference to callerContext
>         if (augmenterInvoker == null && callerContext != null) {
>             ServiceReference augmenterSR = callerContext.getServiceReference(AugmenterInvoker.class.getName());
>             if (augmenterSR != null) augmenterInvoker = (AugmenterInvoker) callerContext.getService(augmenterSR);
>         }
> }{code}
> These comments are quite useful for other programmers and me to understand the code,
but I notice that not all issue numbers are written in code comments. It can be already quite
tedious to write them into commit messages :)
>  
> To handle the problem, I implemented a tool to automatically instrument issue numbers
into code comments. I tried my tool on activemq, and the instrumented version is [https://github.com/ackelcn/aries] 
> [ |https://github.com/ackelcn/arieswithissuecomment]
> To avoid confusion, if there is already an issue number in code comments, my tool ignored
the issue number. All my generated comments start from //IC, so it is easy to find them.
>  
> Would you please some feedbacks to my tool? Please feel free to merge my generated comments
in your code, if you feel that some are useful.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message