changeset 1032:54c8d482b348

Merge
author asaha
date Mon, 02 Mar 2015 12:09:32 -0800
parents f693ef62c207 (diff) 68f0cd7d60d4 (current diff)
children 7e43d4e20a33
files .hgtags
diffstat 8 files changed, 139 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Feb 10 15:00:07 2015 -0800
+++ b/.hgtags	Mon Mar 02 12:09:32 2015 -0800
@@ -355,3 +355,29 @@
 dcc563c9db9ef290a0783378d43a039cd92a08e3 jdk8u31-b31
 119f4ae3151f4134a5e62034e66a4c17f524838b jdk8u31-b32
 d8a594fd8507343dc23fa18c01b17c96fced47fd jdk8u31-b33
+3a1bba8076da4e54882123e98e219eab1c31ccef jdk8u40-b00
+f219da378d0768ff042d77221e5d20676ecc16f0 jdk8u40-b01
+16ef2134c32a4e60b5a60105b371163aa5936278 jdk8u40-b02
+d73144ee471d4d4c49db94b3cc8990479961499a jdk8u40-b03
+23c1a41d75adc6fc57f69528c2c804079f449d94 jdk8u40-b04
+8d60cebf6a0c1cf1a5669e49deb795a1445e826b jdk8u40-b05
+50a2adfa57fcbbe1587991d53f58d227070a24db jdk8u40-b06
+b2210de1587b16ca1d1d781b55e19bc70724c62b jdk8u40-b07
+641eb6543c7186d1c2c26eaf96803b1e6b411d9a jdk8u40-b08
+c45c0ee4160026207cef1850c215c2691d43a97d jdk8u40-b09
+1f5248bc0714a45160525d48bfcf455b9cdf86a3 jdk8u40-b10
+0bf6dbb6ac4e2258d4d832bb949cb1be2402a899 jdk8u40-b11
+b0cde44bdbfd6339128ca5a7dbbbffaaecac793a jdk8u40-b12
+9df027c40f0fe150f609f1a5e731b7e649923f2b jdk8u40-b13
+d8886dede94dedcad66e6d770dac6b8bca1eb51d jdk8u40-b14
+ed46c05af2570feed5ea264eca02f223055109e9 jdk8u40-b15
+cda81fbeec94b31dba27a043fbf58f442524cdf5 jdk8u40-b16
+cb63029168a52d62d82c3325f1092405c318e78c jdk8u40-b17
+6103f5a8119a85937ae006f18b8dfc04f73315d0 jdk8u40-b18
+3b73732d6886dc8155f0c1fbb125ca60d9e2fd2b jdk8u40-b19
+7bfc889330e0ec1fd495990eaa0d7f0c390b7304 jdk8u40-b20
+78d90db9de2801eec010ccb9f0db3caf969dfc3b jdk8u40-b21
+54a13451ce243f2159ed3996e6efcf374a5750ca jdk8u40-b22
+e07fbae1efeac4e50514384caa7d226af7414114 jdk8u40-b23
+048cebd17f73f23ce2295e360f31c1b6788195aa jdk8u40-b24
+4c0d4c38279c5790aa5b61b03c4cfa9b2a58bc72 jdk8u40-b25
--- a/THIRD_PARTY_README	Tue Feb 10 15:00:07 2015 -0800
+++ b/THIRD_PARTY_README	Mon Mar 02 12:09:32 2015 -0800
@@ -3385,7 +3385,7 @@
 included with JRE 8, JDK 8, and OpenJDK 8.
 
   Apache Commons Math 3.2
-  Apache Derby 10.10.1.3        
+  Apache Derby 10.11.1.2
   Apache Jakarta BCEL 5.1 
   Apache Jakarta Regexp 1.4 
   Apache Santuario XML Security for Java 1.5.4
--- a/src/com/sun/org/apache/bcel/internal/classfile/DescendingVisitor.java	Tue Feb 10 15:00:07 2015 -0800
+++ b/src/com/sun/org/apache/bcel/internal/classfile/DescendingVisitor.java	Mon Mar 02 12:09:32 2015 -0800
@@ -213,6 +213,10 @@
   public void visitLocalVariableTypeTable(LocalVariableTypeTable obj) {
     stack.push(obj);
     obj.accept(visitor);
+
+    LocalVariable[] vars = obj.getLocalVariableTypeTable();
+    for(int i=0; i < vars.length; i++)
+      vars[i].accept(this);
     stack.pop();
   }
 
