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

elharo pushed a commit to branch utf8
in repository https://gitbox.apache.org/repos/asf/maven-archetype.git

commit 6cd25aa2c62e0e0fd1e667aa9d0b36f2d7e6f35d
Author: Elliotte Rusty Harold <elh...@ibiblio.org>
AuthorDate: Thu Jul 16 06:17:45 2020 -0400

    remove code to workaround Java 1.1 issues
---
 .../apache/maven/archetype/common/util/XMLOutputter.java  | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git 
a/archetype-common/src/main/java/org/apache/maven/archetype/common/util/XMLOutputter.java
 
b/archetype-common/src/main/java/org/apache/maven/archetype/common/util/XMLOutputter.java
index 6b9ca9a..ed21a13 100644
--- 
a/archetype-common/src/main/java/org/apache/maven/archetype/common/util/XMLOutputter.java
+++ 
b/archetype-common/src/main/java/org/apache/maven/archetype/common/util/XMLOutputter.java
@@ -76,8 +76,8 @@ import java.io.Writer;
 import java.util.List;
 
 /**
- * <p>This class is a fork from jdom 1.0 modified to preserve CData and
- * comments parts.</p>
+ * <p>This class is a fork from JDOM 1.0 modified to preserve CData sections 
and
+ * comments.</p>
  * 
  * <p>Outputs a JDOM document as a stream of bytes. The outputter can manage 
many
  * styles of document formatting, from untouched to pretty printed. The default
@@ -104,11 +104,11 @@ import java.util.List;
  * OutputStream if possible.</p>
  * 
  * <p>XML declarations are always printed on their own line followed by a line
- * seperator (this doesn't change the semantics of the document). To omit
+ * separator (this doesn't change the semantics of the document). To omit
  * printing of the declaration use
  * <code>{@link Format#setOmitDeclaration}</code>. To omit printing of the
  * encoding in the declaration use <code>{@link Format#setOmitEncoding}</code>.
- * Unfortunatly there is currently no way to know the original encoding of the
+ * Unfortunately there is currently no way to know the original encoding of the
  * document.</p>
  * 
  * <p>Empty elements are by default printed as &lt;empty/&gt;, but this can be
@@ -364,13 +364,6 @@ public class XMLOutputter
     private static Writer makeWriter( OutputStream out, String enc )
         throws java.io.UnsupportedEncodingException
     {
-        // "UTF-8" is not recognized before JDK 1.1.6, so we'll translate
-        // into "UTF8" which works with all JDKs.
-        if ( "UTF-8".equals( enc ) )
-        {
-            enc = "UTF8";
-        }
-
         Writer writer = new BufferedWriter( ( new OutputStreamWriter( new 
BufferedOutputStream( out ), enc ) ) );
         return writer;
     }

Reply via email to