[Git][java-team/dtd-parser][upstream] New upstream version 1.2

Emmanuel Bourg gitlab at salsa.debian.org
Thu Feb 11 11:00:09 GMT 2021



Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / dtd-parser


Commits:
7f7c84dd by Emmanuel Bourg at 2021-02-11T11:39:38+01:00
New upstream version 1.2
- - - - -


30 changed files:

- − build.xml
- + dtd-parser/.classpath
- + dtd-parser/.project
- + dtd-parser/.settings/org.eclipse.jdt.core.prefs
- + dtd-parser/.settings/org.maven.ide.eclipse.prefs
- LICENSE.txt → dtd-parser/LICENSE.txt
- + dtd-parser/copyright-exclude
- + dtd-parser/copyright.txt
- maven.xml → dtd-parser/dtd-parser.iml
- + dtd-parser/dtd-parser.ipr
- nb-configuration.xml → dtd-parser/exclude.xml
- pom.xml → dtd-parser/pom.xml
- project.properties → dtd-parser/project.properties
- src/com/sun/xml/dtdparser/DTDEventListener.java → dtd-parser/src/com/sun/xml/dtdparser/DTDEventListener.java
- src/com/sun/xml/dtdparser/DTDHandlerBase.java → dtd-parser/src/com/sun/xml/dtdparser/DTDHandlerBase.java
- src/com/sun/xml/dtdparser/DTDParser.java → dtd-parser/src/com/sun/xml/dtdparser/DTDParser.java
- src/com/sun/xml/dtdparser/EndOfInputException.java → dtd-parser/src/com/sun/xml/dtdparser/EndOfInputException.java
- src/com/sun/xml/dtdparser/EntityDecl.java → dtd-parser/src/com/sun/xml/dtdparser/EntityDecl.java
- src/com/sun/xml/dtdparser/ExternalEntity.java → dtd-parser/src/com/sun/xml/dtdparser/ExternalEntity.java
- src/com/sun/xml/dtdparser/InputEntity.java → dtd-parser/src/com/sun/xml/dtdparser/InputEntity.java
- src/com/sun/xml/dtdparser/InternalEntity.java → dtd-parser/src/com/sun/xml/dtdparser/InternalEntity.java
- src/com/sun/xml/dtdparser/MessageCatalog.java → dtd-parser/src/com/sun/xml/dtdparser/MessageCatalog.java
- src/com/sun/xml/dtdparser/Resolver.java → dtd-parser/src/com/sun/xml/dtdparser/Resolver.java
- src/com/sun/xml/dtdparser/SimpleHashtable.java → dtd-parser/src/com/sun/xml/dtdparser/SimpleHashtable.java
- src/com/sun/xml/dtdparser/XmlChars.java → dtd-parser/src/com/sun/xml/dtdparser/XmlChars.java
- src/com/sun/xml/dtdparser/XmlNames.java → dtd-parser/src/com/sun/xml/dtdparser/XmlNames.java
- src/com/sun/xml/dtdparser/XmlReader.java → dtd-parser/src/com/sun/xml/dtdparser/XmlReader.java
- src/com/sun/xml/dtdparser/package.html → dtd-parser/src/com/sun/xml/dtdparser/package.html
- src/com/sun/xml/dtdparser/resources/Messages.properties → dtd-parser/src/com/sun/xml/dtdparser/resources/Messages.properties
- − project.xml


Changes:

=====================================
build.xml deleted
=====================================
@@ -1,56 +0,0 @@
-<!--
-Copyright (c) 2009, Sun Microsystems
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-  * Redistributions of source code must retain the above copyright notice, this
-    list of conditions and the following disclaimer.
-  * Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-  * Neither the name of the Sun Microsystems nor the names of its contributors
-    may be used to endorse or promote products derived from this software
-    without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<!-- j2se-integration target needs to be in Ant due to our agreement -->
-<project>
-  <target name="integrate-package-rename-task">
-    <get src="http://kohsuke.sfbay/hudson/job/package-rename-task/lastSuccessfulBuild/artifact/target/package-rename-task-1.0.jar"
-         dest="lib/package-rename-task.jar"/>
-  </target>
-
-  <target name="j2se-integration"
-          description="prepare renamed source code for J2SE integration">
-    <taskdef name="prename" classname="com.sun.wts.tools.ant.PackageRenameTask">
-      <classpath>
-        <pathelement path="lib/package-rename-task.jar" />
-      </classpath>
-    </taskdef>
-
-    <prename srcdir="src" destdir="j2se-integration/src">
-      <pattern from="com.sun.xml.dtdparser" to="com.sun.xml.internal.dtdparser" />
-    </prename>
-
-    <!-- sanity test -->
-    <mkdir dir="target/renamed-classes"/>
-    <javac srcdir="j2se-integration/src" destdir="target/renamed-classes" />
-  </target>
-
-  <target name="clean">
-    <delete dir="j2se-integration" />
-    <delete dir="target" />
-  </target>
-</project>


=====================================
dtd-parser/.classpath
=====================================
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.3"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>


=====================================
dtd-parser/.project
=====================================
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>dtd-parser</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>


=====================================
dtd-parser/.settings/org.eclipse.jdt.core.prefs
=====================================
@@ -0,0 +1,6 @@
+#Sun Jul 25 13:11:09 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.3
+org.eclipse.jdt.core.compiler.compliance=1.3
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.3


=====================================
dtd-parser/.settings/org.maven.ide.eclipse.prefs
=====================================
@@ -0,0 +1,9 @@
+#Sun Jul 25 13:10:53 CEST 2010
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1


=====================================
LICENSE.txt → dtd-parser/LICENSE.txt
=====================================


=====================================
dtd-parser/copyright-exclude
=====================================
@@ -0,0 +1,41 @@
+/MANIFEST.MF
+/META-INF/services/
+/README
+.gif
+.jpg
+.jpeg
+.jpeg1
+.jpeg2
+.png
+.svg
+.tif
+.exe
+.ico
+.jar
+.zip
+.war
+.sql
+.jks
+.json
+.class
+.bin
+.iml
+.ipr
+.envelope
+.txt
+.bat
+.sh
+.project
+.settings
+/CDDL+GPLv2.xml
+/copyright-exclude
+/LICENSE
+/CDDL+GPLv2.txt
+CDDL+GPLv2.html
+/copyright.txt
+.commented
+/.auth
+.svnignore
+.svn
+www
+site


=====================================
dtd-parser/copyright.txt
=====================================
@@ -0,0 +1,39 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright (c) YYYY Oracle and/or its affiliates. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common Development
+ * and Distribution License("CDDL") (collectively, the "License").  You
+ * may not use this file except in compliance with the License.  You can
+ * obtain a copy of the License at
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
+ * or packager/legal/LICENSE.txt.  See the License for the specific
+ * language governing permissions and limitations under the License.
+ *
+ * When distributing the software, include this License Header Notice in each
+ * file and include the License file at packager/legal/LICENSE.txt.
+ *
+ * GPL Classpath Exception:
+ * Oracle designates this particular file as subject to the "Classpath"
+ * exception as provided by Oracle in the GPL Version 2 section of the License
+ * file that accompanied this code.
+ *
+ * Modifications:
+ * If applicable, add the following below the License Header, with the fields
+ * enclosed by brackets [] replaced by your own identifying information:
+ * "Portions Copyright [year] [name of copyright owner]"
+ *
+ * Contributor(s):
+ * If you wish your version of this file to be governed by only the CDDL or
+ * only the GPL Version 2, indicate your decision by adding "[Contributor]
+ * elects to include this software in this distribution under the [CDDL or GPL
+ * Version 2] license."  If you don't indicate a single choice of license, a
+ * recipient has the option to distribute your version of this file under
+ * either the CDDL, the GPL Version 2 or to extend the choice of license to
+ * its licensees as provided above.  However, if you add GPL Version 2 code
+ * and therefore, elected the GPL Version 2 license, then the option applies
+ * only if the new code is made subject to such option by the copyright
+ * holder.
+ */
\ No newline at end of file


=====================================
maven.xml → dtd-parser/dtd-parser.iml
=====================================
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 Copyright (c) 2009, Sun Microsystems
 All rights reserved.
@@ -25,8 +26,23 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 -->
-<project>
-  <preGoal name="clean:clean">
-    <delete dir="j2se-integration" />
-  </preGoal>
-</project>
\ No newline at end of file
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+  <component name="ModuleRootManager" />
+  <component name="NewModuleRootManager">
+    <output url="file://$MODULE_DIR$/build/classes" />
+    <exclude-output />
+    <exclude-exploded />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntryProperties />
+  </component>
+  <component name="org.mevenide.idea.module.ModuleSettings">
+    <favoriteGoals>
+      <list size="0" />
+    </favoriteGoals>
+  </component>
+</module>
+


=====================================
dtd-parser/dtd-parser.ipr
=====================================
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2009, Sun Microsystems
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+  * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+  * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+  * Neither the name of the Sun Microsystems nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<project version="4" relativePaths="false">
+  <component name="AntConfiguration">
+    <defaultAnt bundledAnt="true" />
+  </component>
+  <component name="BSFConsole">
+    <sendcommandbycontrolenter>false</sendcommandbycontrolenter>
+    <restoresystemstreams>false</restoresystemstreams>
+    <outwaitsforerr>false</outwaitsforerr>
+    <errwaitsforout>false</errwaitsforout>
+    <storedupsinrecentcommands>false</storedupsinrecentcommands>
+    <moduleforclasspath />
+    <includeoutputpath>false</includeoutputpath>
+    <includetestsoutputpath>false</includetestsoutputpath>
+    <languages>
+      <language name="ant" engine="org.kos.bsfconsoleplugin.languages.AntConsoleBSFEngine" />
+      <language name="beanshell" engine="bsh.util.BeanShellBSFEngine" />
+      <language name="netrexx" engine="org.apache.bsf.engines.netrexx.NetRexxEngine" />
+      <language name="xslt" engine="org.apache.bsf.engines.xslt.XSLTEngine" />
+      <language name="beanbasic" engine="org.apache.bsf.engines.beanbasic.BeanBasicEngine" />
+      <language name="bml" engine="org.apache.bml.ext.BMLEngine" />
+      <language name="groovy" engine="org.codehaus.groovy.bsf.GroovyEngine" />
+      <language name="jacl" engine="org.apache.bsf.engines.jacl.JaclEngine" />
+      <language name="java" engine="org.apache.bsf.engines.java.JavaEngine" />
+      <language name="javaclass" engine="org.apache.bsf.engines.javaclass.JavaClassEngine" />
+      <language name="javascript" engine="org.apache.bsf.engines.javascript.JavaScriptEngine" />
+      <language name="jpython" engine="org.apache.bsf.engines.jpython.JPythonEngine" />
+      <language name="jruby" engine="org.jruby.javasupport.bsf.JRubyEngine" />
+      <language name="jscript" engine="org.apache.bsf.engines.activescript.ActiveScriptEngine" />
+      <language name="judoscript" engine="com.judoscript.BSFJudoEngine" />
+      <language name="jython" engine="org.apache.bsf.engines.jython.JythonEngine" />
+      <language name="lotusscript" engine="org.apache.bsf.engines.lotusscript.LsEngine" />
+      <language name="perl" engine="org.apache.bsf.engines.perl.PerlEngine" />
+      <language name="perlscript" engine="org.apache.bsf.engines.activescript.ActiveScriptEngine" />
+      <language name="pnuts" engine="pnuts.ext.PnutsBSFEngine" />
+      <language name="vbscript" engine="org.apache.bsf.engines.activescript.ActiveScriptEngine" />
+    </languages>
+    <startupscripts />
+    <preferredrecentcommandsdividerlocations />
+    <BSFConsoleSearchOptions searchfromcursor="false">
+      <recentsearches />
+    </BSFConsoleSearchOptions>
+  </component>
+  <component name="CodeStyleSettingsManager">
+    <option name="PER_PROJECT_SETTINGS" />
+    <option name="USE_PER_PROJECT_SETTINGS" value="false" />
+  </component>
+  <component name="CompilerConfiguration">
+    <option name="DEFAULT_COMPILER" value="Javac" />
+    <option name="CLEAR_OUTPUT_DIRECTORY" value="false" />
+    <option name="DEPLOY_AFTER_MAKE" value="0" />
+    <resourceExtensions>
+      <entry name=".+\.(properties|xml|html|dtd|tld)" />
+      <entry name=".+\.(gif|png|jpeg|jpg)" />
+    </resourceExtensions>
+    <wildcardResourcePatterns>
+      <entry name="?*.properties" />
+      <entry name="?*.xml" />
+      <entry name="?*.gif" />
+      <entry name="?*.png" />
+      <entry name="?*.jpeg" />
+      <entry name="?*.jpg" />
+      <entry name="?*.html" />
+      <entry name="?*.dtd" />
+      <entry name="?*.tld" />
+    </wildcardResourcePatterns>
+  </component>
+  <component name="DataSourceManagerImpl" />
+  <component name="DependenciesAnalyzeManager">
+    <option name="myForwardDirection" value="false" />
+  </component>
+  <component name="DependencyValidationManager" />
+  <component name="EntryPointsManager">
+    <entry_points />
+  </component>
+  <component name="ExportToHTMLSettings">
+    <option name="PRINT_LINE_NUMBERS" value="false" />
+    <option name="OPEN_IN_BROWSER" value="false" />
+    <option name="OUTPUT_DIRECTORY" />
+  </component>
+  <component name="GUI Designer component loader factory" />
+  <component name="JavacSettings">
+    <option name="DEBUGGING_INFO" value="true" />
+    <option name="GENERATE_NO_WARNINGS" value="false" />
+    <option name="DEPRECATION" value="true" />
+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+    <option name="MAXIMUM_HEAP_SIZE" value="128" />
+  </component>
+  <component name="JavadocGenerationManager">
+    <option name="OUTPUT_DIRECTORY" />
+    <option name="OPTION_SCOPE" value="protected" />
+    <option name="OPTION_HIERARCHY" value="true" />
+    <option name="OPTION_NAVIGATOR" value="true" />
+    <option name="OPTION_INDEX" value="true" />
+    <option name="OPTION_SEPARATE_INDEX" value="true" />
+    <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
+    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
+    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
+    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
+    <option name="OPTION_DEPRECATED_LIST" value="true" />
+    <option name="OTHER_OPTIONS" value="" />
+    <option name="HEAP_SIZE" />
+    <option name="OPEN_IN_BROWSER" value="true" />
+  </component>
+  <component name="JikesSettings">
+    <option name="JIKES_PATH" value="" />
+    <option name="DEBUGGING_INFO" value="true" />
+    <option name="DEPRECATION" value="true" />
+    <option name="GENERATE_NO_WARNINGS" value="false" />
+    <option name="IS_EMACS_ERRORS_MODE" value="true" />
+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+  </component>
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+    </group>
+  </component>
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/dtd-parser.iml" filepath="$PROJECT_DIR$/dtd-parser.iml" />
+    </modules>
+  </component>
+  <component name="ProjectRootManager" version="2" assert-keyword="false" jdk-15="false" project-jdk-name="JDK1.4" />
+  <component name="RmicSettings">
+    <option name="IS_EANABLED" value="false" />
+    <option name="DEBUGGING_INFO" value="true" />
+    <option name="GENERATE_NO_WARNINGS" value="false" />
+    <option name="GENERATE_IIOP_STUBS" value="false" />
+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+  </component>
+  <component name="libraryTable" />
+  <component name="uidesigner-configuration">
+    <option name="INSTRUMENT_CLASSES" value="true" />
+    <option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" />
+  </component>
+  <UsedPathMacros />
+</project>
+


