maartenc commented on code in PR #124:
URL: https://github.com/apache/ant-ivy/pull/124#discussion_r3438562290
##########
src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java:
##########
@@ -1284,9 +1288,14 @@ public void comment(char[] ch, int start, int length)
throws SAXException {
justOpen = null;
}
- write("<!--");
- write(String.valueOf(ch, start, length));
- write("-->");
+ if (options.isMerge()
+ && !mergedDependencies
+ && "ivy-module/dependencies".equals(getContext())) {
+ ModuleDescriptor merged = options.getMergedDescriptor();
+ writeInheritedDependencies(merged);
+ }
+
+ write(new StringBuilder("<!--").append(ch, start,
length).append("-->").toString());
Review Comment:
why this StringBuilder?
is the original code has an issue?
##########
src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java:
##########
@@ -1284,9 +1288,14 @@ public void comment(char[] ch, int start, int length)
throws SAXException {
justOpen = null;
}
- write("<!--");
- write(String.valueOf(ch, start, length));
- write("-->");
+ if (options.isMerge()
+ && !mergedDependencies
+ && "ivy-module/dependencies".equals(getContext())) {
+ ModuleDescriptor merged = options.getMergedDescriptor();
+ writeInheritedDependencies(merged);
+ }
+
+ write(new StringBuilder("<!--").append(ch, start,
length).append("-->").toString());
Review Comment:
why this StringBuilder?
does the original code has an issue?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]