Merge jdk8u31-b04

Thu, 09 Oct 2014 12:50:45 -0700

author
asaha
date
Thu, 09 Oct 2014 12:50:45 -0700
changeset 714
60ee8e1e63ae
parent 711
69d5851d3679
parent 713
24541f4c7371
child 715
e4e3070ba394

Merge

.hgtags file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ContentHandlerAdaptor.java	Thu Oct 09 12:30:29 2014 -0700
     1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ContentHandlerAdaptor.java	Thu Oct 09 12:50:45 2014 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -25,10 +25,6 @@
    1.11  
    1.12  package com.sun.xml.internal.bind.v2.runtime;
    1.13  
    1.14 -import java.io.IOException;
    1.15 -
    1.16 -import javax.xml.stream.XMLStreamException;
    1.17 -
    1.18  import com.sun.istack.internal.FinalArrayList;
    1.19  import com.sun.istack.internal.SAXException2;
    1.20  
    1.21 @@ -36,6 +32,9 @@
    1.22  import org.xml.sax.SAXException;
    1.23  import org.xml.sax.helpers.DefaultHandler;
    1.24  
    1.25 +import javax.xml.stream.XMLStreamException;
    1.26 +import java.io.IOException;
    1.27 +
    1.28  /**
    1.29   * Receives SAX2 events and send the equivalent events to
    1.30   * {@link XMLSerializer}
    1.31 @@ -70,14 +69,14 @@
    1.32      private boolean containsPrefixMapping(String prefix, String uri) {
    1.33          for( int i=0; i<prefixMap.size(); i+=2 ) {
    1.34              if(prefixMap.get(i).equals(prefix)
    1.35 -            && prefixMap.get(i+1).equals(uri))
    1.36 +                    && prefixMap.get(i+1).equals(uri))
    1.37                  return true;
    1.38          }
    1.39          return false;
    1.40      }
    1.41  
    1.42      public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
    1.43 -        throws SAXException {
    1.44 +            throws SAXException {
    1.45          try {
    1.46              flushText();
    1.47  
    1.48 @@ -92,13 +91,13 @@
    1.49                  serializer.startElement(namespaceURI,localName, p,null);
    1.50  
    1.51              // declare namespace events
    1.52 -            for( int i=0; i<prefixMap.size(); i+=2 ) {
    1.53 +            for (int i = 0; i < prefixMap.size(); i += 2) {
    1.54                  // forcibly set this binding, instead of using declareNsUri.
    1.55                  // this guarantees that namespaces used in DOM will show up
    1.56                  // as-is in the marshalled output (instead of reassigned to something else,
    1.57                  // which may happen if you'd use declareNsUri.)
    1.58                  serializer.getNamespaceContext().force(
    1.59 -                    prefixMap.get(i+1), prefixMap.get(i) );
    1.60 +                        prefixMap.get(i + 1), prefixMap.get(i));
    1.61              }
    1.62              // make sure namespaces needed by attributes are bound
    1.63              for( int i=0; i<len; i++ ) {
    1.64 @@ -108,7 +107,7 @@
    1.65                  String prefix = getPrefix(qname);
    1.66  
    1.67                  serializer.getNamespaceContext().declareNamespace(
    1.68 -                    atts.getURI(i), prefix, true );
    1.69 +                        atts.getURI(i), prefix, true );
    1.70              }
    1.71  
    1.72              serializer.endNamespaceDecls(null);
    1.73 @@ -128,9 +127,10 @@
    1.74          }
    1.75      }
    1.76  
    1.77 +    // make sure namespaces needed by attributes are bound
    1.78      private String getPrefix(String qname) {
    1.79          int idx = qname.indexOf(':');
    1.80 -        String prefix = (idx==-1)?qname:qname.substring(0,idx);
    1.81 +        String prefix = (idx == -1) ? "" : qname.substring(0, idx);
    1.82          return prefix;
    1.83      }
    1.84  
     2.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXStreamConnector.java	Thu Oct 09 12:30:29 2014 -0700
     2.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXStreamConnector.java	Thu Oct 09 12:50:45 2014 -0700
     2.3 @@ -70,7 +70,7 @@
     2.4          // Quick hack until SJSXP fixes 6270116
     2.5          boolean isZephyr = readerClass.getName().equals("com.sun.xml.internal.stream.XMLReaderImpl");
     2.6          if (getBoolProp(reader,"org.codehaus.stax2.internNames") &&
     2.7 -            getBoolProp(reader,"org.codehaus.stax2.internNsUris"))
     2.8 +                getBoolProp(reader,"org.codehaus.stax2.internNsUris"))
     2.9              ; // no need for interning
    2.10          else
    2.11          if (isZephyr)
    2.12 @@ -219,8 +219,8 @@
    2.13          int nsCount = staxStreamReader.getNamespaceCount();
    2.14          for (int i = 0; i < nsCount; i++) {
    2.15              visitor.startPrefixMapping(
    2.16 -                fixNull(staxStreamReader.getNamespacePrefix(i)),
    2.17 -                fixNull(staxStreamReader.getNamespaceURI(i)));
    2.18 +                    fixNull(staxStreamReader.getNamespacePrefix(i)),
    2.19 +                    fixNull(staxStreamReader.getNamespaceURI(i)));
    2.20          }
    2.21  
    2.22          // fire startElement
    2.23 @@ -310,13 +310,13 @@
    2.24      protected void handleCharacters() throws XMLStreamException, SAXException {
    2.25          if( predictor.expectText() )
    2.26              buffer.append(
    2.27 -                staxStreamReader.getTextCharacters(),
    2.28 -                staxStreamReader.getTextStart(),
    2.29 -                staxStreamReader.getTextLength() );
    2.30 +                    staxStreamReader.getTextCharacters(),
    2.31 +                    staxStreamReader.getTextStart(),
    2.32 +                    staxStreamReader.getTextLength() );
    2.33      }
    2.34  
    2.35      private void processText( boolean ignorable ) throws SAXException {
    2.36 -        if( predictor.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer))) {
    2.37 +        if( predictor.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer) || context.getCurrentState().isMixed())) {
    2.38              if(textReported) {
    2.39                  textReported = false;
    2.40              } else {

mercurial