=====================================
nb-configuration.xml → dtd-parser/exclude.xml
=====================================
@@ -1,16 +1,15 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
     DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-    Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved..
+    Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved..
 
     The contents of this file are subject to the terms of either the GNU
     General Public License Version 2 only ("GPL") or the Common Development
     and Distribution License("CDDL") (collectively, the "License").  You
     may not use this file except in compliance with the License.  You can
     obtain a copy of the License at
-    https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+    http://glassfish.java.net/public/CDDL+GPL_1_1.html
     or packager/legal/LICENSE.txt.  See the License for the specific
     language governing permissions and limitations under the License.
 
@@ -40,14 +39,24 @@
     holder.
 
 -->
-<project-shared-configuration>
+
+<FindBugsFilter>
+
     <!--
-This file contains additional configuration written by modules in the NetBeans IDE.
-The configuration is intended to be shared among all the users of project and
-therefore it is assumed to be part of version control checkout.
-Without this configuration present, some functionality in the IDE may be limited or fail altogether.
--->
-    <spellchecker-wordlist xmlns="http://www.netbeans.org/ns/spellchecker-wordlist/1">
-        <word>versioned</word>
-    </spellchecker-wordlist>
-</project-shared-configuration>
+    Performance
+    -->
+    <Match>
+        <Or>
+            <Bug pattern="ES_COMPARING_PARAMETER_STRING_WITH_EQ"/>
+            <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ"/>
+        </Or>
+    </Match>
+    
+    <!--
+    As designed
+    -->
+    <Match>
+        <Bug pattern="SF_SWITCH_FALLTHROUGH"/>
+    </Match>
+    
+</FindBugsFilter>


=====================================
pom.xml → dtd-parser/pom.xml
=====================================
@@ -3,14 +3,14 @@
 
     DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-    Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 1998-2012 Oracle and/or its affiliates. All rights reserved.
 
     The contents of this file are subject to the terms of either the GNU
     General Public License Version 2 only ("GPL") or the Common Development
     and Distribution License("CDDL") (collectively, the "License").  You
     may not use this file except in compliance with the License.  You can
     obtain a copy of the License at
-    https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+    http://glassfish.java.net/public/CDDL+GPL_1_1.html
     or packager/legal/LICENSE.txt.  See the License for the specific
     language governing permissions and limitations under the License.
 
@@ -40,30 +40,27 @@
     holder.
 
 -->
-<project
-	xmlns="http://maven.apache.org/POM/4.0.0"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.sun.xml.dtd-parser</groupId>
     <artifactId>dtd-parser</artifactId>
-    <version>1.2-SNAPSHOT</version>
+    <version>1.2</version>
     <packaging>jar</packaging>
     <name>DTD Parser</name>
     <description>SAX-like API for parsing XML DTDs.</description>
     <url>http://dtd-parser.java.net/</url>
 
     <scm>
-        <url>http://java.net/projects/dtd-parser/sources/svn/show/trunk/</url>
-        <connection>scm:svn:https://svn.java.net/svn/dtd-parser~svn/trunk</connection>
-        <developerConnection>scm:svn:https://svn.java.net/svn/dtd-parser~svn/trunk</developerConnection>
+        <url>http://java.net/projects/dtd-parser/sources/svn/show/tags/dtd-parser-1.2</url>
+        <connection>scm:svn:https://svn.java.net/svn/dtd-parser~svn/tags/dtd-parser-1.2</connection>
+        <developerConnection>scm:svn:https://svn.java.net/svn/dtd-parser~svn/tags/dtd-parser-1.2</developerConnection>
     </scm>
 
     <parent>
         <groupId>org.sonatype.oss</groupId>
         <artifactId>oss-parent</artifactId>
-        <version>6</version>
+        <version>7</version>
     </parent>
 
     <licenses>
@@ -106,13 +103,53 @@
             </resource>
         </resources>
         <plugins>
+            <plugin>
+                <groupId>org.glassfish.copyright</groupId>
+                <artifactId>glassfish-copyright-maven-plugin</artifactId>
+                <version>1.29</version>
+                <configuration>
+                    <templateFile>${project.basedir}/copyright.txt</templateFile>
+                    <excludeFile>${project.basedir}/copyright-exclude</excludeFile>
+                    <!-- skip files not under SCM-->
+                    <scmOnly>true</scmOnly>
+                    <!-- turn off warnings -->
+                    <warn>true</warn>
+                    <!-- for use with repair -->
+                    <update>false</update>
+                    <!-- check that year is correct -->
+                    <ignoreYear>false</ignoreYear>
+                </configuration>
+            </plugin>
             <plugin>
                 <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.4</version>
                 <configuration>
-                    <source>1.3</source>
-                    <target>1.3</target>
+                    <source>1.6</source>
+                    <target>1.6</target>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>findbugs-maven-plugin</artifactId>
+                <version>2.5.2</version>
+                <configuration>
+                    <skip>${findbugs.skip}</skip>
+                    <threshold>${findbugs.threshold}</threshold>
+                    <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
+                    <excludeFilterFile>
+                        ${findbugs.exclude}
+                    </excludeFilterFile>
+                    <fork>true</fork>
+                    <jvmArgs>-Xms64m -Xmx256m</jvmArgs>    
+                </configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.glassfish.findbugs</groupId>
+                        <artifactId>findbugs</artifactId>
+                        <version>1.0</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
         </plugins>
     </build>
 
@@ -120,6 +157,7 @@
         <plugins>
             <plugin>
                 <artifactId>maven-changes-plugin</artifactId>
+                <version>2.7.1</version>
                 <configuration>
                     <xmlPath>${basedir}/xdocs/changes.xml</xmlPath>
                 </configuration>
@@ -127,4 +165,10 @@
         </plugins>
     </reporting>
 
+    <properties>
+        <findbugs.skip>false</findbugs.skip>
+        <findbugs.threshold>Low</findbugs.threshold>
+        <findbugs.exclude>${project.basedir}/exclude.xml</findbugs.exclude>
+    </properties>
+
 </project>


=====================================
project.properties → dtd-parser/project.properties
=====================================
@@ -1,14 +1,14 @@
 #
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 #
-# Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998-2012 Oracle and/or its affiliates. All rights reserved.
 #
 # The contents of this file are subject to the terms of either the GNU
 # General Public License Version 2 only ("GPL") or the Common Development
 # and Distribution License("CDDL") (collectively, the "License").  You
 # may not use this file except in compliance with the License.  You can
 # obtain a copy of the License at
-# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+# http://glassfish.java.net/public/CDDL+GPL_1_1.html
 # or packager/legal/LICENSE.txt.  See the License for the specific
 # language governing permissions and limitations under the License.
 #
@@ -38,6 +38,7 @@
 # holder.
 #
 
+
 # -------------------------------------------------------------------
 # P R O J E C T  P R O P E R T I E S
 # -------------------------------------------------------------------


