diff --git a/src/main/java/io/openliberty/tools/common/plugins/config/ApplicationMonitorConfigXmlDocument.java b/src/main/java/io/openliberty/tools/common/plugins/config/ApplicationMonitorConfigXmlDocument.java index 0d040096..e8fa826e 100644 --- a/src/main/java/io/openliberty/tools/common/plugins/config/ApplicationMonitorConfigXmlDocument.java +++ b/src/main/java/io/openliberty/tools/common/plugins/config/ApplicationMonitorConfigXmlDocument.java @@ -40,8 +40,8 @@ public void writeAppMonitorConfigXmlDocument(File serverDirectory) throws IOExce } ServerConfigXmlDocument configDocument = ServerConfigXmlDocument.newInstance(); - configDocument.createGeneratedComment(tool); - configDocument.createServerElement("applicationMonitor", attributes);; + configDocument.createGeneratedByComment(tool); + configDocument.createServerElementWithAttributes("applicationMonitor", attributes); configDocument.writeXMLDocument(appMonXml); } diff --git a/src/main/java/io/openliberty/tools/common/plugins/config/ServerConfigXmlDocument.java b/src/main/java/io/openliberty/tools/common/plugins/config/ServerConfigXmlDocument.java index b60acc58..db01a136 100644 --- a/src/main/java/io/openliberty/tools/common/plugins/config/ServerConfigXmlDocument.java +++ b/src/main/java/io/openliberty/tools/common/plugins/config/ServerConfigXmlDocument.java @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corporation 2019, 2022. + * (C) Copyright IBM Corporation 2019, 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,7 +81,7 @@ public void createComment(Element elem, String comment) { * Creates comment "# Generated by liberty-{}-plugin", * @param tool - Which tool, maven or gradle, is generating the comment */ - public void createGeneratedComment(String tool) { + public void createGeneratedByComment(String tool) { String comment = String.format(HEADER, tool); createComment(comment); } @@ -156,7 +156,7 @@ public boolean removeFMComment(String comment) { * @param elementName - name of the element, ie: * @param attributes - HashMap of the */ - public void createServerElement(String elementName, HashMap attributes) { + public void createServerElementWithAttributes(String elementName, HashMap attributes) { Element element = doc.createElement(elementName); for (String attributeString : attributes.keySet()) { element.setAttribute(attributeString, attributes.get(attributeString));