This is an automated email from the ASF dual-hosted git repository.

pkarwasz pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/2.x by this push:
     new c3e7326113 Prepare for formatting of all files
c3e7326113 is described below

commit c3e7326113ed61be029184aea416403c8bf3f688
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Wed Apr 19 17:04:18 2023 +0200

    Prepare for formatting of all files
    
    Sometimes Spotless will not detect that a header already exists, e.g. if
    it is after a package declaration.
---
 .../src/main/java/org/apache/log4j/Hierarchy.java          |  7 +++----
 .../src/test/resources/config-1.2/log4j-capitalization.xml |  4 ++--
 .../test/resources/log4j1-1.2.17/input/xml/DOMTest4.xml    |  8 ++++----
 .../test/resources/log4j1-1.2.17/input/xml/DOMTest4_A1.xml | 14 +++++++-------
 .../test/resources/log4j1-1.2.17/input/xml/DOMTest4_A2.xml | 14 +++++++-------
 .../resources/log4j1-1.2.17/input/xml/categoryfactory1.xml |  4 ++--
 .../resources/log4j1-1.2.17/input/xml/categoryfactory2.xml |  4 ++--
 .../resources/log4j1-1.2.17/input/xml/customLevel1.xml     |  4 ++--
 .../resources/log4j1-1.2.17/input/xml/customLevel2.xml     |  4 ++--
 .../resources/log4j1-1.2.17/input/xml/customLevel3.xml     |  4 ++--
 .../resources/log4j1-1.2.17/input/xml/customLevel4.xml     |  4 ++--
 .../resources/log4j1-1.2.17/input/xml/customLogger1.xml    |  4 ++--
 .../resources/log4j1-1.2.17/input/xml/customLogger2.xml    |  4 ++--
 .../resources/log4j1-1.2.17/input/xml/customLogger3.xml    |  4 ++--
 .../test/resources/log4j1-1.2.17/input/xml/defaultInit.xml |  2 +-
 .../test/resources/log4j1-1.2.17/input/xml/fallback1.xml   |  2 +-
 .../resources/log4j1-1.2.17/input/xml/loggerfactory1.xml   |  4 ++--
 .../resources/log4j1-1.2.17/input/xml/smtpAppender1.xml    |  2 +-
 .../log4j1-1.2.17/input/xml/throwableRenderer1.xml         |  2 +-
 .../apache/logging/log4j/core/config/LoggerConfigTest.java |  3 ++-
 .../org/apache/logging/log4j/core/config/PropertyTest.java |  3 ++-
 .../logging/log4j/core/filter/AbstractFilterTest.java      |  4 ++--
 .../log4j/core/layout/AbstractStringLayoutTest.java        |  5 +++--
 .../log4j/core/layout/StringBuilderEncoderTest.java        |  5 +++--
 .../core/net/ssl/EnvironmentPasswordProviderTest.java      |  5 +++--
 .../log4j/core/net/ssl/FilePasswordProviderTest.java       |  3 ++-
 .../log4j/core/net/ssl/MemoryPasswordProviderTest.java     |  3 ++-
 log4j-core-test/src/test/resources/InvalidXML.xml          |  2 +-
 28 files changed, 67 insertions(+), 61 deletions(-)

diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/Hierarchy.java 
b/log4j-1.2-api/src/main/java/org/apache/log4j/Hierarchy.java
index 203a680961..f4721907d4 100644
--- a/log4j-1.2-api/src/main/java/org/apache/log4j/Hierarchy.java
+++ b/log4j-1.2-api/src/main/java/org/apache/log4j/Hierarchy.java
@@ -15,10 +15,6 @@
  * limitations under the License.
  */
 
-// WARNING This class MUST not have references to the Category or
-// WARNING RootCategory classes in its static initialization neither
-// WARNING directly nor indirectly.
-
 package org.apache.log4j;
 
 import java.util.Enumeration;