--- a/src/com/sun/org/apache/bcel/internal/generic/MethodGen.java	Tue Feb 10 15:00:07 2015 -0800
+++ b/src/com/sun/org/apache/bcel/internal/generic/MethodGen.java	Mon Mar 02 12:09:32 2015 -0800
@@ -87,6 +87,7 @@
   private boolean         strip_attributes;
 
   private ArrayList       variable_vec    = new ArrayList();
+  private ArrayList       type_vec        = new ArrayList();
   private ArrayList       line_number_vec = new ArrayList();
   private ArrayList       exception_vec   = new ArrayList();
   private ArrayList       throws_vec      = new ArrayList();
@@ -260,7 +261,7 @@
             }
           } else if (a instanceof LocalVariableTypeTable) {
              LocalVariable[] lv = ((LocalVariableTypeTable) a).getLocalVariableTypeTable();
-             removeLocalVariables();
+             removeLocalVariableTypes();
              for (int k = 0; k < lv.length; k++) {
                  LocalVariable l = lv[k];
                  InstructionHandle start = il.findHandle(l.getStartPC());
@@ -272,7 +273,7 @@
                  if (null == end) {
                      end = il.getEnd();
                  }
-                 addLocalVariable(l.getName(), Type.getType(l.getSignature()), l
+                 addLocalVariableType(l.getName(), Type.getType(l.getSignature()), l
                          .getIndex(), start, end);
               }
           } else
@@ -406,6 +407,31 @@
     return lg;
   }
 
+  /*
+   * If the range of the variable has not been set yet, it will be set to be
+   * val id from the start to the end of the instruction list.
+   *
+   * @return array of declared local variable types sorted by index
+   */
+  private LocalVariableGen[] getLocalVariableTypes() {
+    int                size = type_vec.size();
+    LocalVariableGen[] lg   = new LocalVariableGen[size];
+    type_vec.toArray(lg);
+
+    for(int i=0; i < size; i++) {
+      if(lg[i].getStart() == null)
+        lg[i].setStart(il.getStart());
+
+      if(lg[i].getEnd() == null)
+        lg[i].setEnd(il.getEnd());
+    }
+
+    if(size > 1)
+      sort(lg, 0, size - 1);
+
+    return lg;
+  }
+
   /**
    * @return `LocalVariableTable' attribute of all the local variables of this method.
    */
@@ -422,6 +448,68 @@
   }
 
   /**
+   * @return `LocalVariableTypeTable' attribute of all the local variable
+   * types of this method.
+   */
+  public LocalVariableTypeTable getLocalVariableTypeTable(ConstantPoolGen cp) {
+    LocalVariableGen[] lg   = getLocalVariableTypes();
+    int                size = lg.length;
+    LocalVariable[]    lv   = new LocalVariable[size];
+
+    for(int i=0; i < size; i++)
+      lv[i] = lg[i].getLocalVariable(cp);
+
+    return new LocalVariableTypeTable(cp.addUtf8("LocalVariableTypeTable"),
+                                  2 + lv.length * 10, lv, cp.getConstantPool());
+  }
+
+  /**
+   * Adds a local variable type to this method.
+   *
+   * @param name variable name
+   * @param type variable type
+   * @param slot the index of the local variable, if type is long or double, the next available
+   * index is slot+2
+   * @param start from where the variable is valid
+   * @param end until where the variable is valid
+   * @return new local variable object
+   * @see LocalVariable
+   */
+  private LocalVariableGen addLocalVariableType(String name, Type type, int slot,
+                                           InstructionHandle start,
+                                           InstructionHandle end) {
+    byte t = type.getType();
+
+    if(t != Constants.T_ADDRESS) {
+      int  add = type.getSize();
+
+      if(slot + add > max_locals)
+        max_locals = slot + add;
+
+      LocalVariableGen l = new LocalVariableGen(slot, name, type, start, end);
+      int i;
+
+      if((i = type_vec.indexOf(l)) >= 0) // Overwrite if necessary
+        type_vec.set(i, l);
+      else
+        type_vec.add(l);
+
+      return l;
+    } else {
+      throw new IllegalArgumentException("Can not use " + type +
+                                         " as type for local variable");
+
+    }
+  }
+
+  /**
+   * Remove all local variable types.
+   */
+  private void removeLocalVariableTypes() {
+    type_vec.clear();
+  }
+
+  /**
    * Give an instruction a line number corresponding to the source code line.
    *
    * @param ih instruction to tag
@@ -637,12 +725,17 @@
 
     LineNumberTable    lnt = null;
     LocalVariableTable lvt = null;
+    LocalVariableTypeTable lvtt = null;
 
-    /* Create LocalVariableTable and LineNumberTable attributes (for debuggers, e.g.)
+    /* Create LocalVariableTable, LocalvariableTypeTable, and LineNumberTable
+     * attributes (for debuggers, e.g.)
      */
     if((variable_vec.size() > 0) && !strip_attributes)
       addCodeAttribute(lvt = getLocalVariableTable(cp));
 
