aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ackelcn (Jira)" <j...@apache.org>
Subject [jira] [Created] (ARIES-1988) Code comment with issue numbers
Date Tue, 23 Jun 2020 06:33:00 GMT
ackelcn created ARIES-1988:
------------------------------

             Summary: Code comment with issue numbers
                 Key: ARIES-1988
                 URL: https://issues.apache.org/jira/browse/ARIES-1988
             Project: Aries
          Issue Type: Improvement
            Reporter: ackelcn


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/arieswithissuecomment] 

[ |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