[maven-release-plugin] copy for tag uimaj-2.10.2

git-svn-id: https://svn.apache.org/repos/asf/uima/uimaj/tags/uimaj-2.10.2@1813822 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/RELEASE_NOTES.html b/RELEASE_NOTES.html
index 033b5fc..49290a1 100644
--- a/RELEASE_NOTES.html
+++ b/RELEASE_NOTES.html
@@ -20,10 +20,10 @@
    -->
 <html>
 <head>
-  <title>Apache UIMA v2.10.1 Release Notes</title>
+  <title>Apache UIMA v2.10.2 Release Notes</title>
 </head>
 <body>
-<h1>Apache UIMA (Unstructured Information Management Architecture) v2.10.1 Release Notes</h1>
+<h1>Apache UIMA (Unstructured Information Management Architecture) v2.10.2 Release Notes</h1>
 
 <h2>Contents</h2>
 <p>
@@ -85,6 +85,7 @@
 <ul><li>fixed a bug in xmi serialization/deserialization of 0-length string array</li>
 <li>added a filter to the Annotation Viewer utility</li>
 <li>Eclipse plugin jars are now Eclipse-signed.</li>
+<li>The Eclipse examples project fixed a typo in the javadoc attachments.
 <li>The Eclipse update site was pruned of old releases; these are still available at
 https://archive.apache.org/dist/uima/eclipse-update-site/uimaj-2.3.1-2.10.1
 </ul>
diff --git a/uimaj-core/src/main/java/org/apache/uima/internal/util/XMLUtils.java b/uimaj-core/src/main/java/org/apache/uima/internal/util/XMLUtils.java
index 75c1999..1f75b37 100644
--- a/uimaj-core/src/main/java/org/apache/uima/internal/util/XMLUtils.java
+++ b/uimaj-core/src/main/java/org/apache/uima/internal/util/XMLUtils.java
@@ -23,7 +23,6 @@
 import java.io.Writer;
 import java.lang.reflect.Constructor;
 