+    if((type_vec.size() > 0) && !strip_attributes)
+      addCodeAttribute(lvtt = getLocalVariableTypeTable(cp));
+
     if((line_number_vec.size() > 0) && !strip_attributes)
       addCodeAttribute(lnt = getLineNumberTable(cp));
 
@@ -691,6 +784,7 @@
 
     // Undo effects of adding attributes
     if(lvt != null)  removeCodeAttribute(lvt);
+    if(lvtt != null) removeCodeAttribute(lvtt);
     if(lnt != null)  removeCodeAttribute(lnt);
     if(code != null) removeAttribute(code);
     if(et != null)   removeAttribute(et);
--- a/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java	Tue Feb 10 15:00:07 2015 -0800
+++ b/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java	Mon Mar 02 12:09:32 2015 -0800
@@ -453,7 +453,8 @@
     }
 
     private void propagateFeatures(AbstractXMLSchema schema) {
-        schema.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, fSecurityManager != null);
+        schema.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING,
+                (fSecurityManager != null && fSecurityManager.isSecureProcessing()));
         schema.setFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM, fUseServicesMechanism);
         String[] features = fXMLSchemaLoader.getRecognizedFeatures();
         for (int i = 0; i < features.length; ++i) {
--- a/src/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java	Tue Feb 10 15:00:07 2015 -0800
+++ b/src/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java	Mon Mar 02 12:09:32 2015 -0800
@@ -3145,7 +3145,11 @@
                                   m_data.elementAt(-dataIndex+1));
       }
     }
-    else if (DTM.ELEMENT_NODE == type || DTM.DOCUMENT_FRAGMENT_NODE == type
+    else if (DTM.ELEMENT_NODE == type)
+    {
+      return getStringValueX(nodeHandle);
+    }
+    else if (DTM.DOCUMENT_FRAGMENT_NODE == type
              || DTM.DOCUMENT_NODE == type)
     {
       return null;
--- a/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java	Tue Feb 10 15:00:07 2015 -0800
+++ b/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java	Mon Mar 02 12:09:32 2015 -0800
@@ -57,7 +57,6 @@
  * <p>The selection of CatalogParsers is made on the basis of the QName
  * of the root element of the document.</p>
  *
- * <p>This class requires the <a href="http://java.sun.com/aboutJava/communityprocess/final/jsr005/index.html">Java API for XML Parsing</a>.</p>
  *
  * @see Catalog
  * @see CatalogReader
--- a/src/org/w3c/dom/package.html	Tue Feb 10 15:00:07 2015 -0800
+++ b/src/org/w3c/dom/package.html	Mon Mar 02 12:09:32 2015 -0800
@@ -3,12 +3,10 @@
 <title>org.w3c.dom package</title>
 </head>
 <body bgcolor="white">
-Provides the interfaces for the Document Object Model (DOM) which is a
-component API of the <a href="http://java.sun.com/xml">Java API for XML
-Processing</a>.  The Document Object Model Level 2 Core API allows programs
-to dynamically access and update the content and structure of documents.
-See the <a href="http://www.w3.org/TR/DOM-Level-2-Core/">specification</a>
-for more information.
+Provides the interfaces for the Document Object Model (DOM). Supports the
+<a href="http://www.w3.org/TR/DOM-Level-2-Core/">Document Object Model Level 2 Core APIi</a>, 
+<a href="http://www.w3.org/TR/DOM-Level-3-Core">Document Object Model (DOM) Level 3 Core</a>, 
+and <a href="http://www.w3.org/TR/DOM-Level-3-LS">Document Object Model (DOM) Level 3 Load and Save</a>.
 
 @since JDK1.4
 </body>