You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bu...@apache.org on 2021/04/02 14:08:13 UTC

[cxf] branch master updated: cxf-core: back flip() to ReaderInputStream

This is an automated email from the ASF dual-hosted git repository.

buhhunyx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new a88e9d4  cxf-core: back flip() to ReaderInputStream
a88e9d4 is described below

commit a88e9d437b3a4e8630b33fa7d9e15a1a3bcd96c9
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Fri Apr 2 17:07:16 2021 +0300

    cxf-core: back flip() to ReaderInputStream
---
 .../main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java   | 4 ++--
 core/src/main/java/org/apache/cxf/io/ReaderInputStream.java           | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/core/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java b/core/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
index 034c8e2..0f3a579 100644
--- a/core/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
+++ b/core/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
@@ -60,8 +60,8 @@ import org.apache.ws.commons.schema.utils.XmlSchemaObjectBase;
  */
 public class SchemaCollection {
 
-    private XmlSchemaCollection xmlSchemaCollection;
-    private Map<XmlSchema, Set<XmlSchemaType>> xmlTypesCheckedForCrossImportsPerSchema
+    private final XmlSchemaCollection xmlSchemaCollection;
+    private final Map<XmlSchema, Set<XmlSchemaType>> xmlTypesCheckedForCrossImportsPerSchema
         = new HashMap<>();
 
     public SchemaCollection() {
diff --git a/core/src/main/java/org/apache/cxf/io/ReaderInputStream.java b/core/src/main/java/org/apache/cxf/io/ReaderInputStream.java
index 5bfed10..e95ed88 100644
--- a/core/src/main/java/org/apache/cxf/io/ReaderInputStream.java
+++ b/core/src/main/java/org/apache/cxf/io/ReaderInputStream.java
@@ -119,7 +119,9 @@ public class ReaderInputStream extends InputStream {
         this.reader = reader;
         this.encoder = encoder;
         this.encoderIn = CharBuffer.allocate(bufferSize);
+        encoderIn.flip();
         this.encoderOut = ByteBuffer.allocate(128);
+        encoderOut.flip();
     }
 
     /**