-import javax.xml.XMLConstants;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParserFactory;
@@ -48,7 +47,16 @@
  * 
  */
 public abstract class XMLUtils {
-
+  
+  // constants - not all Java versions define these
+  
+  private static final String ACCESS_EXTERNAL_STYLESHEET = "http://javax.xml.XMLConstants/property/accessExternalStylesheet";
+  private static final String ACCESS_EXTERNAL_DTD = "http://javax.xml.XMLConstants/property/accessExternalDTD";
+  
+  private static final String DISALLOW_DOCTYPE_DECL = "http://apache.org/xml/features/disallow-doctype-decl";
+  private static final String LOAD_EXTERNAL_DTD = "http://apache.org/xml/features/nonvalidating/load-external-dtd";
+  private static final String EXTERNAL_GENERAL_ENTITIES = "http://xml.org/sax/features/external-general-entities";
+  private static final String EXTERNAL_PARAMETER_ENTITIES = "http://xml.org/sax/features/external-parameter-entities";
   /**
    * Normalizes the given string for output to XML. This converts all special characters, e.g. &lt;,
    * %gt;, &amp;, to their XML representations, e.g. &amp;lt;, &amp;gt;, &amp;amp;. The normalized
@@ -534,29 +542,29 @@
   public static SAXParserFactory createSAXParserFactory() {
     SAXParserFactory factory = SAXParserFactory.newInstance();
     try {
-      factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
+      factory.setFeature(DISALLOW_DOCTYPE_DECL, true);
     } catch (SAXNotRecognizedException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "SAXParserFactory didn't recognized feature http://apache.org/xml/features/disallow-doctype-decl");
+          "SAXParserFactory didn't recognize feature " + DISALLOW_DOCTYPE_DECL);
     } catch (SAXNotSupportedException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "SAXParserFactory doesn't support feature http://apache.org/xml/features/disallow-doctype-decl");
+          "SAXParserFactory doesn't support feature " + DISALLOW_DOCTYPE_DECL);
     } catch (ParserConfigurationException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "SAXParserFactory doesn't support feature http://apache.org/xml/features/disallow-doctype-decl");
+          "SAXParserFactory doesn't support feature " + DISALLOW_DOCTYPE_DECL);
     }
     
     try {
-      factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
+      factory.setFeature(LOAD_EXTERNAL_DTD, false);
     } catch (SAXNotRecognizedException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "SAXParserFactory didn't recognized feature http://apache.org/xml/features/nonvalidating/load-external-dtd");
+          "SAXParserFactory didn't recognize feature " + LOAD_EXTERNAL_DTD);
     } catch (SAXNotSupportedException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "SAXParserFactory doesn't support feature http://apache.org/xml/features/nonvalidating/load-external-dtd");
+          "SAXParserFactory doesn't support feature " + LOAD_EXTERNAL_DTD);
     } catch (ParserConfigurationException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "SAXParserFactory doesn't support feature http://apache.org/xml/features/nonvalidating/load-external-dtd");
+          "SAXParserFactory doesn't support feature " + LOAD_EXTERNAL_DTD);
     }
     
     factory.setXIncludeAware(false);
@@ -566,33 +574,33 @@
   public static XMLReader createXMLReader() throws SAXException {
     XMLReader xmlReader = XMLReaderFactory.createXMLReader();
     try {
-      xmlReader.setFeature("http://xml.org/sax/features/external-general-entities", false);
+      xmlReader.setFeature(EXTERNAL_GENERAL_ENTITIES, false);
     } catch (SAXNotRecognizedException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "XMLReader didn't recognized feature http://apache.org/xml/features/disallow-doctype-decl");
+          "XMLReader didn't recognize feature " + EXTERNAL_GENERAL_ENTITIES);
     } catch (SAXNotSupportedException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "XMLReader doesn't support feature http://apache.org/xml/features/disallow-doctype-decl");
+          "XMLReader doesn't support feature " + EXTERNAL_GENERAL_ENTITIES);
     }
 
     try {
-      xmlReader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
+      xmlReader.setFeature(EXTERNAL_PARAMETER_ENTITIES, false);
     } catch (SAXNotRecognizedException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "XMLReader didn't recognized feature http://apache.org/xml/features/disallow-doctype-decl");
+          "XMLReader didn't recognize feature " + EXTERNAL_PARAMETER_ENTITIES);
     } catch (SAXNotSupportedException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "XMLReader doesn't support feature http://apache.org/xml/features/disallow-doctype-decl");
+          "XMLReader doesn't support feature " + EXTERNAL_PARAMETER_ENTITIES);
     }
 
     try {
-      xmlReader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd",false);
+      xmlReader.setFeature(LOAD_EXTERNAL_DTD,false);
     } catch (SAXNotRecognizedException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "XMLReader didn't recognized feature http://apache.org/xml/features/disallow-doctype-decl");
+          "XMLReader didn't recognized feature " + LOAD_EXTERNAL_DTD);
     } catch (SAXNotSupportedException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "XMLReader doesn't support feature http://apache.org/xml/features/disallow-doctype-decl");
+          "XMLReader doesn't support feature " + LOAD_EXTERNAL_DTD);
     }
 
     return xmlReader;
@@ -601,17 +609,17 @@
   public static SAXTransformerFactory createSaxTransformerFactory() {
     SAXTransformerFactory saxTransformerFactory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();    
     try {
-      saxTransformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
+      saxTransformerFactory.setAttribute(ACCESS_EXTERNAL_DTD, "");
     } catch (IllegalArgumentException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "SAXTransformerFactory didn't recognized setting attribute XMLConstants.ACCESS_EXTERNAL_DTD");
+          "SAXTransformerFactory didn't recognize setting attribute " + ACCESS_EXTERNAL_DTD);
     }
 
     try {
-      saxTransformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");
+      saxTransformerFactory.setAttribute(ACCESS_EXTERNAL_STYLESHEET, "");
     } catch (IllegalArgumentException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "SAXTransformerFactory didn't recognized setting attribute XMLConstants.ACCESS_EXTERNAL_STYLESHEET");
+          "SAXTransformerFactory didn't recognize setting attribute " + ACCESS_EXTERNAL_STYLESHEET);
     }
 
     return saxTransformerFactory;
@@ -620,17 +628,17 @@
   public static TransformerFactory createTransformerFactory() {
     TransformerFactory transformerFactory = TransformerFactory.newInstance();
     try {
-      transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
+      transformerFactory.setAttribute(ACCESS_EXTERNAL_DTD, "");
     } catch (IllegalArgumentException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "TransformerFactory didn't recognized setting attribute XMLConstants.ACCESS_EXTERNAL_DTD");
+          "TransformerFactory didn't recognize setting attribute " + ACCESS_EXTERNAL_DTD);
     }
     
     try {
-      transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");
+      transformerFactory.setAttribute(ACCESS_EXTERNAL_STYLESHEET, "");
     } catch (IllegalArgumentException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "TransformerFactory didn't recognized setting attribute XMLConstants.ACCESS_EXTERNAL_STYLESHEET");
+          "TransformerFactory didn't recognize setting attribute " + ACCESS_EXTERNAL_STYLESHEET);
     }
 
     return transformerFactory;
@@ -639,17 +647,17 @@
   public static DocumentBuilderFactory createDocumentBuilderFactory() { 
     DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
     try {
-      documentBuilderFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
+      documentBuilderFactory.setFeature(DISALLOW_DOCTYPE_DECL, true);
     } catch (ParserConfigurationException e1) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "DocumentBuilderFactory didn't recognized setting feature http://apache.org/xml/features/disallow-doctype-decl");
+          "DocumentBuilderFactory didn't recognize setting feature " + DISALLOW_DOCTYPE_DECL);
     }
     
     try {
-      documentBuilderFactory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
+      documentBuilderFactory.setFeature(LOAD_EXTERNAL_DTD, false);
     } catch (ParserConfigurationException e) {
       UIMAFramework.getLogger().log(Level.WARNING, 
-          "DocumentBuilderFactory doesn't support feature http://apache.org/xml/features/nonvalidating/load-external-dtd");
+          "DocumentBuilderFactory doesn't support feature " + LOAD_EXTERNAL_DTD);
     }
     
     documentBuilderFactory.setXIncludeAware(false);
diff --git a/uimaj-core/src/test/java/org/apache/uima/util/impl/OptimizeStringsTest.java b/uimaj-core/src/test/java/org/apache/uima/util/impl/OptimizeStringsTest.java
index 392d3cd..1611a02 100644
--- a/uimaj-core/src/test/java/org/apache/uima/util/impl/OptimizeStringsTest.java
+++ b/uimaj-core/src/test/java/org/apache/uima/util/impl/OptimizeStringsTest.java
@@ -25,30 +25,38 @@
 
 public class OptimizeStringsTest extends TestCase {
 
-  private static Field STRING_OFFSET;
-  static {
-    try {
-      STRING_OFFSET = String.class.getDeclaredField("offset");
-      STRING_OFFSET.setAccessible(true);
-    } catch (SecurityException e) {
-      throw new RuntimeException(e);
-    } catch (NoSuchFieldException e) {
-      System.err.println("OptimizeStringsTest could not find the String offset field, skipping that part of the test.");
-      STRING_OFFSET = null;
-    }
-  }
+  // modern Javas do this in various ways, can't depend on internal impl
+//  private static Field STRING_OFFSET;
+//  static {
+//    try {
+//   // Found that IBM Java 8 version 8.0.4.2 returns a value for the field "offset", but it's 0
+//      // and there doesn't seem to be an offset field in that class.
+//      if (System.getProperty("java.version").startsWith("1.8")) {
+//        STRING_OFFSET = null;
+//      } else {
+//        STRING_OFFSET =  String.class.getDeclaredField("offset");
+//        STRING_OFFSET.setAccessible(true);
+//      }
+//    } catch (SecurityException e) {
+//      throw new RuntimeException(e);
+//    } catch (NoSuchFieldException e) {
+//      System.err.println("OptimizeStringsTest could not find the String offset field, skipping that part of the test.");
+//      STRING_OFFSET = null;
+//    }
+//  }
     
   public static int getStringOffset(String s) {
-    try {
-      if (STRING_OFFSET != null) {
-        return STRING_OFFSET.getInt(s);
-      }
-      return -1;
-    } catch (IllegalArgumentException e) {
-      throw new RuntimeException(e);
-    } catch (IllegalAccessException e) {
-      throw new RuntimeException(e);
-    }
+    return -1;  // disabled
+//    try {
+//      if (STRING_OFFSET != null) {
+//        return STRING_OFFSET.getInt(s);
+//      }
+//      return -1;
+//    } catch (IllegalArgumentException e) {
+//      throw new RuntimeException(e);
+//    } catch (IllegalAccessException e) {
+//      throw new RuntimeException(e);
+//    }
   }
    
   public void testOpStr() {
diff --git a/uimaj-examples/src/main/eclipseProject/classpath b/uimaj-examples/src/main/eclipseProject/classpath
index bc2f698..2397c70 100644
--- a/uimaj-examples/src/main/eclipseProject/classpath
+++ b/uimaj-examples/src/main/eclipseProject/classpath
@@ -24,24 +24,30 @@
 		<attributes>

 		  <!-- Strings file:/C:/Program Files/apache-uima are replaced

 		       by the adjustExamplePaths script with the UIMA install location -->

-			<attribute value="file:/C:/Program Files/apache-uima/docs/api" name="javadoc_location"/>

+			<attribute value="file:/C:/Program Files/apache-uima/docs/d/api" name="javadoc_location"/>

 		</attributes>

 	</classpathentry>		

 	<classpathentry kind="var" path="UIMA_HOME/lib/uima-document-annotation.jar">

 		<attributes>

-			<attribute value="file:/C:/Program Files/apache-uima/docs/api" name="javadoc_location"/>

+			<attribute value="file:/C:/Program Files/apache-uima/docs/d/api" name="javadoc_location"/>

 		</attributes>

 	</classpathentry>		

 	<classpathentry kind="var" path="UIMA_HOME/lib/uima-cpe.jar">

 		<attributes>

-			<attribute value="file:/C:/Program Files/apache-uima/docs/api" name="javadoc_location"/>

+			<attribute value="file:/C:/Program Files/apache-uima/docs/d/api" name="javadoc_location"/>

 		</attributes>

 	</classpathentry>		

 	<classpathentry kind="var" path="UIMA_HOME/lib/uima-tools.jar">

 			<attributes>

-			<attribute value="file:/C:/Program Files/apache-uima/docs/api" name="javadoc_location"/>

+			<attribute value="file:/C:/Program Files/apache-uima/docs/d/api" name="javadoc_location"/>

 		</attributes>

 	</classpathentry>			

+  <classpathentry kind="var" path="UIMA_HOME/lib/uimaj-json.jar">

+    <attributes>

+      <attribute value="file:/C:/Program Files/apache-uima/docs/d/api" name="javadoc_location"/>

+    </attributes>

+  </classpathentry>

+  <classpathentry kind="var" path="UIMA_HOME/lib/jackson-core-2.4.2.jar"/>   

 	<classpathentry kind="var" path="UIMA_HOME/lib/uima-adapter-vinci.jar"/>

 	<classpathentry kind="var" path="UIMA_HOME/lib/uima-adapter-soap.jar"/>

 	<classpathentry kind="var" path="UIMA_HOME/lib/jVinci.jar"/>