Skip to content

Commit

Permalink
Merge functionality of ExtendedHierarchicalStreamReader into Hierarch…
Browse files Browse the repository at this point in the history
…icalStreamWriter and deprecate helper interface and helper class.
  • Loading branch information
joehni committed Jan 28, 2018
1 parent abd7db5 commit 029c98a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions xstream-distribution/src/content/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ <h2>API changes</h2>
<li>Deprecated c.t.x.core.util.JVM.is18().</li>
<li>Deprecated c.t.x.core.util.JVM.is9().</li>
<li>Deprecated c.t.x.io.ExtendedHierarchicalStreamReader.</li>
<li>Deprecated c.t.x.io.ExtendedHierarchicalStreamWriter.</li>
<li>Deprecated c.t.x.io.ExtendedHierarchicalStreamWriterHelper.</li>
<li>Added c.t.x.core.util.StingCodec.</li>
</ul>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2006 Joe Walnes.
* Copyright (C) 2006, 2007 XStream Committers.
* Copyright (C) 2006, 2007, 2018 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
Expand All @@ -13,6 +13,7 @@

/**
* @author Paul Hammant
* @deprecated As of upcoming, this interface will be merged into parent with version 1.5.0.
*/
public interface ExtendedHierarchicalStreamWriter extends HierarchicalStreamWriter {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2006 Joe Walnes.
* Copyright (C) 2006, 2007 XStream Committers.
* Copyright (C) 2006, 2007, 2018 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
Expand All @@ -11,10 +11,17 @@
*/
package com.thoughtworks.xstream.io;

/**
* @deprecated As of upcoming, this helper is no longer required since version 1.5.0.
*/
public class ExtendedHierarchicalStreamWriterHelper {
/**
* @deprecated As of upcoming, with version 1.5.0 use {@link HierarchicalStreamWriter#startNode(String, Class)}
* directly. This helper will be no longer required.
*/
public static void startNode(HierarchicalStreamWriter writer, String name, Class clazz) {
if (writer instanceof ExtendedHierarchicalStreamWriter) {
((ExtendedHierarchicalStreamWriter) writer).startNode(name, clazz);
((ExtendedHierarchicalStreamWriter)writer).startNode(name, clazz);
} else {
writer.startNode(name);
}
Expand Down

0 comments on commit 029c98a

Please sign in to comment.