[
https://issues.apache.org/jira/browse/ARIES-1988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17143552#comment-17143552
]
ackelcn commented on ARIES-1988:
--------------------------------
Many thanks for the feedbacks. Woud you please explain which cases need these
comments?
> 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)