=====================================
src/com/sun/xml/dtdparser/DTDEventListener.java → dtd-parser/src/com/sun/xml/dtdparser/DTDEventListener.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2015 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 import org.xml.sax.Locator;
@@ -108,7 +109,7 @@ public interface DTDEventListener extends EventListener {
     /**
      * Receive notification of an external parsed general entity
      * declaration event.
-     * <p/>
+     * <p>
      * <p>If a system identifier is present, and it is a relative URL, the
      * parser will have resolved it fully before passing it through this
      * method to a listener.</p>
@@ -141,7 +142,7 @@ public interface DTDEventListener extends EventListener {
     /**
      * Receive notification of an external parameter entity declaration
      * event.
-     * <p/>
+     * <p>
      * <p>If a system identifier is present, and it is a relative URL, the
      * parser will have resolved it fully before passing it through this
      * method to a listener.</p>
@@ -178,7 +179,7 @@ public interface DTDEventListener extends EventListener {
 
     /**
      * Receive notification that a comment has been read.
-     * <p/>
+     * <p>
      * <P> Note that processing instructions are the mechanism designed
      * to hold information for consumption by applications, not comments..
      * XML systems may rely on applications being able to access information
@@ -193,17 +194,17 @@ public interface DTDEventListener extends EventListener {
 
     /**
      * Receive notification of character data.
-     * <p/>
+     * <p>
      * <p>The Parser will call this method to report each chunk of
      * character data.  SAX parsers may return all contiguous character
      * data in a single chunk, or they may split it into several
      * chunks; however, all of the characters in any single event
      * must come from the same external entity, so that the Locator
      * provides useful information.</p>
-     * <p/>
+     * <p>
      * <p>The application must not attempt to read from the array
      * outside of the specified range.</p>
-     * <p/>
+     * <p>
      * <p>Note that some parsers will report whitespace using the
      * ignorableWhitespace() method rather than this one (validating
      * parsers must do so).</p>
@@ -220,18 +221,18 @@ public interface DTDEventListener extends EventListener {
 
     /**
      * Receive notification of ignorable whitespace in element content.
-     * <p/>
+     * <p>
      * <p>Validating Parsers must use this method to report each chunk
      * of ignorable whitespace (see the W3C XML 1.0 recommendation,
      * section 2.10): non-validating parsers may also use this method
      * if they are capable of parsing and using content models.</p>
-     * <p/>
+     * <p>
      * <p>SAX parsers may return all contiguous whitespace in a single
      * chunk, or they may split it into several chunks; however, all of
      * the characters in any single event must come from the same
      * external entity, so that the Locator provides useful
      * information.</p>
-     * <p/>
+     * <p>
      * <p>The application must not attempt to read from the array
      * outside of the specified range.</p>
      *
@@ -293,7 +294,7 @@ public interface DTDEventListener extends EventListener {
      *                         this elemen has child content model. The actual content model will
      *                         be reported by childElement, startModelGroup, endModelGroup, and
      *                         connector methods. Possible call sequences are:
-     *                         <p/>
+     *                         <p>
      *                         START := MODEL_GROUP
      *                         MODEL_GROUP := startModelGroup TOKEN (connector TOKEN)* endModelGroup
      *                         TOKEN := childElement
@@ -314,8 +315,8 @@ public interface DTDEventListener extends EventListener {
     /**
      * For each entry in an ATTLIST declaration,
      * this event will be fired.
-     * <p/>
-     * <p/>
+     * <p>
+     * <p>
      * DTD allows the same attributes to be declared more than
      * once, and in that case the first one wins. I think
      * this method will be only fired for the first one,
@@ -343,11 +344,9 @@ public interface DTDEventListener extends EventListener {
 
     /**
      * Connectors in one model group is guaranteed to be the same.
-     * <p/>
-     * <p/>
+     * <p>
+     * <p>
      * IOW, you'll never see an event sequence like (a|b,c)
-     *
-     * @return {@link #CHOICE} or {@link #SEQUENCE}.
      */
     public void connector(short connectorType) throws SAXException;
 


=====================================
src/com/sun/xml/dtdparser/DTDHandlerBase.java → dtd-parser/src/com/sun/xml/dtdparser/DTDHandlerBase.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 import org.xml.sax.Locator;


=====================================
src/com/sun/xml/dtdparser/DTDParser.java → dtd-parser/src/com/sun/xml/dtdparser/DTDParser.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2015 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 import org.xml.sax.EntityResolver;
@@ -52,21 +53,23 @@ import java.util.Hashtable;
 import java.util.Locale;
 import java.util.Set;
 import java.util.Vector;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * This implements parsing of XML 1.0 DTDs.
- * <p/>
- * This conforms to the portion of the XML 1.0 specification related
- * to the external DTD subset.
- * <p/>
- * For multi-language applications (such as web servers using XML
- * processing to create dynamic content), a method supports choosing
- * a locale for parser diagnostics which is both understood by the
- * message recipient and supported by the parser.
- * <p/>
- * This parser produces a stream of parse events.  It supports some
- * features (exposing comments, CDATA sections, and entity references)
- * which are not required to be reported by conformant XML processors.
+ * <p>
+ * This conforms to the portion of the XML 1.0 specification related to the
+ * external DTD subset.
+ * <p>
+ * For multi-language applications (such as web servers using XML processing to
+ * create dynamic content), a method supports choosing a locale for parser
+ * diagnostics which is both understood by the message recipient and supported
+ * by the parser.
+ * <p>
+ * This parser produces a stream of parse events. It supports some features
+ * (exposing comments, CDATA sections, and entity references) which are not
+ * required to be reported by conformant XML processors.
  *
  * @author David Brownell
  * @author Janet Koenig
@@ -74,6 +77,7 @@ import java.util.Vector;
  * @version $Id: DTDParser.java,v 1.2 2009-04-16 15:25:49 snajper Exp $
  */
 public class DTDParser {
+
     public final static String TYPE_CDATA = "CDATA";
     public final static String TYPE_ID = "ID";
     public final static String TYPE_IDREF = "IDREF";
@@ -84,47 +88,39 @@ public class DTDParser {
     public final static String TYPE_NMTOKENS = "NMTOKENS";
     public final static String TYPE_NOTATION = "NOTATION";
     public final static String TYPE_ENUMERATION = "ENUMERATION";
-
-
     // stack of input entities being merged
     private InputEntity in;
-
     // temporaries reused during parsing
     private StringBuffer strTmp;
-    private char nameTmp [];
+    private char nameTmp[];
     private NameCache nameCache;
-    private char charTmp [] = new char[2];
-
+    private char charTmp[] = new char[2];
     // temporary DTD parsing state
     private boolean doLexicalPE;
-
     // DTD state, used during parsing
 //    private SimpleHashtable    elements = new SimpleHashtable (47);
     protected final Set declaredElements = new java.util.HashSet();
     private SimpleHashtable params = new SimpleHashtable(7);
-
     // exposed to package-private subclass
     Hashtable notations = new Hashtable(7);
     SimpleHashtable entities = new SimpleHashtable(17);
-
     private SimpleHashtable ids = new SimpleHashtable();
-
     // listeners for DTD parsing events
     private DTDEventListener dtdHandler;
-
     private EntityResolver resolver;
     private Locale locale;
-
     // string constants -- use these copies so "==" works
     // package private
     static final String strANY = "ANY";
     static final String strEMPTY = "EMPTY";
 
+    private static final Logger LOGGER = Logger.getLogger(DTDParser.class.getName());
+    
     /**
      * Used by applications to request locale for diagnostics.
      *
-     * @param l The locale to use, or null to use system defaults
-     *          (which may include only message IDs).
+     * @param l The locale to use, or null to use system defaults (which may
+     * include only message IDs).
      */
     public void setLocale(Locale l) throws SAXException {
 
@@ -143,20 +139,19 @@ public class DTDParser {
     }
 
     /**
-     * Chooses a client locale to use for diagnostics, using the first
-     * language specified in the list that is supported by this parser.
-     * That locale is then set using <a href="#setLocale(java.util.Locale)">
-     * setLocale()</a>.  Such a list could be provided by a variety of user
-     * preference mechanisms, including the HTTP <em>Accept-Language</em>
-     * header field.
+     * Chooses a client locale to use for diagnostics, using the first language
+     * specified in the list that is supported by this parser. That locale is
+     * then set using <a href="#setLocale(java.util.Locale)"> setLocale()</a>.
+     * Such a list could be provided by a variety of user preference mechanisms,
+     * including the HTTP <em>Accept-Language</em> header field.
      *
      * @param languages Array of language specifiers, ordered with the most
-     *                  preferable one at the front.  For example, "en-ca" then "fr-ca",
-     *                  followed by "zh_CN".  Both RFC 1766 and Java styles are supported.
+     * preferable one at the front. For example, "en-ca" then "fr-ca", followed
+     * by "zh_CN". Both RFC 1766 and Java styles are supported.
      * @return The chosen locale, or null.
      * @see MessageCatalog
      */
-    public Locale chooseLocale(String languages [])
+    public Locale chooseLocale(String languages[])
             throws SAXException {
 
         Locale l = messages.chooseLocale(languages);
@@ -188,24 +183,29 @@ public class DTDParser {
      */
     public void setDtdHandler(DTDEventListener handler) {
         dtdHandler = handler;
-        if (handler != null)
+        if (handler != null) {
             handler.setDocumentLocator(new Locator() {
+                @Override
                 public String getPublicId() {
                     return DTDParser.this.getPublicId();
                 }
 
+                @Override
                 public String getSystemId() {
                     return DTDParser.this.getSystemId();
                 }
 
+                @Override
                 public int getLineNumber() {
                     return DTDParser.this.getLineNumber();
                 }
 
+                @Override
                 public int getColumnNumber() {
                     return DTDParser.this.getColumnNumber();
                 }
             });
+        }
     }
 
     /**
@@ -277,12 +277,15 @@ public class DTDParser {
         builtin("quot", "\"");
         builtin("apos", "'");
 
-        if (locale == null)
+        if (locale == null) {
             locale = Locale.getDefault();
-        if (resolver == null)
+        }
+        if (resolver == null) {
             resolver = new Resolver();
-        if (dtdHandler == null)
+        }
+        if (dtdHandler == null) {
             dtdHandler = new DTDHandlerBase();
+        }
     }
 
     private void builtin(String entityName, String entityValue) {
@@ -291,7 +294,6 @@ public class DTDParser {
         entities.put(entityName, entity);
     }
 
-
     ////////////////////////////////////////////////////////////////
     //
     // parsing is by recursive descent, code roughly
@@ -303,13 +305,13 @@ public class DTDParser {
     // relatively easy to get diagnostics that make sense.
     //
     ////////////////////////////////////////////////////////////////
-
-
+    @SuppressWarnings("CallToThreadDumpStack")
     private void parseInternal(InputSource input)
             throws IOException, SAXException {
 
-        if (input == null)
+        if (input == null) {
             fatal("P-000");
+        }
 
         try {
             in = InputEntity.getInputEntity(dtdHandler, locale);
@@ -326,8 +328,7 @@ public class DTDParser {
             externalParameterEntity(externalSubset);
 
             if (!in.isEOF()) {
-                fatal("P-001", new Object[]
-                {Integer.toHexString(((int) getc()))});
+                fatal("P-001", new Object[]{Integer.toHexString(((int) getc()))});
             }
             afterRoot();
             dtdHandler.endDTD();
@@ -343,10 +344,7 @@ public class DTDParser {
                 fatal("P-003", null);
             }
         } catch (RuntimeException e) {
-            // Don't discard location that triggered the exception
-            // ## Should properly wrap exception
-            System.err.print("Internal DTD parser error: "); // ##
-            e.printStackTrace();
+            LOGGER.log(Level.SEVERE, "Internal DTD parser error.", e);
             throw new SAXParseException(e.getMessage() != null
                     ? e.getMessage() : e.getClass().getName(),
                     getPublicId(), getSystemId(),
@@ -382,24 +380,22 @@ public class DTDParser {
         // references, and only now can we know if they're all resolved.
 
         for (Enumeration e = ids.keys();
-             e.hasMoreElements();
-                ) {
+                e.hasMoreElements();) {
             String id = (String) e.nextElement();
             Boolean value = (Boolean) ids.get(id);
-            if (Boolean.FALSE == value)
+            if (Boolean.FALSE.equals(value)) {
                 error("V-024", new Object[]{id});
+            }
         }
     }
 
-
     // role is for diagnostics
     private void whitespace(String roleId)
             throws IOException, SAXException {
 
         // [3] S ::= (#x20 | #x9 | #xd | #xa)+
         if (!maybeWhitespace()) {
-            fatal("P-004", new Object[]
-            {messages.getMessage(locale, roleId)});
+            fatal("P-004", new Object[]{messages.getMessage(locale, roleId)});
         }
     }
 
@@ -407,8 +403,9 @@ public class DTDParser {
     private boolean maybeWhitespace()
             throws IOException, SAXException {
 
-        if (!doLexicalPE)
+        if (!doLexicalPE) {
             return in.maybeWhitespace();
+        }
 
         // see getc() for the PE logic -- this lets us splice
         // expansions of PEs in "anywhere".  getc() has smarts,
@@ -432,8 +429,9 @@ public class DTDParser {
             // this gracefully ends things when we stop playing
             // with internal parameters.  caller should have a
             // grammar rule allowing whitespace at end of entity.
-            if (in.isEOF() && !in.isInternal())
+            if (in.isEOF() && !in.isInternal()) {
                 return saw;
+            }
             c = getc();
         }
         ungetc();
@@ -466,8 +464,9 @@ public class DTDParser {
 
         // [7] Nmtoken ::= (Namechar)+
         char c = getc();
-        if (!XmlChars.isNameChar(c))
-            fatal("P-006", new Object[]{new Character(c)});
+        if (!XmlChars.isNameChar(c)) {
+            fatal("P-006", new Object[]{Character.valueOf(c)});
+        }
         return nameCharString(c).name;
     }
 
@@ -475,18 +474,18 @@ public class DTDParser {
     // internal references) so we can't use strTmp; it's also
     // a hotspot for CPU and memory in the parser (called at least
     // once for each element) so this has been optimized a bit.
-
     private NameCacheEntry nameCharString(char c)
             throws IOException, SAXException {
 
         int i = 1;
 
         nameTmp[0] = c;
-        for (; ;) {
-            if ((c = in.getNameChar()) == 0)
+        for (;;) {
+            if ((c = in.getNameChar()) == 0) {
                 break;
+            }
             if (i >= nameTmp.length) {
-                char tmp [] = new char[nameTmp.length + 10];
+                char tmp[] = new char[nameTmp.length + 10];
                 System.arraycopy(nameTmp, 0, tmp, 0, nameTmp.length);
                 nameTmp = tmp;
             }
@@ -504,6 +503,7 @@ public class DTDParser {
     // or else partially normalized attribute value (the first bit
     // of 3.3.3's spec, without the "if not CDATA" bits).
     //
+    @SuppressWarnings("UnusedAssignment")
     private void parseLiteral(boolean isEntityValue)
             throws IOException, SAXException {
 
@@ -530,7 +530,7 @@ public class DTDParser {
 
         // scan, allowing entity push/pop wherever ...
         // expanded entities can't terminate the literal!
-        for (; ;) {
+        for (;;) {
             if (in != source && in.isEOF()) {
                 // we don't report end of parsed entities
                 // within attributes (no SAX hooks)
@@ -561,20 +561,22 @@ public class DTDParser {
                     }
                     expandEntityInLiteral(entityName, entities, isEntityValue);
 
-
                     // character references are always included immediately
-                } else if ((c = getc()) == '#') {
+                } else if ((getc()) == '#') {
                     int tmp = parseCharNumber();
 
                     if (tmp > 0xffff) {
                         tmp = surrogatesToCharTmp(tmp);
                         strTmp.append(charTmp[0]);
-                        if (tmp == 2)
+                        if (tmp == 2) {
                             strTmp.append(charTmp[1]);
-                    } else
+                        }
+                    } else {
                         strTmp.append((char) tmp);
-                } else
+                    }
+                } else {
                     fatal("P-009");
+                }
                 continue;
 
             }
@@ -587,8 +589,9 @@ public class DTDParser {
                     nextChar(';', "F-021", entityName);
                     expandEntityInLiteral(entityName, params, isEntityValue);
                     continue;
-                } else
+                } else {
                     fatal("P-011");
+                }
             }
 
             // For attribute values ...
@@ -600,8 +603,9 @@ public class DTDParser {
                 }
 
                 // "<" not legal in parsed literals ...
-                if (c == '<')
+                if (c == '<') {
                     fatal("P-012");
+                }
             }
 
             strTmp.append(c);
@@ -611,7 +615,7 @@ public class DTDParser {
 
     // does a SINGLE expansion of the entity (often reparsed later)
     private void expandEntityInLiteral(String name, SimpleHashtable table,
-                                       boolean isEntityValue)
+            boolean isEntityValue)
             throws IOException, SAXException {
 
         Object entity = table.get(name);
@@ -621,8 +625,10 @@ public class DTDParser {
             pushReader(value.buf, name, !value.isPE);
 
         } else if (entity instanceof ExternalEntity) {
-            if (!isEntityValue)    // must be a PE ...
+            if (!isEntityValue) // must be a PE ...
+            {
                 fatal("P-013", new Object[]{name});
+            }
             // XXX if this returns false ...
             pushReader((ExternalEntity) entity);
 
@@ -639,32 +645,31 @@ public class DTDParser {
 
     // [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")
     // for PUBLIC and SYSTEM literals, also "<?xml ...type='literal'?>'
-    
     // NOTE:  XML spec should explicitly say that PE ref syntax is
     // ignored in PIs, comments, SystemLiterals, and Pubid Literal
     // values ... can't process the XML spec's own DTD without doing
     // that for comments.
-
     private String getQuotedString(String type, String extra)
             throws IOException, SAXException {
 
         // use in.getc to bypass PE processing
         char quote = in.getc();
 
-        if (quote != '\'' && quote != '"')
+        if (quote != '\'' && quote != '"') {
             fatal("P-015", new Object[]{
-                messages.getMessage(locale, type, new Object[]{extra})
-            });
+                        messages.getMessage(locale, type, new Object[]{extra})
+                    });
+        }
 
         char c;
 
         strTmp = new StringBuffer();
-        while ((c = in.getc()) != quote)
+        while ((c = in.getc()) != quote) {
             strTmp.append((char) c);
+        }
         return strTmp.toString();
     }
 
-
     private String parsePublicId() throws IOException, SAXException {
 
         // [12] PubidLiteral ::= ('"' PubidChar* '"') | ("'" PubidChar* "'")
@@ -674,8 +679,9 @@ public class DTDParser {
             char c = retval.charAt(i);
             if (" \r\n-'()+,./:=?;!*#@$_%0123456789".indexOf(c) == -1
                     && !(c >= 'A' && c <= 'Z')
-                    && !(c >= 'a' && c <= 'z'))
-                fatal("P-016", new Object[]{new Character(c)});
+                    && !(c >= 'a' && c <= 'z')) {
+                fatal("P-016", new Object[]{Character.valueOf(c)});
+            }
         }
         strTmp = new StringBuffer();
         strTmp.append(retval);
@@ -684,44 +690,47 @@ public class DTDParser {
 
     // [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
     // handled by:  InputEntity.parsedContent()
-
     private boolean maybeComment(boolean skipStart)
             throws IOException, SAXException {
 
         // [15] Comment ::= '<!--'
         //        ( (Char - '-') | ('-' (Char - '-'))*
         //        '-->'
-        if (!in.peek(skipStart ? "!--" : "<!--", null))
+        if (!in.peek(skipStart ? "!--" : "<!--", null)) {
             return false;
+        }
 
         boolean savedLexicalPE = doLexicalPE;
         boolean saveCommentText;
 
         doLexicalPE = false;
         saveCommentText = false;
-        if (saveCommentText)
+        if (saveCommentText) {
             strTmp = new StringBuffer();
+        }
 
         oneComment:
-        for (; ;) {
+        for (;;) {
             try {
                 // bypass PE expansion, but permit PEs
                 // to complete ... valid docs won't care.
-                for (; ;) {
+                for (;;) {
                     int c = getc();
                     if (c == '-') {
                         c = getc();
                         if (c != '-') {
-                            if (saveCommentText)
+                            if (saveCommentText) {
                                 strTmp.append('-');
+                            }
                             ungetc();
                             continue;
                         }
                         nextChar('>', "F-022", null);
                         break oneComment;
                     }
-                    if (saveCommentText)
+                    if (saveCommentText) {
                         strTmp.append((char) c);
+                    }
                 }
             } catch (EndOfInputException e) {
                 //
@@ -737,8 +746,9 @@ public class DTDParser {
             }
         }
         doLexicalPE = savedLexicalPE;
-        if (saveCommentText)
+        if (saveCommentText) {
             dtdHandler.comment(strTmp.toString());
+        }
         return true;
     }
 
@@ -751,8 +761,9 @@ public class DTDParser {
         // [17] PITarget ::= Name - (('X'|'x')('M'|'m')('L'|'l')
         boolean savedLexicalPE = doLexicalPE;
 
-        if (!in.peek(skipStart ? "?" : "<?", null))
+        if (!in.peek(skipStart ? "?" : "<?", null)) {
             return false;
+        }
         doLexicalPE = false;
 
         String target = maybeGetName();
@@ -770,12 +781,13 @@ public class DTDParser {
         if (maybeWhitespace()) {
             strTmp = new StringBuffer();
             try {
-                for (; ;) {
+                for (;;) {
                     // use in.getc to bypass PE processing
                     char c = in.getc();
                     //Reached the end of PI.
-                    if (c == '?' && in.peekc('>'))
+                    if (c == '?' && in.peekc('>')) {
                         break;
+                    }
                     strTmp.append(c);
                 }
             } catch (EndOfInputException e) {
@@ -799,7 +811,6 @@ public class DTDParser {
     // [21] CDEnd ::= ']]>'
     //
     //    ... handled by InputEntity.unparsedContent()
-
     // collapsing several rules together ... 
     // simpler than attribute literals -- no reference parsing!
     private String maybeReadAttribute(String name, boolean must)
@@ -843,8 +854,9 @@ public class DTDParser {
 
         // [26] versionNum ::= ([a-zA-Z0-9_.:]| '-')+
 
-        if (must && value == null)
+        if (must && value == null) {
             fatal("P-025", new Object[]{versionNum});
+        }
         if (value != null) {
             int length = value.length();
             for (int i = 0; i < length; i++) {
@@ -853,13 +865,14 @@ public class DTDParser {
                         || c == '_' || c == '.'
                         || (c >= 'a' && c <= 'z')
                         || (c >= 'A' && c <= 'Z')
-                        || c == ':' || c == '-')
-                )
+                        || c == ':' || c == '-')) {
                     fatal("P-026", new Object[]{value});
+                }
             }
         }
-        if (value != null && !value.equals(versionNum))
+        if (value != null && !value.equals(versionNum)) {
             error("P-027", new Object[]{versionNum, value});
+        }
     }
 
     // common code used by most markup declarations
@@ -871,9 +884,9 @@ public class DTDParser {
 
         whitespace(roleId);
         name = maybeGetName();
-        if (name == null)
-            fatal("P-005", new Object[]
-            {messages.getMessage(locale, roleId)});
+        if (name == null) {
+            fatal("P-005", new Object[]{messages.getMessage(locale, roleId)});
+        }
         return name;
     }
 
@@ -889,7 +902,6 @@ public class DTDParser {
                 || maybePI(false)
                 || maybeComment(false);
     }
-
     private static final String XmlLang = "xml:lang";
 
     private boolean isXmlLang(String value) {
@@ -907,168 +919,169 @@ public class DTDParser {
         int nextSuffix;
         char c;
 
-        if (value.length() < 2)
+        if (value.length() < 2) {
             return false;
+        }
         c = value.charAt(1);
         if (c == '-') {        // IANA, or user, code
             c = value.charAt(0);
-            if (!(c == 'i' || c == 'I' || c == 'x' || c == 'X'))
+            if (!(c == 'i' || c == 'I' || c == 'x' || c == 'X')) {
                 return false;
+            }
             nextSuffix = 1;
         } else if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
             // 2 letter ISO code, or error
             c = value.charAt(0);
-            if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
+            if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))) {
                 return false;
+            }
             nextSuffix = 2;
-        } else
+        } else {
             return false;
+        }
 
         // here "suffix" ::= '-' [a-zA-Z]+ suffix*
         while (nextSuffix < value.length()) {
             c = value.charAt(nextSuffix);
-            if (c != '-')
+            if (c != '-') {
                 break;
+            }
             while (++nextSuffix < value.length()) {
                 c = value.charAt(nextSuffix);
-                if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
+                if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))) {
                     break;
+                }
             }
         }
         return value.length() == nextSuffix && c != '-';
     }
 
-
     //
     // CHAPTER 3:  Logical Structures
     //
-
     /**
-     * To validate, subclassers should at this time make sure that
-     * values are of the declared types:<UL>
-     * <LI> ID and IDREF(S) values are Names
-     * <LI> NMTOKEN(S) are Nmtokens
-     * <LI> ENUMERATION values match one of the tokens
-     * <LI> NOTATION values match a notation name
-     * <LI> ENTITIY(IES) values match an unparsed external entity
-     * </UL>
-     * <p/>
-     * <P> Separately, make sure IDREF values match some ID
-     * provided in the document (in the afterRoot method).
+     * To validate, subclassers should at this time make sure that values are of
+     * the declared types:<UL> <LI> ID and IDREF(S) values are Names <LI>
+     * NMTOKEN(S) are Nmtokens <LI> ENUMERATION values match one of the tokens
+     * <LI> NOTATION values match a notation name <LI> ENTITIY(IES) values match
+     * an unparsed external entity </UL>
+     * <p>
+     * <P> Separately, make sure IDREF values match some ID provided in the
+     * document (in the afterRoot method).
+     */
+    /*    void validateAttributeSyntax (Attribute attr, String value)
+     throws DTDParseException {
+     // ID, IDREF(S) ... values are Names
+     if (Attribute.ID == attr.type()) {
+     if (!XmlNames.isName (value))
+     error ("V-025", new Object [] { value });
+
+     Boolean             b = (Boolean) ids.getNonInterned (value);
+     if (b == null || b.equals (Boolean.FALSE))
+     ids.put (value.intern (), Boolean.TRUE);
+     else
+     error ("V-026", new Object [] { value });
+
+     } else if (Attribute.IDREF == attr.type()) {
+     if (!XmlNames.isName (value))
+     error ("V-027", new Object [] { value });
+
+     Boolean             b = (Boolean) ids.getNonInterned (value);
+     if (b == null)
+     ids.put (value.intern (), Boolean.FALSE);
+
+     } else if (Attribute.IDREFS == attr.type()) {
+     StringTokenizer     tokenizer = new StringTokenizer (value);
+     Boolean             b;
+     boolean             sawValue = false;
+
+     while (tokenizer.hasMoreTokens ()) {
+     value = tokenizer.nextToken ();
+     if (!XmlNames.isName (value))
+     error ("V-027", new Object [] { value });
+     b = (Boolean) ids.getNonInterned (value);
+     if (b == null)
+     ids.put (value.intern (), Boolean.FALSE);
+     sawValue = true;
+     }
+     if (!sawValue)
+     error ("V-039", null);
+
+
+     // NMTOKEN(S) ... values are Nmtoken(s)
+     } else if (Attribute.NMTOKEN == attr.type()) {
+     if (!XmlNames.isNmtoken (value))
+     error ("V-028", new Object [] { value });
+
+     } else if (Attribute.NMTOKENS == attr.type()) {
+     StringTokenizer     tokenizer = new StringTokenizer (value);
+     boolean             sawValue = false;
+
+     while (tokenizer.hasMoreTokens ()) {
+     value = tokenizer.nextToken ();
+     if (!XmlNames.isNmtoken (value))
+     error ("V-028", new Object [] { value });
+     sawValue = true;
+     }
+     if (!sawValue)
+     error ("V-032", null);
+
+     // ENUMERATION ... values match one of the tokens
+     } else if (Attribute.ENUMERATION == attr.type()) {
+     for (int i = 0; i < attr.values().length; i++)
+     if (value.equals (attr.values()[i]))
+     return;
+     error ("V-029", new Object [] { value });
+
+     // NOTATION values match a notation name
+     } else if (Attribute.NOTATION == attr.type()) {
+     //
+     // XXX XML 1.0 spec should probably list references to
+     // externally defined notations in standalone docs as
+     // validity errors.  Ditto externally defined unparsed
+     // entities; neither should show up in attributes, else
+     // one needs to read the external declarations in order
+     // to make sense of the document (exactly what tagging
+     // a doc as "standalone" intends you won't need to do).
+     //
+     for (int i = 0; i < attr.values().length; i++)
+     if (value.equals (attr.values()[i]))
+     return;
+     error ("V-030", new Object [] { value });
+
+     // ENTITY(IES) values match an unparsed entity(ies)
+     } else if (Attribute.ENTITY == attr.type()) {
+     // see note above re standalone
+     if (!isUnparsedEntity (value))
+     error ("V-031", new Object [] { value });
+
+     } else if (Attribute.ENTITIES == attr.type()) {
+     StringTokenizer     tokenizer = new StringTokenizer (value);
+     boolean             sawValue = false;
+
+     while (tokenizer.hasMoreTokens ()) {
+     value = tokenizer.nextToken ();
+     // see note above re standalone
+     if (!isUnparsedEntity (value))
+     error ("V-031", new Object [] { value });
+     sawValue = true;
+     }
+     if (!sawValue)
+     error ("V-040", null);
+
+     } else if (Attribute.CDATA != attr.type())
+     throw new InternalError (attr.type());
+     }
+     */
+    /*
+     private boolean isUnparsedEntity (String name)
+     {
+     Object e = entities.getNonInterned (name);
+     if (e == null || !(e instanceof ExternalEntity))
+     return false;
+     return ((ExternalEntity)e).notation != null;
+     }
      */
-/*    void validateAttributeSyntax (Attribute attr, String value)
-         throws DTDParseException {
-        // ID, IDREF(S) ... values are Names
-        if (Attribute.ID == attr.type()) {
-            if (!XmlNames.isName (value))
-                error ("V-025", new Object [] { value });
-
-            Boolean             b = (Boolean) ids.getNonInterned (value);
-            if (b == null || b.equals (Boolean.FALSE))
-                ids.put (value.intern (), Boolean.TRUE);
-            else
-                error ("V-026", new Object [] { value });
-
-        } else if (Attribute.IDREF == attr.type()) {
-            if (!XmlNames.isName (value))
-                error ("V-027", new Object [] { value });
-
-            Boolean             b = (Boolean) ids.getNonInterned (value);
-            if (b == null)
-                ids.put (value.intern (), Boolean.FALSE);
-
-        } else if (Attribute.IDREFS == attr.type()) {
-            StringTokenizer     tokenizer = new StringTokenizer (value);
-            Boolean             b;
-            boolean             sawValue = false;
-
-            while (tokenizer.hasMoreTokens ()) {
-                value = tokenizer.nextToken ();
-                if (!XmlNames.isName (value))
-                    error ("V-027", new Object [] { value });
-                b = (Boolean) ids.getNonInterned (value);
-                if (b == null)
-                    ids.put (value.intern (), Boolean.FALSE);
-                sawValue = true;
-            }
-            if (!sawValue)
-                error ("V-039", null);
-
-
-        // NMTOKEN(S) ... values are Nmtoken(s)
-        } else if (Attribute.NMTOKEN == attr.type()) {
-            if (!XmlNames.isNmtoken (value))
-                error ("V-028", new Object [] { value });
-
-        } else if (Attribute.NMTOKENS == attr.type()) {
-            StringTokenizer     tokenizer = new StringTokenizer (value);
-            boolean             sawValue = false;
-
-            while (tokenizer.hasMoreTokens ()) {
-                value = tokenizer.nextToken ();
-                if (!XmlNames.isNmtoken (value))
-                    error ("V-028", new Object [] { value });
-                sawValue = true;
-            }
-            if (!sawValue)
-                error ("V-032", null);
-
-        // ENUMERATION ... values match one of the tokens
-        } else if (Attribute.ENUMERATION == attr.type()) {
-            for (int i = 0; i < attr.values().length; i++)
-                if (value.equals (attr.values()[i]))
-                    return;
-            error ("V-029", new Object [] { value });
-
-        // NOTATION values match a notation name
-        } else if (Attribute.NOTATION == attr.type()) {
-            //
-            // XXX XML 1.0 spec should probably list references to
-            // externally defined notations in standalone docs as
-            // validity errors.  Ditto externally defined unparsed
-            // entities; neither should show up in attributes, else
-            // one needs to read the external declarations in order
-            // to make sense of the document (exactly what tagging
-            // a doc as "standalone" intends you won't need to do).
-            //
-            for (int i = 0; i < attr.values().length; i++)
-                if (value.equals (attr.values()[i]))
-                    return;
-            error ("V-030", new Object [] { value });
-
-        // ENTITY(IES) values match an unparsed entity(ies)
-        } else if (Attribute.ENTITY == attr.type()) {
-            // see note above re standalone
-            if (!isUnparsedEntity (value))
-                error ("V-031", new Object [] { value });
-
-        } else if (Attribute.ENTITIES == attr.type()) {
-            StringTokenizer     tokenizer = new StringTokenizer (value);
-            boolean             sawValue = false;
-
-            while (tokenizer.hasMoreTokens ()) {
-                value = tokenizer.nextToken ();
-                // see note above re standalone
-                if (!isUnparsedEntity (value))
-                    error ("V-031", new Object [] { value });
-                sawValue = true;
-            }
-            if (!sawValue)
-                error ("V-040", null);
-
-        } else if (Attribute.CDATA != attr.type())
-            throw new InternalError (attr.type());
-    }
-*/
-/*
-    private boolean isUnparsedEntity (String name)
-    {
-        Object e = entities.getNonInterned (name);
-        if (e == null || !(e instanceof ExternalEntity))
-            return false;
-        return ((ExternalEntity)e).notation != null;
-    }
-*/
     private boolean maybeElementDecl()
             throws IOException, SAXException {
 
@@ -1076,8 +1089,9 @@ public class DTDParser {
         // [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children
         InputEntity start = peekDeclaration("!ELEMENT");
 
-        if (start == null)
+        if (start == null) {
             return false;
+        }
 
         // n.b. for content models where inter-element whitespace is
         // ignorable, we mark that fact here.
@@ -1085,20 +1099,20 @@ public class DTDParser {
 //    Element        element = (Element) elements.get (name);
 //    boolean        declEffective = false;
 
-/*
-    if (element != null) {
-        if (element.contentModel() != null) {
-            error ("V-012", new Object [] { name });
-        } // else <!ATTLIST name ...> came first
-    } else {
-        element = new Element(name);
-        elements.put (element.name(), element);
-        declEffective = true;
-    }
-*/
-        if (declaredElements.contains(name))
+        /*
+         if (element != null) {
+         if (element.contentModel() != null) {
+         error ("V-012", new Object [] { name });
+         } // else <!ATTLIST name ...> came first
+         } else {
+         element = new Element(name);
+         elements.put (element.name(), element);
+         declEffective = true;
+         }
+         */
+        if (declaredElements.contains(name)) {
             error("V-012", new Object[]{name});
-        else {
+        } else {
             declaredElements.add(name);
 //        declEffective = true;
         }
@@ -1119,10 +1133,12 @@ public class DTDParser {
 
         maybeWhitespace();
         char c = getc();
-        if (c != '>')
-            fatal("P-036", new Object[]{name, new Character(c)});
-        if (start != in)
+        if (c != '>') {
+            fatal("P-036", new Object[]{name, Character.valueOf(c)});
+        }
+        if (start != in) {
             error("V-013", null);
+        }
 
 ///        dtdHandler.elementDecl(element);
 
@@ -1133,7 +1149,6 @@ public class DTDParser {
     // it's an efficient natural way to express such things, and
     // libraries often interpret them.  No whitespace in the
     // model we store, though!
-
     /**
      * returns content model type.
      */
@@ -1176,7 +1191,7 @@ public class DTDParser {
 //        ContentModel       retval, temp, current;
 
 //        retval = temp = current = null;
-        
+
         dtdHandler.startModelGroup();
 
         do {
@@ -1200,10 +1215,11 @@ public class DTDParser {
                 getcps(elementName, next);
 ///                getFrequency();        <- this looks like a bug
 ///<-
-            } else
-                fatal((type == 0) ? "P-039" :
-                        ((type == ',') ? "P-037" : "P-038"),
-                        new Object[]{new Character(getc())});
+            } else {
+                fatal((type == 0) ? "P-039"
+                        : ((type == ',') ? "P-037" : "P-038"),
+                        new Object[]{Character.valueOf(getc())});
+            }
 
             maybeWhitespace();
             if (decided) {
@@ -1223,21 +1239,21 @@ public class DTDParser {
                 } else {
                     fatal((type == 0) ? "P-041" : "P-040",
                             new Object[]{
-                                new Character(c),
-                                new Character(type)
+                                Character.valueOf(c),
+                                Character.valueOf(type)
                             });
                 }
             } else {
                 type = getc();
                 switch (type) {
-                case '|':
-                case ',':
-                    reportConnector(type);
-                    break;
-                default:
+                    case '|':
+                    case ',':
+                        reportConnector(type);
+                        break;
+                    default:
 //                        retval = temp;
-                    ungetc();
-                    continue;
+                        ungetc();
+                        continue;
                 }
 //                retval = (ContentModel)current;
                 decided = true;
@@ -1247,8 +1263,9 @@ public class DTDParser {
             maybeWhitespace();
         } while (!peek(")"));
 
-        if (in != start)
+        if (in != start) {
             error("V-014", new Object[]{elementName});
+        }
         strTmp.append(')');
 
         dtdHandler.endModelGroup(getFrequency());
@@ -1257,14 +1274,14 @@ public class DTDParser {
 
     private void reportConnector(char type) throws SAXException {
         switch (type) {
-        case '|':
-            dtdHandler.connector(DTDEventListener.CHOICE);    ///<-
-            return;
-        case ',':
-            dtdHandler.connector(DTDEventListener.SEQUENCE); ///<-
-            return;
-        default:
-            throw new Error();    //assertion failed.
+            case '|':
+                dtdHandler.connector(DTDEventListener.CHOICE);    ///<-
+                return;
+            case ',':
+                dtdHandler.connector(DTDEventListener.SEQUENCE); ///<-
+                return;
+            default:
+                throw new Error();    //assertion failed.
         }
     }
 
@@ -1300,8 +1317,9 @@ public class DTDParser {
         //        | '(' S? '#PCDATA'                   S? ')'
         maybeWhitespace();
         if (peek("\u0029*") || peek("\u0029")) {
-            if (in != start)
+            if (in != start) {
                 error("V-014", new Object[]{elementName});
+            }
             strTmp.append(')');
 //            element.setContentModel(new StringModel(StringModelType.PCDATA));
             return;
@@ -1319,9 +1337,9 @@ public class DTDParser {
 
             doLexicalPE = true;
             name = maybeGetName();
-            if (name == null)
-                fatal("P-042", new Object[]
-                {elementName, Integer.toHexString(getc())});
+            if (name == null) {
+                fatal("P-042", new Object[]{elementName, Integer.toHexString(getc())});
+            }
             if (l.contains(name)) {
                 error("V-015", new Object[]{name});
             } else {
@@ -1332,11 +1350,13 @@ public class DTDParser {
             maybeWhitespace();
         }
 
-        if (!peek("\u0029*"))    // right paren
-            fatal("P-043", new Object[]
-            {elementName, new Character(getc())});
-        if (in != start)
+        if (!peek("\u0029*")) // right paren
+        {
+            fatal("P-043", new Object[]{elementName, Character.valueOf(getc())});
+        }
+        if (in != start) {
             error("V-014", new Object[]{elementName});
+        }
         strTmp.append(')');
 //        ChoiceModel cm = new ChoiceModel((Collection)l);
 //    cm.setRepeat(Repeat.ZERO_OR_MORE);
@@ -1349,8 +1369,9 @@ public class DTDParser {
         // [52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>'
         InputEntity start = peekDeclaration("!ATTLIST");
 
-        if (start == null)
+        if (start == null) {
             return false;
+        }
 
         String elementName = getMarkupDeclname("F-016", true);
 //    Element    element = (Element) elements.get (name);
@@ -1375,15 +1396,16 @@ public class DTDParser {
                     nextChar(';', "F-021", entityName);
                     whitespace("F-021");
                     continue;
-                } else
+                } else {
                     fatal("P-011");
+                }
             }
 
             ungetc();
             // look for attribute name otherwise
             String attName = maybeGetName();
             if (attName == null) {
-                fatal("P-044", new Object[]{new Character(getc())});
+                fatal("P-044", new Object[]{Character.valueOf(getc())});
             }
             whitespace("F-001");
 
@@ -1396,36 +1418,34 @@ public class DTDParser {
             // so that "==" may be used (faster)
 
             // [55] StringType ::= 'CDATA'
-            if (peek(TYPE_CDATA))
-///            a.setType(Attribute.CDATA);
+            if (peek(TYPE_CDATA)) ///            a.setType(Attribute.CDATA);
+            {
                 typeName = TYPE_CDATA;
-
-            // [56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS'
+            } // [56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS'
             //        | 'ENTITY' | 'ENTITIES'
             //        | 'NMTOKEN' | 'NMTOKENS'
             // n.b. if "IDREFS" is there, both "ID" and "IDREF"
             // match peekahead ... so this order matters!
-            else if (peek(TYPE_IDREFS))
+            else if (peek(TYPE_IDREFS)) {
                 typeName = TYPE_IDREFS;
-            else if (peek(TYPE_IDREF))
+            } else if (peek(TYPE_IDREF)) {
                 typeName = TYPE_IDREF;
-            else if (peek(TYPE_ID)) {
+            } else if (peek(TYPE_ID)) {
                 typeName = TYPE_ID;
 // TODO: should implement this error check?
 ///        if (element.id() != null) {
 ///                    error ("V-016", new Object [] { element.id() });
 ///        } else
 ///            element.setId(name);
-            } else if (peek(TYPE_ENTITY))
+            } else if (peek(TYPE_ENTITY)) {
                 typeName = TYPE_ENTITY;
-            else if (peek(TYPE_ENTITIES))
+            } else if (peek(TYPE_ENTITIES)) {
                 typeName = TYPE_ENTITIES;
-            else if (peek(TYPE_NMTOKENS))
+            } else if (peek(TYPE_NMTOKENS)) {
                 typeName = TYPE_NMTOKENS;
-            else if (peek(TYPE_NMTOKEN))
+            } else if (peek(TYPE_NMTOKEN)) {
                 typeName = TYPE_NMTOKEN;
-
-            // [57] EnumeratedType ::= NotationType | Enumeration
+            } // [57] EnumeratedType ::= NotationType | Enumeration
             // [58] NotationType ::= 'NOTATION' S '(' S? Name
             //        (S? '|' S? Name)* S? ')'
             else if (peek(TYPE_NOTATION)) {
@@ -1437,15 +1457,18 @@ public class DTDParser {
                 values = new Vector();
                 do {
                     String name;
-                    if ((name = maybeGetName()) == null)
+                    if ((name = maybeGetName()) == null) {
                         fatal("P-068");
+                    }
                     // permit deferred declarations
-                    if (notations.get(name) == null)
+                    if (notations.get(name) == null) {
                         notations.put(name, name);
+                    }
                     values.addElement(name);
                     maybeWhitespace();
-                    if (peek("|"))
+                    if (peek("|")) {
                         maybeWhitespace();
+                    }
                 } while (!peek(")"));
 ///            a.setValues(new String [v.size ()]);
 ///            for (int i = 0; i < v.size (); i++)
@@ -1465,15 +1488,16 @@ public class DTDParser {
 ///                v.addElement (name);
                     values.addElement(name);
                     maybeWhitespace();
-                    if (peek("|"))
+                    if (peek("|")) {
                         maybeWhitespace();
+                    }
                 } while (!peek(")"));
 ///            a.setValues(new String [v.size ()]);
 ///            for (int i = 0; i < v.size (); i++)
 ///                a.setValue(i, (String)v.elementAt(i));
             } else {
                 fatal("P-045",
-                        new Object[]{attName, new Character(getc())});
+                        new Object[]{attName, Character.valueOf(getc())});
                 typeName = null;
             }
 
@@ -1483,13 +1507,14 @@ public class DTDParser {
             // [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED'
             //        | (('#FIXED' S)? AttValue)
             whitespace("F-003");
-            if (peek("#REQUIRED"))
+            if (peek("#REQUIRED")) {
                 attributeUse = DTDEventListener.USE_REQUIRED;
-///            a.setIsRequired(true);
+            } ///            a.setIsRequired(true);
             else if (peek("#FIXED")) {
 ///            if (a.type() == Attribute.ID)
-                if (typeName == TYPE_ID)
+                if (typeName == TYPE_ID) {
                     error("V-017", new Object[]{attName});
+                }
 ///            a.setIsFixed(true);
                 attributeUse = DTDEventListener.USE_FIXED;
                 whitespace("F-004");
@@ -1499,30 +1524,33 @@ public class DTDParser {
 ///            else
 ///                a.setDefaultValue(strTmp.toString());
 
-                if (typeName == TYPE_CDATA)
+                if (typeName == TYPE_CDATA) {
                     defaultValue = normalize(false);
-                else
+                } else {
                     defaultValue = strTmp.toString();
-            
+                }
+
 // TODO: implement this check        
 ///            if (a.type() != Attribute.CDATA)
 ///                validateAttributeSyntax (a, a.defaultValue());
             } else if (!peek("#IMPLIED")) {
                 attributeUse = DTDEventListener.USE_IMPLIED;
-            
+
 ///            if (a.type() == Attribute.ID)
-                if (typeName == TYPE_ID)
+                if (typeName == TYPE_ID) {
                     error("V-018", new Object[]{attName});
+                }
                 parseLiteral(false);
 ///            if (a.type() != Attribute.CDATA)
 ///                a.setDefaultValue(normalize(false));
 ///            else
 ///                a.setDefaultValue(strTmp.toString());
-                if (typeName == TYPE_CDATA)
+                if (typeName == TYPE_CDATA) {
                     defaultValue = normalize(false);
-                else
+                } else {
                     defaultValue = strTmp.toString();
-            
+                }
+
 // TODO: implement this check        
 ///            if (a.type() != Attribute.CDATA)
 ///                validateAttributeSyntax (a, a.defaultValue());
@@ -1533,8 +1561,9 @@ public class DTDParser {
 
             if (XmlLang.equals(attName)
                     && defaultValue/* a.defaultValue()*/ != null
-                    && !isXmlLang(defaultValue/*a.defaultValue()*/))
+                    && !isXmlLang(defaultValue/*a.defaultValue()*/)) {
                 error("P-033", new Object[]{defaultValue /*a.defaultValue()*/});
+            }
 
 // TODO: isn't it an error to specify the same attribute twice?
 ///        if (!element.attributes().contains(a)) {
@@ -1542,12 +1571,13 @@ public class DTDParser {
 ///            dtdHandler.attributeDecl(a);
 ///        }
 
-            String[] v = (values != null) ? (String[]) values.toArray(new String[0]) : null;
+            String[] v = (values != null) ? (String[]) values.toArray(new String[values.size()]) : null;
             dtdHandler.attributeDecl(elementName, attName, typeName, v, attributeUse, defaultValue);
             maybeWhitespace();
         }
-        if (start != in)
+        if (start != in) {
             error("V-013", null);
+        }
         return true;
     }
 
@@ -1565,7 +1595,6 @@ public class DTDParser {
 
         if (s != s2) {
             s = s2;
-            s2 = null;
             didStrip = true;
         }
         strTmp = new StringBuffer();
@@ -1576,14 +1605,16 @@ public class DTDParser {
                 continue;
             }
             strTmp.append(' ');
-            while (++i < s.length() && XmlChars.isSpace(s.charAt(i)))
+            while (++i < s.length() && XmlChars.isSpace(s.charAt(i))) {
                 didStrip = true;
+            }
             i--;
         }
-        if (didStrip)
+        if (didStrip) {
             return strTmp.toString();
-        else
+        } else {
             return s;
+        }
     }
 
     private boolean maybeConditionalSect()
@@ -1591,39 +1622,46 @@ public class DTDParser {
 
         // [61] conditionalSect ::= includeSect | ignoreSect
 
-        if (!peek("<!["))
+        if (!peek("<![")) {
             return false;
+        }
 
         String keyword;
         InputEntity start = in;
 
         maybeWhitespace();
 
-        if ((keyword = maybeGetName()) == null)
+        if ((keyword = maybeGetName()) == null) {
             fatal("P-046");
+        }
         maybeWhitespace();
         nextChar('[', "F-030", null);
 
         // [62] includeSect ::= '<![' S? 'INCLUDE' S? '['
         //                extSubsetDecl ']]>'
         if ("INCLUDE".equals(keyword)) {
-            for (; ;) {
-                while (in.isEOF() && in != start)
+            for (;;) {
+                while (in.isEOF() && in != start) {
                     in = in.pop();
+                }
                 if (in.isEOF()) {
                     error("V-020", null);
                 }
-                if (peek("]]>"))
+                if (peek("]]>")) {
                     break;
+                }
 
                 doLexicalPE = false;
-                if (maybeWhitespace())
+                if (maybeWhitespace()) {
                     continue;
-                if (maybePEReference())
+                }
+                if (maybePEReference()) {
                     continue;
+                }
                 doLexicalPE = true;
-                if (maybeMarkupDecl() || maybeConditionalSect())
+                if (maybeMarkupDecl() || maybeConditionalSect()) {
                     continue;
+                }
 
                 fatal("P-047");
             }
@@ -1640,24 +1678,26 @@ public class DTDParser {
             while (nestlevel > 0) {
                 char c = getc();    // will pop input entities
                 if (c == '<') {
-                    if (peek("!["))
+                    if (peek("![")) {
                         nestlevel++;
+                    }
                 } else if (c == ']') {
-                    if (peek("]>"))
+                    if (peek("]>")) {
                         nestlevel--;
-                } else
+                    }
+                } else {
                     continue;
+                }
             }
-        } else
+        } else {
             fatal("P-048", new Object[]{keyword});
+        }
         return true;
     }
 
-
     //
     // CHAPTER 4:  Physical Structures
     //
-
     // parse decimal or hex numeric character reference
     private int parseCharNumber()
             throws IOException, SAXException {
@@ -1668,19 +1708,20 @@ public class DTDParser {
         // n.b. we ignore overflow ...
         if (getc() != 'x') {
             ungetc();
-            for (; ;) {
+            for (;;) {
                 c = getc();
                 if (c >= '0' && c <= '9') {
                     retval *= 10;
                     retval += (c - '0');
                     continue;
                 }
-                if (c == ';')
+                if (c == ';') {
                     return retval;
+                }
                 fatal("P-049");
             }
-        } else
-            for (; ;) {
+        } else {
+            for (;;) {
                 c = getc();
                 if (c >= '0' && c <= '9') {
                     retval <<= 4;
@@ -1697,10 +1738,12 @@ public class DTDParser {
                     retval += 10 + (c - 'A');
                     continue;
                 }
-                if (c == ';')
+                if (c == ';') {
                     return retval;
+                }
                 fatal("P-050");
             }
+        }
     }
 
     // parameter is a UCS-4 character ... i.e. not just 16 bit UNICODE,
@@ -1733,14 +1776,16 @@ public class DTDParser {
         // a LEXICAL version; see getc() and doLexicalPE.
 
         // [69] PEReference ::= '%' Name ';'
-        if (!in.peekc('%'))
+        if (!in.peekc('%')) {
             return false;
+        }
 
         String name = maybeGetName();
         Object entity;
 
-        if (name == null)
+        if (name == null) {
             fatal("P-011");
+        }
         nextChar(';', "F-021", name);
         entity = params.get(name);
 
@@ -1769,8 +1814,9 @@ public class DTDParser {
         //
         InputEntity start = peekDeclaration("!ENTITY");
 
-        if (start == null)
+        if (start == null) {
             return false;
+        }
 
         String entityName;
         SimpleHashtable defns;
@@ -1789,8 +1835,9 @@ public class DTDParser {
         if (in.peekc('%')) {
             whitespace("F-006");
             defns = params;
-        } else
+        } else {
             defns = entities;
+        }
 
         ungetc();    // leave some whitespace
         doLexicalPE = true;
@@ -1806,12 +1853,13 @@ public class DTDParser {
         // non-parameter entities.
         //
         doStore = (defns.get(entityName) == null);
-        if (!doStore && defns == entities)
+        if (!doStore && defns == entities) {
             warning("P-054", new Object[]{entityName});
+        }
 
         // internal entities
         if (externalId == null) {
-            char value [];
+            char value[];
             InternalEntity entity;
 
             doLexicalPE = false;        // "ab%bar;cd" -maybe-> "abcd"
@@ -1819,15 +1867,16 @@ public class DTDParser {
             doLexicalPE = true;
             if (doStore) {
                 value = new char[strTmp.length()];
-                if (value.length != 0)
+                if (value.length != 0) {
                     strTmp.getChars(0, value.length, value, 0);
+                }
                 entity = new InternalEntity(entityName, value);
                 entity.isPE = (defns == params);
-                entity.isFromInternalSubset = false;
                 defns.put(entityName, entity);
-                if (defns == entities)
+                if (defns == entities) {
                     dtdHandler.internalGeneralEntityDecl(entityName,
                             new String(value));
+                }
             }
 
             // external entities (including unparsed)
@@ -1839,27 +1888,29 @@ public class DTDParser {
 
                 // flag undeclared notation for checking after
                 // the DTD is fully processed
-                if (notations.get(externalId.notation) == null)
+                if (notations.get(externalId.notation) == null) {
                     notations.put(externalId.notation, Boolean.TRUE);
+                }
             }
             externalId.name = entityName;
             externalId.isPE = (defns == params);
-            externalId.isFromInternalSubset = false;
             if (doStore) {
                 defns.put(entityName, externalId);
-                if (externalId.notation != null)
+                if (externalId.notation != null) {
                     dtdHandler.unparsedEntityDecl(entityName,
                             externalId.publicId, externalId.systemId,
                             externalId.notation);
-                else if (defns == entities)
+                } else if (defns == entities) {
                     dtdHandler.externalGeneralEntityDecl(entityName,
                             externalId.publicId, externalId.systemId);
+                }
             }
         }
         maybeWhitespace();
         nextChar('>', "F-031", entityName);
-        if (start != in)
+        if (start != in) {
             error("V-013", null);
+        }
         return true;
     }
 
@@ -1874,8 +1925,9 @@ public class DTDParser {
         if (peek("PUBLIC")) {
             whitespace("F-009");
             temp = parsePublicId();
-        } else if (!peek("SYSTEM"))
+        } else if (!peek("SYSTEM")) {
             return null;
+        }
 
         retval = new ExternalEntity(in);
         retval.publicId = temp;
@@ -1901,14 +1953,16 @@ public class DTDParser {
             String baseURI;
 
             baseURI = in.getSystemId();
-            if (baseURI == null)
+            if (baseURI == null) {
                 fatal("P-055", new Object[]{uri});
-            if (uri.length() == 0)
+            }
+            if (uri.length() == 0) {
                 uri = ".";
+            }
             baseURI = baseURI.substring(0, baseURI.lastIndexOf('/') + 1);
-            if (uri.charAt(0) != '/')
+            if (uri.charAt(0) != '/') {
                 uri = baseURI + uri;
-            else {
+            } else {
                 // XXX slashes at the beginning of a relative URI are
                 // a special case we don't handle.
                 throw new InternalError();
@@ -1918,8 +1972,9 @@ public class DTDParser {
             // since all URIs must handle it the same.
         }
         // check for fragment ID in URI
-        if (uri.indexOf('#') != -1)
+        if (uri.indexOf('#') != -1) {
             error("P-056", new Object[]{uri});
+        }
         return uri;
     }
 
@@ -1931,8 +1986,9 @@ public class DTDParser {
             readVersion(false, "1.0");
             readEncoding(true);
             maybeWhitespace();
-            if (!peek("?>"))
+            if (!peek("?>")) {
                 fatal("P-057");
+            }
         }
     }
 
@@ -1966,18 +2022,22 @@ public class DTDParser {
                 continue;
             }
             doLexicalPE = false;
-            if (maybeWhitespace())
+            if (maybeWhitespace()) {
                 continue;
-            if (maybePEReference())
+            }
+            if (maybePEReference()) {
                 continue;
+            }
             doLexicalPE = true;
-            if (maybeMarkupDecl() || maybeConditionalSect())
+            if (maybeMarkupDecl() || maybeConditionalSect()) {
                 continue;
+            }
             break;
         }
         // if (in != pe) throw new InternalError("who popped my PE?");
-        if (!pe.isEOF())
+        if (!pe.isEOF()) {
             fatal("P-059", new Object[]{in.getName()});
+        }
     }
 
     private void readEncoding(boolean must)
@@ -1986,21 +2046,23 @@ public class DTDParser {
         // [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
         String name = maybeReadAttribute("encoding", must);
 
-        if (name == null)
+        if (name == null) {
             return;
+        }
         for (int i = 0; i < name.length(); i++) {
             char c = name.charAt(i);
             if ((c >= 'A' && c <= 'Z')
-                    || (c >= 'a' && c <= 'z'))
+                    || (c >= 'a' && c <= 'z')) {
                 continue;
+            }
             if (i != 0
                     && ((c >= '0' && c <= '9')
                     || c == '-'
                     || c == '_'
-                    || c == '.'
-                    ))
+                    || c == '.')) {
                 continue;
-            fatal("P-060", new Object[]{new Character(c)});
+            }
+            fatal("P-060", new Object[]{Character.valueOf(c)});
         }
 
         //
@@ -2015,8 +2077,9 @@ public class DTDParser {
         String currentEncoding = in.getEncoding();
 
         if (currentEncoding != null
-                && !name.equalsIgnoreCase(currentEncoding))
+                && !name.equalsIgnoreCase(currentEncoding)) {
             warning("P-061", new Object[]{name, currentEncoding});
+        }
     }
 
     private boolean maybeNotationDecl()
@@ -2027,8 +2090,9 @@ public class DTDParser {
         // [83] PublicID ::= 'PUBLIC' S PubidLiteral
         InputEntity start = peekDeclaration("!NOTATION");
 
-        if (start == null)
+        if (start == null) {
             return false;
+        }
 
         String name = getMarkupDeclname("F-019", false);
         ExternalEntity entity = new ExternalEntity(in);
@@ -2038,28 +2102,31 @@ public class DTDParser {
             whitespace("F-009");
             entity.publicId = parsePublicId();
             if (maybeWhitespace()) {
-                if (!peek(">"))
+                if (!peek(">")) {
                     entity.systemId = parseSystemId();
-                else
+                } else {
                     ungetc();
+                }
             }
         } else if (peek("SYSTEM")) {
             whitespace("F-008");
             entity.systemId = parseSystemId();
-        } else
+        } else {
             fatal("P-062");
+        }
         maybeWhitespace();
         nextChar('>', "F-032", name);
-        if (start != in)
+        if (start != in) {
             error("V-013", null);
-        if (entity.systemId != null && entity.systemId.indexOf('#') != -1)
+        }
+        if (entity.systemId != null && entity.systemId.indexOf('#') != -1) {
             error("P-056", new Object[]{entity.systemId});
+        }
 
         Object value = notations.get(name);
-        if (value != null && value instanceof ExternalEntity)
+        if (value != null && value instanceof ExternalEntity) {
             warning("P-063", new Object[]{name});
-
-        else {
+        } else {
             notations.put(name, entity);
             dtdHandler.notationDecl(name, entity.publicId,
                     entity.systemId);
@@ -2067,13 +2134,11 @@ public class DTDParser {
         return true;
     }
 
-
     ////////////////////////////////////////////////////////////////
     //
     //    UTILITIES
     //
     ////////////////////////////////////////////////////////////////
-
     private char getc() throws IOException, SAXException {
 
         if (!doLexicalPE) {
@@ -2100,9 +2165,9 @@ public class DTDParser {
         char c;
 
         while (in.isEOF()) {
-            if (in.isInternal() || (doLexicalPE && !in.isDocument()))
+            if (in.isInternal() || (doLexicalPE && !in.isDocument())) {
                 in = in.pop();
-            else {
+            } else {
                 fatal("P-064", new Object[]{in.getName()});
             }
         }
@@ -2111,25 +2176,27 @@ public class DTDParser {
             String name = maybeGetName();
             Object entity;
 
-            if (name == null)
+            if (name == null) {
                 fatal("P-011");
+            }
             nextChar(';', "F-021", name);
             entity = params.get(name);
 
             // push a magic "entity" before and after the
             // real one, so ungetc() behaves uniformly
             pushReader(" ".toCharArray(), null, false);
-            if (entity instanceof InternalEntity)
+            if (entity instanceof InternalEntity) {
                 pushReader(((InternalEntity) entity).buf, name, false);
-            else if (entity instanceof ExternalEntity)
-            // PEs can't be unparsed!
+            } else if (entity instanceof ExternalEntity) // PEs can't be unparsed!
             // XXX if this returns false ...
+            {
                 pushReader((ExternalEntity) entity);
-            else if (entity == null)
-            // see note in maybePEReference re making this be nonfatal.
+            } else if (entity == null) // see note in maybePEReference re making this be nonfatal.
+            {
                 fatal("V-022");
-            else
+            } else {
                 throw new InternalError();
+            }
             pushReader(" ".toCharArray(), null, false);
             return in.getc();
         }
@@ -2146,20 +2213,21 @@ public class DTDParser {
 
         return in.peek(s, null);
     }
-    
+
     // Return the entity starting the specified declaration
     // (for validating declaration nesting) else null.
-
     private InputEntity peekDeclaration(String s)
             throws IOException, SAXException {
 
         InputEntity start;
 
-        if (!in.peekc('<'))
+        if (!in.peekc('<')) {
             return null;
+        }
         start = in;
-        if (in.peek(s, null))
+        if (in.peek(s, null)) {
             return start;
+        }
         in.ungetc();
         return null;
     }
@@ -2167,17 +2235,17 @@ public class DTDParser {
     private void nextChar(char c, String location, String near)
             throws IOException, SAXException {
 
-        while (in.isEOF() && !in.isDocument())
+        while (in.isEOF() && !in.isDocument()) {
             in = in.pop();
-        if (!in.peekc(c))
-            fatal("P-008", new Object[]
-            {new Character(c),
-             messages.getMessage(locale, location),
-             (near == null ? "" : ('"' + near + '"'))});
+        }
+        if (!in.peekc(c)) {
+            fatal("P-008", new Object[]{Character.valueOf(c),
+                        messages.getMessage(locale, location),
+                        (near == null ? "" : ('"' + near + '"'))});
+        }
     }
 
-
-    private void pushReader(char buf [], String name, boolean isGeneral)
+    private void pushReader(char buf[], String name, boolean isGeneral)
             throws SAXException {
 
         InputEntity r = InputEntity.getInputEntity(dtdHandler, locale);
@@ -2195,8 +2263,9 @@ public class DTDParser {
         } catch (IOException e) {
             String msg =
                     "unable to open the external entity from :" + next.systemId;
-            if (next.publicId != null)
+            if (next.publicId != null) {
                 msg += " (public id:" + next.publicId + ")";
+            }
 
             SAXParseException spe = new SAXParseException(msg,
                     getPublicId(), getSystemId(), getLineNumber(), getColumnNumber(), e);
@@ -2230,8 +2299,7 @@ public class DTDParser {
     }
 
     // error handling convenience routines
-
-    private void warning(String messageId, Object parameters [])
+    private void warning(String messageId, Object parameters[])
             throws SAXException {
 
         SAXParseException e = new SAXParseException(messages.getMessage(locale, messageId, parameters),
@@ -2240,7 +2308,7 @@ public class DTDParser {
         dtdHandler.warning(e);
     }
 
-    void error(String messageId, Object parameters [])
+    void error(String messageId, Object parameters[])
             throws SAXException {
 
         SAXParseException e = new SAXParseException(messages.getMessage(locale, messageId, parameters),
@@ -2254,7 +2322,7 @@ public class DTDParser {
         fatal(messageId, null);
     }
 
-    private void fatal(String messageId, Object parameters [])
+    private void fatal(String messageId, Object parameters[])
             throws SAXException {
 
         SAXParseException e = new SAXParseException(messages.getMessage(locale, messageId, parameters),
@@ -2281,12 +2349,13 @@ public class DTDParser {
         // we've yet seen (and be prime).  If it's too small, the
         // penalty is just excess cache collisions.
         //
-        NameCacheEntry hashtable [] = new NameCacheEntry[541];
+
+        NameCacheEntry hashtable[] = new NameCacheEntry[541];
 
         //
         // Usually we just want to get the 'symbol' for these chars
         //
-        String lookup(char value [], int len) {
+        String lookup(char value[], int len) {
 
             return lookupEntry(value, len).name;
         }
@@ -2296,23 +2365,25 @@ public class DTDParser {
         // string, so there's an accessor which exposes them.
         // (Mostly for element end tags.)
         //
-        NameCacheEntry lookupEntry(char value [], int len) {
+        NameCacheEntry lookupEntry(char value[], int len) {
 
             int index = 0;
             NameCacheEntry entry;
 
             // hashing to get index
-            for (int i = 0; i < len; i++)
+            for (int i = 0; i < len; i++) {
                 index = index * 31 + value[i];
+            }
             index &= 0x7fffffff;
             index %= hashtable.length;
 
             // return entry if one's there ...
             for (entry = hashtable[index];
-                 entry != null;
-                 entry = entry.next) {
-                if (entry.matches(value, len))
+                    entry != null;
+                    entry = entry.next) {
+                if (entry.matches(value, len)) {
                     return entry;
+                }
             }
 
             // else create new one
@@ -2335,16 +2406,18 @@ public class DTDParser {
     static class NameCacheEntry {
 
         String name;
-        char chars [];
+        char chars[];
         NameCacheEntry next;
 
-        boolean matches(char value [], int len) {
-
-            if (chars.length != len)
+        boolean matches(char value[], int len) {
+            if (chars == null || chars.length != len) {
                 return false;
-            for (int i = 0; i < len; i++)
-                if (value[i] != chars[i])
+            }
+            for (int i = 0; i < len; i++) {
+                if (value[i] != chars[i]) {
                     return false;
+                }
+            }
             return true;
         }
     }
@@ -2360,5 +2433,4 @@ public class DTDParser {
             super(DTDParser.class);
         }
     }
-
 }


=====================================
src/com/sun/xml/dtdparser/EndOfInputException.java → dtd-parser/src/com/sun/xml/dtdparser/EndOfInputException.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 import java.io.IOException;


=====================================
src/com/sun/xml/dtdparser/EntityDecl.java → dtd-parser/src/com/sun/xml/dtdparser/EntityDecl.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 /**
@@ -49,6 +50,5 @@ package com.sun.xml.dtdparser;
 class EntityDecl {
     String name;        // <!ENTITY name ... >
 
-    boolean isFromInternalSubset;
     boolean isPE;
 }


=====================================
src/com/sun/xml/dtdparser/ExternalEntity.java → dtd-parser/src/com/sun/xml/dtdparser/ExternalEntity.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 import org.xml.sax.EntityResolver;


=====================================
src/com/sun/xml/dtdparser/InputEntity.java → dtd-parser/src/com/sun/xml/dtdparser/InputEntity.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2015 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 import org.xml.sax.InputSource;
@@ -50,16 +51,17 @@ import java.io.InputStreamReader;
 import java.io.Reader;
 import java.io.UnsupportedEncodingException;
 import java.net.URL;
+import java.util.Arrays;
 import java.util.Locale;
 
 /**
  * This is how the parser talks to its input entities, of all kinds.
  * The entities are in a stack.
- * <p/>
+ * <p>
  * <P> For internal entities, the character arrays are referenced here,
  * and read from as needed (they're read-only).  External entities have
  * mutable buffers, that are read into as needed.
- * <p/>
+ * <p>
  * <P> <em>Note:</em> This maps CRLF (and CR) to LF without regard for
  * whether it's in an external (parsed) entity or not.  The XML 1.0 spec
  * is inconsistent in explaining EOL handling; this is the sensible way.
@@ -162,11 +164,12 @@ public class InputEntity {
             InputStream bytes = in.getByteStream();
 
             if (bytes == null)
-                reader = XmlReader.createReader(new URL(in.getSystemId())
-                        .openStream());
+                if (Boolean.valueOf(System.getProperty("enableExternalEntityProcessing")))
+                    reader = XmlReader.createReader(new URL(in.getSystemId()).openStream());
+                else
+                    fatal("P-082", new Object[] {in.getSystemId()});
             else if (in.getEncoding() != null)
-                reader = XmlReader.createReader(in.getByteStream(),
-                        in.getEncoding());
+                reader = XmlReader.createReader(in.getByteStream(), in.getEncoding());
             else
                 reader = XmlReader.createReader(in.getByteStream());
         }
@@ -183,7 +186,7 @@ public class InputEntity {
             throws SAXException {
 
         next = stack;
-        buf = b;
+        buf = Arrays.copyOf(b, b.length);
         finish = b.length;
         this.name = name;
         this.isPE = isPE;
@@ -398,10 +401,10 @@ public class InputEntity {
     /**
      * normal content; whitespace in markup may be handled
      * specially if the parser uses the content model.
-     * <p/>
+     * <p>
      * <P> content terminates with markup delimiter characters,
      * namely ampersand (&amp;) and left angle bracket (&lt;).
-     * <p/>
+     * <p>
      * <P> the document handler's characters() method is called
      * on all the content found
      */
@@ -561,11 +564,11 @@ public class InputEntity {
 
 
     /**
-     * CDATA -- character data, terminated by "]]>" and optionally
+     * CDATA -- character data, terminated by {@code "]]>"} and optionally
      * including unescaped markup delimiters (ampersand and left angle
      * bracket).  This should otherwise be exactly like character data,
      * modulo differences in error report details.
-     * <p/>
+     * <p>
      * <P> The document handler's characters() or ignorableWhitespace()
      * methods are invoked on all the character data found
      *
@@ -634,7 +637,7 @@ public class InputEntity {
                         continue;
 
                     if (white) {
-                        if (whitespaceInvalidMessage != null)
+                        if (whitespaceInvalidMessage != null && errHandler != null)
                             errHandler.error(new SAXParseException(DTDParser.messages.getMessage(locale,
                                     whitespaceInvalidMessage), null));
                         docHandler.ignorableWhitespace(buf, start,
@@ -673,7 +676,7 @@ public class InputEntity {
                 }
             }
             if (white) {
-                if (whitespaceInvalidMessage != null)
+                if (whitespaceInvalidMessage != null && errHandler != null)
                     errHandler.error(new SAXParseException(DTDParser.messages.getMessage(locale,
                             whitespaceInvalidMessage), null));
                 docHandler.ignorableWhitespace(buf, start, last - start);
@@ -715,7 +718,7 @@ public class InputEntity {
 
     /**
      * whitespace in markup (flagged to app, discardable)
-     * <p/>
+     * <p>
      * <P> the document handler's ignorableWhitespace() method
      * is called on all the whitespace found
      */
@@ -773,7 +776,7 @@ public class InputEntity {
     /**
      * returns false iff 'next' string isn't as provided,
      * else skips that text and returns true.
-     * <p/>
+     * <p>
      * <P> NOTE:  two alternative string representations are
      * both passed in, since one is faster.
      */
@@ -824,8 +827,9 @@ public class InputEntity {
             // to get rid of the symbol length constraint, since having
             // the wrong symbol is a fatal error anyway ...
             //
-            if (len > buf.length)
-                fatal("P-077", new Object[]{new Integer(buf.length)});
+            if (len > buf.length) {
+                fatal("P-077", new Object[]{Integer.valueOf(buf.length)});
+            }
 
             fillbuf();
             return peek(next, chars);
@@ -998,7 +1002,9 @@ public class InputEntity {
 
         // not continuable ... e.g. WF errors
         close();
-        errHandler.fatalError(x);
+        if (errHandler != null) {
+            errHandler.fatalError(x);
+        }
         throw x;
     }
 }


=====================================
src/com/sun/xml/dtdparser/InternalEntity.java → dtd-parser/src/com/sun/xml/dtdparser/InternalEntity.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 


=====================================
src/com/sun/xml/dtdparser/MessageCatalog.java → dtd-parser/src/com/sun/xml/dtdparser/MessageCatalog.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2015 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 import java.io.InputStream;
@@ -57,12 +58,12 @@ import java.util.ResourceBundle;
  * for the language used in presenting a message from some package, where
  * both user (client) preferences and application (server) support are
  * accounted for when choosing locales and formatting messages.
- * <p/>
- * <P> Each package should have a singleton package-private message catalog
+ *
+ * <p>Each package should have a singleton package-private message catalog
  * class.  This ensures that the correct class loader will always be used to
- * access message resources, and minimizes use of memory: <PRE>
+ * access message resources, and minimizes use of memory:</p><pre>
  * package <em>some.package</em>;
- * <p/>
+ *
  * // "foo" might be public
  * class foo {
  * ...
@@ -73,14 +74,14 @@ import java.util.ResourceBundle;
  * }
  * ...
  * }
- * </PRE>
- * <p/>
- * <P> Messages for a known client could be generated using code
- * something like this:  <PRE>
+ * </pre>
+ *
+ * <p> Messages for a known client could be generated using code
+ * something like this:</p><pre>
  * String clientLanguages [];
  * Locale clientLocale;
  * String clientMessage;
- * <p/>
+ *
  * // client languages will probably be provided by client,
  * // e.g. by an HTTP/1.1 "Accept-Language" header.
  * clientLanguages = new String [] { "en-ca", "fr-ca", "ja", "zh" };
@@ -89,27 +90,27 @@ import java.util.ResourceBundle;
  * "fileCount",
  * new Object [] { new Integer (numberOfFiles) }
  * );
- * </PRE>
- * <p/>
- * <P> At this time, this class does not include functionality permitting
+ * </pre>
+ *
+ * <p> At this time, this class does not include functionality permitting
  * messages to be passed around and localized after-the-fact.  The consequence
  * of this is that the locale for messages must be passed down through layers
  * which have no normal reason to support such passdown, or else the system
- * default locale must be used instead of the one the client needs.
- * <p/>
- * <P> <hr> The following guidelines should be used when constructiong
- * multi-language applications:  <OL>
- * <p/>
- * <LI> Always use <a href=#chooseLocale>chooseLocale</a> to select the
+ * default locale must be used instead of the one the client needs.</p>
+ *
+ * <p> The following guidelines should be used when constructiong
+ * multi-language applications:</p>
+ * <ol>
+ * <li> Always use <a href=#chooseLocale>chooseLocale</a> to select the
  * locale you pass to your <code>getMessage</code> call.  This lets your
  * applications use IETF standard locale names, and avoids needless
- * use of system defaults.
- * <p/>
- * <LI> The localized messages for a given package should always go in
+ * use of system defaults.</li>
+ *
+ * <li> The localized messages for a given package should always go in
  * a separate <em>resources</em> sub-package.  There are security
- * implications; see below.
- * <p/>
- * <LI> Make sure that a language name is included in each bundle name,
+ * implications; see below.</li>
+ *
+ * <li> Make sure that a language name is included in each bundle name,
  * so that the developer's locale will not be inadvertently used. That
  * is, don't create defaults like <em>resources/Messages.properties</em>
  * or <em>resources/Messages.class</em>, since ResourceBundle will choose
@@ -117,21 +118,20 @@ import java.util.ResourceBundle;
  * appropriate language for its messages.  Your message bundles should
  * have names like <em>Messages_en.properties</em> (for the "en", or
  * English, language) or <em>Messages_ja.class</em> ("ja" indicates the
- * Japanese language).
- * <p/>
- * <LI> Only use property files for messages in languages which can
+ * Japanese language).</li>
+ *
+ * <li> Only use property files for messages in languages which can
  * be limited to the ISO Latin/1 (8859-1) characters supported by the
  * property file format.  (This is mostly Western European languages.)
  * Otherwise, subclass ResourceBundle to provide your messages; it is
- * simplest to subclass <code>java.util.ListResourceBundle</code>.
- * <p/>
- * <LI> Never use another package's message catalog or resource bundles.
+ * simplest to subclass <code>java.util.ListResourceBundle</code>.</li>
+ *
+ * <li> Never use another package's message catalog or resource bundles.
  * It should not be possible for a change internal to one package (such
- * as eliminating or improving messages) to break another package.
- * <p/>
- * </OL>
- * <p/>
- * <P> The "resources" sub-package can be treated separately from the
+ * as eliminating or improving messages) to break another package.</li>
+ *</ol>
+ *
+ * <p>The "resources" sub-package can be treated separately from the
  * package with which it is associated.  That main package may be sealed
  * and possibly signed, preventing other software from adding classes to
  * the package which would be able to access methods and data which are
@@ -141,7 +141,7 @@ import java.util.ResourceBundle;
  * (text and class files) need to be added to some package.  Since they
  * should not be added to the main package, the "resources" subpackage is
  * used without risking the security or integrity of that main package
- * as distributed in its JAR file.
+ * as distributed in its JAR file.</p>
  *
  * @author David Brownell
  * @version 1.1, 00/08/05
@@ -295,11 +295,11 @@ abstract public class MessageCatalog {
      * languages is supported, a null value is returned.  Such a list of
      * languages might be provided in an HTTP/1.1 "Accept-Language" header
      * field, or through some other content negotiation mechanism.
-     * <p/>
-     * <P> The language specifiers recognized are RFC 1766 style ("fr" for
+     *
+     * <p> The language specifiers recognized are RFC 1766 style ("fr" for
      * all French, "fr-ca" for Canadian French), although only the strict
      * ISO subset (two letter language and country specifiers) is currently
-     * supported.  Java-style locale strings ("fr_CA") are also supported.
+     * supported.  Java-style locale strings ("fr_CA") are also supported.</p>
      *
      * @param languages Array of language specifiers, ordered with the most
      *                  preferable one at the front.  For example, "en-ca" then "fr-ca",
@@ -349,7 +349,7 @@ abstract public class MessageCatalog {
 
             // language code ... if already lowercase, we change nothing
             if (len == 2) {
-                lang = lang.toLowerCase();
+                lang = lang.toLowerCase(Locale.ENGLISH);
                 if (lang != languages[i]) {
                     if (!didClone) {
                         languages = (String[]) languages.clone();
@@ -451,7 +451,7 @@ abstract public class MessageCatalog {
      * Returns true iff the specified locale has explicit language support.
      * For example, the traditional Chinese locale "zh_TW" has such support
      * if there are message bundles suffixed with either "zh_TW" or "zh"..
-     * <p/>
+     *
      * <P> This method is used to bypass part of the search path mechanism
      * of the <code>ResourceBundle</code> class, specifically the parts which
      * force use of default locales and bundles.  Such bypassing is required


=====================================
src/com/sun/xml/dtdparser/Resolver.java → dtd-parser/src/com/sun/xml/dtdparser/Resolver.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2015 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 import org.xml.sax.EntityResolver;
@@ -49,52 +50,53 @@ import java.io.InputStream;
 import java.net.URL;
 import java.net.URLConnection;
 import java.util.Hashtable;
+import java.util.Locale;
 
 /**
  * This entity resolver class provides a number of utilities which can help
  * managment of external parsed entities in XML.  These are commonly used
  * to hold markup declarations that are to be used as part of a Document
  * Type Declaration (DTD), or to hold text marked up with XML.
- * <p/>
+ * <p>
  * <P> Features include: <UL>
- * <p/>
+ *
  * <LI> Static factory methods are provided for constructing SAX InputSource
  * objects from Files, URLs, or MIME objects.  This eliminates a class of
- * error-prone coding in applications.
- * <p/>
- * <LI> Character encodings for XML documents are correctly supported: <UL>
- * <p/>
+ * error-prone coding in applications.</LI>
+ *
+ * <LI> Character encodings for XML documents are correctly supported:<UL>
+ *
  * <LI> The encodings defined in the RFCs for MIME content types
  * (2046 for general MIME, and 2376 for XML in particular), are
  * supported, handling <em>charset=...</em> attributes and accepting
- * content types which are known to be safe for use with XML;
- * <p/>
+ * content types which are known to be safe for use with XML;</LI>
+ *
  * <LI> The character encoding autodetection algorithm identified
  * in the XML specification is used, and leverages all of
- * the JDK 1.1 (and later) character encoding support.
- * <p/>
+ * the JDK 1.1 (and later) character encoding support.</LI>
+ *
  * <LI> The use of MIME typing may optionally be disabled, forcing the
  * use of autodetection, to support web servers which don't correctly
  * report MIME types for XML.  For example, they may report text that
  * is encoded in EUC-JP as being US-ASCII text, leading to fatal
- * errors during parsing.
- * <p/>
+ * errors during parsing.</LI>
+ *
  * <LI> The InputSource objects returned by this class always
  * have a <code>java.io.Reader</code> available as the "character
- * stream" property.
- * <p/>
- * </UL>
- * <p/>
+ * stream" property.</LI>
+ *
+ * </UL></LI>
+ *
  * <LI> Catalog entries can map public identifiers to Java resources or
  * to local URLs.  These are used to reduce network dependencies and loads,
  * and will often be used for external DTD components.  For example, packages
  * shipping DTD files as resources in JAR files can eliminate network traffic
  * when accessing them, and sites may provide local caches of common DTDs.
  * Note that no particular catalog syntax is supported by this class, only
- * the notion of a set of entries.
- * <p/>
+ * the notion of a set of entries.</LI>
+ *
  * </UL>
- * <p/>
+ * <p>
  * <P> Subclasses can perform tasks such as supporting new URI schemes for
  * URIs which are not URLs, such as URNs (see RFC 2396) or for accessing
  * MIME entities which are part of a <em>multipart/related</em> group
@@ -140,7 +142,7 @@ public class Resolver implements EntityResolver {
     }
 
     /**
-     * Returns an input source, using the MIME type information and URL
+     * <p>Returns an input source, using the MIME type information and URL
      * scheme to statically determine the correct character encoding if
      * possible and otherwise autodetecting it.  MIME carefully specifies
      * the character encoding defaults, and how attributes of the content
@@ -148,18 +150,18 @@ public class Resolver implements EntityResolver {
      * (UTF-8 and UTF-16), and includes an XML declaration which can be
      * used to internally label most documents encoded using US-ASCII
      * supersets (such as Shift_JIS, EUC-JP, ISO-2022-*, ISO-8859-*, and
-     * more).
-     * <p/>
-     * <P> This method can be used to access XML documents which do not
+     * more).</p>
+     *
+     * <p> This method can be used to access XML documents which do not
      * have URIs (such as servlet input streams, or most JavaMail message
      * entities) and to support access methods such as HTTP POST or PUT.
-     * (URLs normally return content using the GET method.)
-     * <p/>
-     * <P> <em> The caller should set the system ID in order for relative URIs
+     * (URLs normally return content using the GET method.)</p>
+     *
+     * <p> <em> The caller should set the system ID in order for relative URIs
      * found in this document to be interpreted correctly.</em> In some cases,
      * a custom resolver will need to be used; for example, documents
      * may be grouped in a single MIME "multipart/related" bundle, and
-     * relative URLs would refer to other documents in that bundle.
+     * relative URLs would refer to other documents in that bundle.</p>
      *
      * @param contentType The MIME content type for the source for which
      *                    an InputSource is desired, such as <em>text/xml;charset=utf-8</em>.
@@ -180,7 +182,7 @@ public class Resolver implements EntityResolver {
         if (contentType != null) {
             int index;
 
-            contentType = contentType.toLowerCase();
+            contentType = contentType.toLowerCase(Locale.ENGLISH);
             index = contentType.indexOf(';');
             if (index != -1) {
                 String attributes;
@@ -309,7 +311,7 @@ public class Resolver implements EntityResolver {
      * consulted.  If no mapping is found there, a catalog mapping names
      * to java resources is consulted.  Finally, if neither mapping found
      * a copy of the entity, the specified URI is used.
-     * <p/>
+     * <p>
      * <P> When a URI is used, <a href="#createInputSource">
      * createInputSource</a> is used to correctly deduce the character
      * encoding used by this entity.  No MIME type checking is done.
@@ -319,6 +321,7 @@ public class Resolver implements EntityResolver {
      * @param uri  Used when no alternate copy of the entity is found;
      *             this is the XML "system ID", normally a URI.
      */
+    @Override
     public InputSource resolveEntity(String name, String uri)
             throws IOException {
         InputSource retval;
@@ -326,7 +329,7 @@ public class Resolver implements EntityResolver {
         InputStream stream;
 
         // prefer explicit URI mappings, then bundled resources...
-        if (mappedURI == null && (stream = mapResource(name)) != null) {
+        if (mappedURI == null && (stream = mapResource(name)) != null && id2resource != null) {
             uri = "java:resource:" + (String) id2resource.get(name);
             retval = new InputSource(XmlReader.createReader(stream));
 
@@ -437,7 +440,7 @@ public class Resolver implements EntityResolver {
      * included in XML documents.  This mechanism should most typically be
      * used for Document Type Definitions (DTDs), where the public IDs are
      * formally managed and versioned.
-     * <p/>
+     * <p>
      * <P> If a mapping to a URI has been provided, that mapping takes
      * precedence over this one.
      *


=====================================
src/com/sun/xml/dtdparser/SimpleHashtable.java → dtd-parser/src/com/sun/xml/dtdparser/SimpleHashtable.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 import java.util.Enumeration;


=====================================
src/com/sun/xml/dtdparser/XmlChars.java → dtd-parser/src/com/sun/xml/dtdparser/XmlChars.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2015 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 
@@ -61,7 +62,7 @@ public class XmlChars {
      * documents containing only Unicode.  (The <code>char</code> datatype
      * in the Java Programming Language represents Unicode characters,
      * including unpaired surrogates.)
-     * <p/>
+     * <p>
      * <P> In XML, UCS-4 characters can also be encoded by the use of
      * <em>character references</em> such as <b>&#x12345678;</b>, which
      * happens to refer to a character that is disallowed in XML documents.
@@ -378,17 +379,6 @@ public class XmlChars {
         }
     }
 
-    private static boolean isDigit(char c) {
-        // [88] Digit ::= ...
-
-        //
-        // java.lang.Character.isDigit is correct from the XML point
-        // of view except that it allows "fullwidth" digits.
-        //
-        return Character.isDigit(c)
-                && !((c >= 0xff10) && (c <= 0xff19));
-    }
-
     private static boolean isExtender(char c) {
         // [89] Extender ::= ...
         return c == 0x00b7 || c == 0x02d0 || c == 0x02d1 || c == 0x0387


=====================================
src/com/sun/xml/dtdparser/XmlNames.java → dtd-parser/src/com/sun/xml/dtdparser/XmlNames.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 


=====================================
src/com/sun/xml/dtdparser/XmlReader.java → dtd-parser/src/com/sun/xml/dtdparser/XmlReader.java
=====================================
@@ -1,14 +1,14 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998-2012 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License.  You can
  * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+ * http://glassfish.java.net/public/CDDL+GPL_1_1.html
  * or packager/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  *
@@ -37,6 +37,7 @@
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
+
 package com.sun.xml.dtdparser;
 
 import java.io.ByteArrayInputStream;
@@ -47,6 +48,7 @@ import java.io.InputStreamReader;
 import java.io.PushbackInputStream;
 import java.io.Reader;
 import java.util.Hashtable;
+import java.util.Locale;
 
 
 // NOTE:  Add I18N support to this class when JDK gets the ability to
@@ -192,7 +194,7 @@ final class XmlReader extends Reader {
     // returns an encoding name supported by JDK >= 1.1.6
     // for some cases required by the XML spec
     private static String std2java(String encoding) {
-        String temp = encoding.toUpperCase();
+        String temp = encoding.toUpperCase(Locale.ENGLISH);
         temp = (String) charsets.get(temp);
         return temp != null ? temp : encoding;
     }
@@ -335,7 +337,7 @@ final class XmlReader extends Reader {
         // Next must be "l" (and whitespace) else we conclude
         // error and choose UTF-8.
         //
-        if ((c = r.read()) != 'l') {
+        if ((r.read()) != 'l') {
             setEncoding(pb, "UTF-8");
             return;
         }
@@ -772,6 +774,7 @@ final class XmlReader extends Reader {
             super(in);
         }
 
+        @Override
         public int read(char buf [], int offset, int len) throws IOException {
             int i;
 


=====================================
src/com/sun/xml/dtdparser/package.html → dtd-parser/src/com/sun/xml/dtdparser/package.html
=====================================
@@ -2,14 +2,14 @@
 
     DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-    Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 1998-2012 Oracle and/or its affiliates. All rights reserved.
 
     The contents of this file are subject to the terms of either the GNU
     General Public License Version 2 only ("GPL") or the Common Development
     and Distribution License("CDDL") (collectively, the "License").  You
     may not use this file except in compliance with the License.  You can
     obtain a copy of the License at
-    https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+    http://glassfish.java.net/public/CDDL+GPL_1_1.html
     or packager/legal/LICENSE.txt.  See the License for the specific
     language governing permissions and limitations under the License.
 


=====================================
src/com/sun/xml/dtdparser/resources/Messages.properties → dtd-parser/src/com/sun/xml/dtdparser/resources/Messages.properties
=====================================
@@ -1,14 +1,14 @@
 #
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 #
-# Copyright (c) 1998-2011 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998-2013 Oracle and/or its affiliates. All rights reserved.
 #
 # The contents of this file are subject to the terms of either the GNU
 # General Public License Version 2 only ("GPL") or the Common Development
 # and Distribution License("CDDL") (collectively, the "License").  You
 # may not use this file except in compliance with the License.  You can
 # obtain a copy of the License at
-# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+# http://glassfish.java.net/public/CDDL+GPL_1_1.html
 # or packager/legal/LICENSE.txt.  See the License for the specific
 # language governing permissions and limitations under the License.
 #
@@ -195,6 +195,7 @@ P-079 = The content beginning "<{1}" is not legal markup \
 P-080 = Parameter entity references must not appear within \
 	markup declarations in the internal DTD subset
 P-081 = Incomplete Unicode surrogate pair:  &#x{0}
+P-082 = External parsing is disabled. Cannot parse URI: {0}
 
 #
 # Validation messages, won't normally show up unless validation is


=====================================
project.xml deleted
=====================================
@@ -1,77 +0,0 @@
-<!--
-Copyright (c) 2009, Sun Microsystems
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-  * Redistributions of source code must retain the above copyright notice, this
-    list of conditions and the following disclaimer.
-  * Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-  * Neither the name of the Sun Microsystems nor the names of its contributors
-    may be used to endorse or promote products derived from this software
-    without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<project>
-  <pomVersion>3</pomVersion>
-
-  <id>dtd-parser</id>
-  <name>dtd-parser</name>
-  <groupId>sun</groupId>
-  <currentVersion>1.0</currentVersion>
-  
-  <organization>
-    <name>Sun Microsystems</name>
-    <url>http://www.sun.com/</url>
-  </organization>
-  <inceptionYear>2005</inceptionYear>
-
-  <shortDescription>API for parsing DTDs</shortDescription>
-  <url>http://dtd-parser.dev.java.net/</url>
-  
-  <package>com.sun.xml.dtdparser</package>
-
-  <developers>
-    <developer>
-      <name>Kohsuke Kawaguchi</name>
-      <id>kohsuke</id>
-      <email>kohsuke.kawaguchi at sun.com</email>
-    </developer>
-  </developers>
-
-  <dependencies /> <!-- none! -->
-
-  <build>
-    <nagEmailAddress>kk at kohsuke.org</nagEmailAddress>
-    <sourceDirectory>src</sourceDirectory>
-
-    <resources>
-      <resource>
-        <directory>src</directory>
-        <includes>
-          <include>**/*.properties</include>
-        </includes>
-      </resource>
-    </resources>
-    <!--unitTestSourceDirectory>src/test</unitTestSourceDirectory>
-    <unitTest>
-      <includes>
-        <include>**/*Test.class</include>
-      </includes>
-    </unitTest-->
-  </build>
-
-</project>



View it on GitLab: https://salsa.debian.org/java-team/dtd-parser/-/commit/7f7c84ddab3c927fa5e9181e029674c503ba5659

-- 
View it on GitLab: https://salsa.debian.org/java-team/dtd-parser/-/commit/7f7c84ddab3c927fa5e9181e029674c503ba5659
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20210211/42a1cc46/attachment.html>


More information about the pkg-java-commits mailing list