Skip to content

Commit cc5d66e

Browse files
authored
Restored AbstractConfigurationTest.java
1 parent 3810fae commit cc5d66e

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/AbstractConfigurationTest.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,30 +79,17 @@ public void setup() {
7979
rootLogger.getAttributes().put("level", "INFO");
8080
loggers.getChildren().add(rootLogger);
8181

82-
// Add Properties Node only if the map is not null and has entries
83-
if (map != null && !map.isEmpty()) {
82+
if (map != null) {
8483
final Node properties = newNode(rootNode, "Properties");
8584
rootNode.getChildren().add(properties);
8685

8786
for (final Entry<String, String> entry : map.entrySet()) {
88-
// Create Property node with "name" and "value" attributes
8987
final Node property = newNode(properties, "Property");
9088
property.getAttributes().put("name", entry.getKey());
9189
property.getAttributes().put("value", entry.getValue());
9290
properties.getChildren().add(property);
9391
}
9492
}
95-
96-
// Add a Scripts Node if required (Example for flexibility in testing)
97-
final Node scripts = newNode(rootNode, "Scripts");
98-
rootNode.getChildren().add(scripts);
99-
100-
// Add sample script node for testing purposes
101-
final Node script = newNode(scripts, "Script");
102-
script.getAttributes().put("name", "TestScript");
103-
script.getAttributes().put("language", "JavaScript");
104-
script.getAttributes().put("scriptText", "print('Hello, Log4j!');");
105-
scripts.getChildren().add(script);
10693
}
10794

10895
private Node newNode(final Node parent, final String name) {

0 commit comments

Comments
 (0)