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

git-svn-id: https://svn.apache.org/repos/asf/uima/uimaj/tags/uimaj-2.7.0@1663446 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/RELEASE_NOTES.html b/RELEASE_NOTES.html
index 3715f77..b925a58 100644
--- a/RELEASE_NOTES.html
+++ b/RELEASE_NOTES.html
@@ -144,14 +144,19 @@
   iterator), is addressed with a new class of "snapshot" iterators.
   These take a snapshot of the state of the index when the iterator is created; subsequent modifications to the index
   are then permitted, while the iterator continues to iterate over the snapshot it created; these iterators do not
-  throw ConcurrentModificationException.  The implementation of this feature is via a new method on FSIndex, which 
-  creates a light-weigh copy of the the FSIndex instance whose iterator method iterators gets the Snapshot kind.  
+  throw ConcurrentModificationException.  The implementation of this feature is via a new method on FSIndex, 
+  <a target="_blank" href=
+  "http://uima.apache.org/d/uimaj-2.7.0/apidocs/org/apache/uima/cas/FSIndex.html#withSnapshotIterators--">
+  withSnapshotIterators()</a>, which 
+  creates a light-weight copy of the the FSIndex instance whose iterator method iterators gets the Snapshot kind.  
   This approach allows using the new index in Java's "extended for" statement.</p>
   
   <p>The current implementation of the snapshot iterators makes a snapshot of the index being iterated over, at
   creation time, which has a cost in space and time.</p>
 
 <h3>Other changes</h3>
+<p>Some of the other major changes are listed here; for the complete list, see <a href="issuesFixed/jira-report.html">
+the Issues Fixed report</a>.</p> 
 <ul><li> making the JCasGen Eclipse plugin work with more varieties of specifications for class paths.
  Jira issues: UIMA-<a target="_blank" href="https://issues.apache.org/jira/browse/UIMA-4080">4080</a>/
  <a target="_blank" href="https://issues.apache.org/jira/browse/UIMA-4081">4081</a></li>
@@ -166,11 +171,13 @@
  <li>default bag indexes will now be created if there are only Set indexes. 
  Jira issue: <a target="_blank" href="https://issues.apache.org/jira/browse/UIMA-4111">UIMA-4111</a>.</li>
  
- <li>Xmi CAS Serialization now checks to see that list and array feature values marked as multipleReferencesAllowed=false
+ <li><p>Xmi CAS Serialization now checks to see that list and array feature values marked as multipleReferencesAllowed=false
  (or not marked at all, which defaults to multipleReferencesAllowed=false) are not multiply-referenced.  If they are,
  they continue to be serialized as if they are independent objects (as was previously done), but now a new 
  warning message is issued.  Because there can be a huge number of these messages, they are automatically
- throttled down, to prevent running out of room in the error logs.</li>
+ throttled down, to prevent running out of room in the error logs.</p>
+ <p>The message strings for these look like "Feature [some-feature-name] is marked multipleReferencesAllowed=false,
+ but it has multiple references.  These will be serialized in duplicate."</p></li>
  
  <li>The CasCopier now checks to insure that the range type of the target feature has the same name as the 
  range type of the source feature, which catches errors when two different type systems are used for the source and
diff --git a/uimaj-core/src/main/java/org/apache/uima/internal/util/rb_trees/Int2IntRBT.java b/uimaj-core/src/main/java/org/apache/uima/internal/util/rb_trees/Int2IntRBT.java
index df57664..5658742 100644
--- a/uimaj-core/src/main/java/org/apache/uima/internal/util/rb_trees/Int2IntRBT.java
+++ b/uimaj-core/src/main/java/org/apache/uima/internal/util/rb_trees/Int2IntRBT.java
@@ -236,14 +236,16 @@
     lastNodeGotten = NIL;
   }
   
-  protected void ensureCapacity(int requiredSize) {
-    super.ensureCapacity(requiredSize);
+  @Override
+  protected void ensureCapacityKlrp(int requiredSize) {
+    super.ensureCapacityKlrp(requiredSize);
     this.values = ensureArrayCapacity(this.values, requiredSize);
   }
   
   /**
    * 
-   * @param k
+   * @param k the key to insert
+   * @param v the value to insert (or replace, if key already present)
    * @return negative index if key is found
    */
   private int treeInsert(final int k, final int v) {
diff --git a/uimaj-core/src/main/java/org/apache/uima/internal/util/rb_trees/IntArrayRBTcommon.java b/uimaj-core/src/main/java/org/apache/uima/internal/util/rb_trees/IntArrayRBTcommon.java
index 71a6ffd..564f691 100644
--- a/uimaj-core/src/main/java/org/apache/uima/internal/util/rb_trees/IntArrayRBTcommon.java
+++ b/uimaj-core/src/main/java/org/apache/uima/internal/util/rb_trees/IntArrayRBTcommon.java
@@ -335,10 +335,6 @@
     this.parent = ensureArrayCapacity(this.parent, requiredSize);

   }

   

-  protected void ensureCapacity(int requiredSize) {

-    this.color = ensureBooleanArraySize(this.color, requiredSize);

-  }

-

   // only called for krlp style

   private int[] maximize(int[] array) {

     if (array.length < MAXklrp0) {

@@ -350,7 +346,7 @@
   }

   

   protected int newNode(final int k) {

-    // Make sure the tree is big enough to accomodate a new node.

+    // Make sure the tree is big enough to accommodate a new node.

 

     if (useklrp) {

       int lenKlrp = (klrp.length >> 2);

@@ -366,15 +362,15 @@
       if (this.next >= lenKlrp) {

         ensureCapacityKlrp(this.next + 1);

       }

+    } else {

+      // not using klrp format

+      ensureCapacityNotKrlp(this.next + 1);

     }

     

     if (this.next >= this.color.length){

-      if (!useklrp) {

-        ensureCapacityNotKrlp(this.next + 1);

-      }

-      ensureCapacity(this.next + 1);

+      this.color = ensureBooleanArraySize(this.color, this.next + 1);        

     }

-

+    

     // assert(key.length > next);

     final int z = this.next;

     ++this.next;

diff --git a/uimaj-core/src/test/java/org/apache/uima/internal/util/rb_trees/Int2IntRBTtest.java b/uimaj-core/src/test/java/org/apache/uima/internal/util/rb_trees/Int2IntRBTtest.java
index 156b3e6..3b06790 100644
--- a/uimaj-core/src/test/java/org/apache/uima/internal/util/rb_trees/Int2IntRBTtest.java
+++ b/uimaj-core/src/test/java/org/apache/uima/internal/util/rb_trees/Int2IntRBTtest.java
@@ -30,6 +30,28 @@
 import org.apache.uima.internal.util.IntListIterator;
 
 public class Int2IntRBTtest extends TestCase {
+  
+  public void testexpand() {
+    Int2IntRBT ia = new Int2IntRBT();
+    
+    int shiftpoint = 1 + (1 << 30);
+    shiftpoint = 1040;  // bigger than 1024, to get 1 realloc
+    shiftpoint = 6291500;  // bigger than the first observed outof bounds
+    
+    for (int i = 11; i < shiftpoint; i++) {
+//      if (i == 1034) {
+//        System.out.println("Debug");
+//      }
+      try {
+      ia.put(i,  i * 8);
+      } catch (ArrayIndexOutOfBoundsException e) {
+        System.err.format("%,d%n", i);
+        throw e;
+      }
+    }
+  }
+  
+  
   public void testIterator() {
     Int2IntRBT ia = new Int2IntRBT();
     Integer[] vs = new Integer[] {2, 2, 5, 1, 6, 7, 3, 4};