@@ -44,6 +40,9 @@ import org.apache.logging.log4j.spi.AbstractLoggerAdapter;
 import org.apache.logging.log4j.spi.LoggerContext;
 import org.apache.logging.log4j.util.StackLocatorUtil;
 
+// WARNING This class MUST not have references to the Category or
+// WARNING RootCategory classes in its static initialization neither
+// WARNING directly nor indirectly.
 /**
  * This class is specialized in retrieving loggers by name and also 
maintaining the logger hierarchy.
  *
diff --git 
a/log4j-1.2-api/src/test/resources/config-1.2/log4j-capitalization.xml 
b/log4j-1.2-api/src/test/resources/config-1.2/log4j-capitalization.xml
index c353fe09d8..825b918ab8 100644
--- a/log4j-1.2-api/src/test/resources/config-1.2/log4j-capitalization.xml
+++ b/log4j-1.2-api/src/test/resources/config-1.2/log4j-capitalization.xml
@@ -1,4 +1,3 @@
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
@@ -15,6 +14,7 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";>
   <appender name="ConsoleCapitalized" class="org.apache.log4j.ConsoleAppender">
     <param name="Encoding" value="ISO-8859-1" />
@@ -41,4 +41,4 @@
     <appender-ref ref="ConsoleCapitalized" />
     <appender-ref ref="ConsoleJavaStyle" />
   </root>
-</log4j:configuration>
\ No newline at end of file
+</log4j:configuration>
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/DOMTest4.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/DOMTest4.xml
index b4535e2d0d..a16fc28c38 100644
--- a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/DOMTest4.xml
+++ b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/DOMTest4.xml
@@ -1,8 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration  SYSTEM "log4j.dtd" [
-<!ENTITY a1 SYSTEM 'DOMTest4_A1.xml'>
-<!ENTITY a2 SYSTEM 'DOMTest4_A2.xml'>
-]>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -19,6 +15,10 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!DOCTYPE log4j:configuration  SYSTEM "log4j.dtd" [
+<!ENTITY a1 SYSTEM 'DOMTest4_A1.xml'>
+<!ENTITY a2 SYSTEM 'DOMTest4_A2.xml'>
+]>
 <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
   &a1;
   &a2;
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/DOMTest4_A1.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/DOMTest4_A1.xml
index 9b945e60aa..2206d0fc17 100644
--- a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/DOMTest4_A1.xml
+++ b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/DOMTest4_A1.xml
@@ -14,12 +14,12 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-  <appender name="A1" class="org.apache.log4j.FileAppender">
+<appender name="A1" class="org.apache.log4j.FileAppender">
 
-    <param name="File"   value="output/temp.A1.4" />
-    <param name="Append" value="false" />
+  <param name="File"   value="output/temp.A1.4" />
+  <param name="Append" value="false" />
 
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%-5p %c{2} - %m%n"/>
-    </layout>
-  </appender>
+  <layout class="org.apache.log4j.PatternLayout">
+    <param name="ConversionPattern" value="%-5p %c{2} - %m%n"/>
+  </layout>
+</appender>
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/DOMTest4_A2.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/DOMTest4_A2.xml
index e5e26c0248..51c5491919 100644
--- a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/DOMTest4_A2.xml
+++ b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/DOMTest4_A2.xml
@@ -14,10 +14,10 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-  <appender name="A2" class="org.apache.log4j.FileAppender">
-    <param name="File" value="output/temp.A2.4" />
-    <param name="Append" value="false" />
-    <layout class="org.apache.log4j.TTCCLayout">
-      <param name="DateFormat" value="ISO8601" />
-    </layout>
-  </appender>
+<appender name="A2" class="org.apache.log4j.FileAppender">
+  <param name="File" value="output/temp.A2.4" />
+  <param name="Append" value="false" />
+  <layout class="org.apache.log4j.TTCCLayout">
+    <param name="DateFormat" value="ISO8601" />
+  </layout>
+</appender>
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/categoryfactory1.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/categoryfactory1.xml
index eba5a33181..e92d5707bd 100644
--- 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/categoryfactory1.xml
+++ 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/categoryfactory1.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration  SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!DOCTYPE log4j:configuration  SYSTEM "log4j.dtd">
 <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
 
   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
@@ -32,4 +32,4 @@
         <param name="additivity" value="false"/>
   </categoryFactory>
     
-</log4j:configuration>
\ No newline at end of file
+</log4j:configuration>
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/categoryfactory2.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/categoryfactory2.xml
index 9f48b1ee96..980c9ad38d 100644
--- 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/categoryfactory2.xml
+++ 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/categoryfactory2.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration  SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!DOCTYPE log4j:configuration  SYSTEM "log4j.dtd">
 <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
 
   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
@@ -35,4 +35,4 @@
         <param name="additivity" value="false"/>
   </categoryFactory>
     
-</log4j:configuration>
\ No newline at end of file
+</log4j:configuration>
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel1.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel1.xml
index 5c798d2229..3ccad23c2f 100644
--- a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel1.xml
+++ b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel1.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -17,6 +16,7 @@
   limitations under the License.
 -->
 
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
 
   <appender name="TEMP" class="org.apache.log4j.FileAppender">
@@ -32,4 +32,4 @@
     <level value="TRACE" class="org.apache.log4j.xml.XLevel"/>
     <appender-ref ref="TEMP" />
   </root>
-</log4j:configuration>
\ No newline at end of file
+</log4j:configuration>
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel2.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel2.xml
index 88735808cd..fb18de03cf 100644
--- a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel2.xml
+++ b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel2.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
                      debug="false">
 
@@ -38,4 +38,4 @@
     <appender-ref ref="TEMP" />
   </root>
 
-</log4j:configuration>
\ No newline at end of file
+</log4j:configuration>
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel3.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel3.xml
index f8c014ad90..8dc2b48f9a 100644
--- a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel3.xml
+++ b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel3.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
                      debug="false">
 
@@ -41,4 +41,4 @@
     <appender-ref ref="TEMP" />
   </root>
 
-</log4j:configuration>
\ No newline at end of file
+</log4j:configuration>
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel4.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel4.xml
index e1bd0ded9b..a3f38a2783 100644
--- a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel4.xml
+++ b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLevel4.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <log4j:configuration debug="true" 
                      xmlns:log4j='http://jakarta.apache.org/log4j/'>
 
@@ -32,4 +32,4 @@
     <level value="TRACE#org.apache.log4j.xml.XLevel"/>
     <appender-ref ref="TEMP" />
   </root>
-</log4j:configuration>
\ No newline at end of file
+</log4j:configuration>
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLogger1.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLogger1.xml
index 7ccb8bd1cc..163193793b 100644
--- a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLogger1.xml
+++ b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLogger1.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
                      debug="false">
   
@@ -32,4 +32,4 @@
     <level value ="TRACE" class="org.apache.log4j.xml.XLevel"/>
     <appender-ref ref="TEMP" />
   </root>
-</log4j:configuration>
\ No newline at end of file
+</log4j:configuration>
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLogger2.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLogger2.xml
index 7065aace82..210d7aeae7 100644
--- a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLogger2.xml
+++ b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLogger2.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
                      debug="true">
   
@@ -40,4 +40,4 @@
     <level value ="TRACE" class="org.apache.log4j.xml.XLevel"/>
     <appender-ref ref="TEMP" />
   </root>
-</log4j:configuration>
\ No newline at end of file
+</log4j:configuration>
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLogger3.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLogger3.xml
index 02c7e9f120..4464417fe3 100644
--- a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLogger3.xml
+++ b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/customLogger3.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
                      debug="true">
   
@@ -32,4 +32,4 @@
     <level value ="TRACE" class="org.apache.log4j.xml.XLevel"/>
     <appender-ref ref="TEMP" />
   </root>
-</log4j:configuration>
\ No newline at end of file
+</log4j:configuration>
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/defaultInit.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/defaultInit.xml
index 62da4c1759..8aaaeee24e 100644
--- a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/defaultInit.xml
+++ b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/defaultInit.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <log4j:configuration debug="true" 
xmlns:log4j="http://jakarta.apache.org/log4j/";>
 
   <appender name="D1" class="org.apache.log4j.ConsoleAppender">
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/fallback1.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/fallback1.xml
index dc542dffe5..ec54b4b60d 100644
--- a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/fallback1.xml
+++ b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/fallback1.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <log4j:configuration debug="true" 
xmlns:log4j="http://jakarta.apache.org/log4j/";>
 
 
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/loggerfactory1.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/loggerfactory1.xml
index 467245002a..2328077748 100644
--- 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/loggerfactory1.xml
+++ 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/loggerfactory1.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration  SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!DOCTYPE log4j:configuration  SYSTEM "log4j.dtd">
 <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
 
   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
@@ -32,4 +32,4 @@
         <param name="additivity" value="false"/>
   </loggerFactory>
     
-</log4j:configuration>
\ No newline at end of file
+</log4j:configuration>
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/smtpAppender1.xml 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/smtpAppender1.xml
index 1df1a91466..0e4a5a51ff 100644
--- a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/smtpAppender1.xml
+++ b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/smtpAppender1.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";>
   <appender name="A1" class="org.apache.log4j.net.SMTPAppender">
 
diff --git 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/throwableRenderer1.xml
 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/throwableRenderer1.xml
index 2496870e0a..85b2905941 100644
--- 
a/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/throwableRenderer1.xml
+++ 
b/log4j-1.2-api/src/test/resources/log4j1-1.2.17/input/xml/throwableRenderer1.xml
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -17,6 +16,7 @@
   limitations under the License.
 -->
 
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
 
     <throwableRenderer 
class="org.apache.log4j.xml.DOMTestCase$MockThrowableRenderer">
diff --git 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/LoggerConfigTest.java
 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/LoggerConfigTest.java
index 200aa6f892..3bf2a14009 100644
--- 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/LoggerConfigTest.java
+++ 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/LoggerConfigTest.java
@@ -1,4 +1,4 @@
-package org.apache.logging.log4j.core.config;/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -14,6 +14,7 @@ package org.apache.logging.log4j.core.config;/*
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
+package org.apache.logging.log4j.core.config;
 
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.core.impl.Log4jLogEvent.Builder;
diff --git 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/PropertyTest.java
 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/PropertyTest.java
index ceec5b239b..320ae8c8c1 100644
--- 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/PropertyTest.java
+++ 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/PropertyTest.java
@@ -1,4 +1,4 @@
-package org.apache.logging.log4j.core.config;/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -14,6 +14,7 @@ package org.apache.logging.log4j.core.config;/*
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
+package org.apache.logging.log4j.core.config;
 
 import java.util.List;
 
diff --git 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/filter/AbstractFilterTest.java
 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/filter/AbstractFilterTest.java
index b3688b4627..b952409ad7 100644
--- 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/filter/AbstractFilterTest.java
+++ 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/filter/AbstractFilterTest.java
@@ -1,4 +1,3 @@
-package org.apache.logging.log4j.core.filter;
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
@@ -15,6 +14,7 @@ package org.apache.logging.log4j.core.filter;
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
+package org.apache.logging.log4j.core.filter;
 
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.Marker;
@@ -85,4 +85,4 @@ public class AbstractFilterTest {
             return testResult;
         }
     }
-}
\ No newline at end of file
+}
diff --git 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/AbstractStringLayoutTest.java
 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/AbstractStringLayoutTest.java
index 0a7edf577d..c008a8fa74 100644
--- 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/AbstractStringLayoutTest.java
+++ 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/AbstractStringLayoutTest.java
@@ -1,4 +1,4 @@
-package org.apache.logging.log4j.core.layout;/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -14,6 +14,7 @@ package org.apache.logging.log4j.core.layout;/*
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
+package org.apache.logging.log4j.core.layout;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -96,4 +97,4 @@ public class AbstractStringLayoutTest {
             fail(e);
         }
     }
-}
\ No newline at end of file
+}
diff --git 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/StringBuilderEncoderTest.java
 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/StringBuilderEncoderTest.java
index 575f83819b..619735347f 100644
--- 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/StringBuilderEncoderTest.java
+++ 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/StringBuilderEncoderTest.java
@@ -1,4 +1,4 @@
-package org.apache.logging.log4j.core.layout;/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -14,6 +14,7 @@ package org.apache.logging.log4j.core.layout;/*
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
+package org.apache.logging.log4j.core.layout;
 
 import java.nio.CharBuffer;
 import java.nio.charset.Charset;
@@ -307,4 +308,4 @@ public class StringBuilderEncoderTest {
         }
         return result;
     }
-}
\ No newline at end of file
+}
diff --git 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/ssl/EnvironmentPasswordProviderTest.java
 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/ssl/EnvironmentPasswordProviderTest.java
index 61afab6efc..8822658b66 100644
--- 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/ssl/EnvironmentPasswordProviderTest.java
+++ 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/ssl/EnvironmentPasswordProviderTest.java
@@ -1,4 +1,4 @@
-package org.apache.logging.log4j.core.net.ssl;/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -14,6 +14,7 @@ package org.apache.logging.log4j.core.net.ssl;/*
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
+package org.apache.logging.log4j.core.net.ssl;
 
 import org.junit.jupiter.api.Test;
 
@@ -35,4 +36,4 @@ public class EnvironmentPasswordProviderTest {
         final char[] actual = new 
EnvironmentPasswordProvider("PATH").getPassword();
         assertArrayEquals(value.toCharArray(), actual);
     }
-}
\ No newline at end of file
+}
diff --git 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/ssl/FilePasswordProviderTest.java
 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/ssl/FilePasswordProviderTest.java
index cfe03cc256..91e9196dd0 100644
--- 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/ssl/FilePasswordProviderTest.java
+++ 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/ssl/FilePasswordProviderTest.java
@@ -1,4 +1,4 @@
-package org.apache.logging.log4j.core.net.ssl;/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -14,6 +14,7 @@ package org.apache.logging.log4j.core.net.ssl;/*
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
+package org.apache.logging.log4j.core.net.ssl;
 
 import java.nio.charset.Charset;
 import java.nio.file.Files;
diff --git 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/ssl/MemoryPasswordProviderTest.java
 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/ssl/MemoryPasswordProviderTest.java
index be9d27c296..753c3634e6 100644
--- 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/ssl/MemoryPasswordProviderTest.java
+++ 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/net/ssl/MemoryPasswordProviderTest.java
@@ -1,4 +1,4 @@
-package org.apache.logging.log4j.core.net.ssl;/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -14,6 +14,7 @@ package org.apache.logging.log4j.core.net.ssl;/*
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
+package org.apache.logging.log4j.core.net.ssl;
 
 import java.util.Arrays;
 
diff --git a/log4j-core-test/src/test/resources/InvalidXML.xml 
b/log4j-core-test/src/test/resources/InvalidXML.xml
index 526677096f..b92863932e 100644
--- a/log4j-core-test/src/test/resources/InvalidXML.xml
+++ b/log4j-core-test/src/test/resources/InvalidXML.xml
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-Configuration status="OFF">
+<Configuration status="OFF"
   <Appenders>
     <Console name="Console" target="SYSTEM_OUT">
       <PatternLayout pattern="%d [%t] %-5level: %msg%n%throwable" />

Reply via email to