Skip to content

Commit

Permalink
Fix #28, deprecate ClassAliaslingMapper.itemTypeAsAttributes(Class) and
Browse files Browse the repository at this point in the history
ClassAliaslingMapper.aliasIsAttribute(String).
  • Loading branch information
joehni committed Oct 9, 2015
1 parent 2a27edc commit 292766d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions xstream-distribution/src/content/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ <h2>Minor changes</h2>
<li>JIRA:XSTR-769: Synthetic fields with references to outer class use compiler dependent names.</li>
<li>JIRA:XSTR-771: UUID is an immutable type by default.</li>
<li>GHPR:#23: Constructor of AbstractXppDriver swallows causing exception.</li>
<li>GHI:#28: Fix functionality of ClassAliaslingMapper.itemTypeAsAttributes(Class).</li>
</ul>

<h2>API changes</h2>
Expand All @@ -70,6 +71,8 @@ <h2>API changes</h2>
<li>Added c.t.x.io.xml.DomDriver.createDocumentBuilderFactory().</li>
<li>Added c.t.x.io.xml.JDomDriver.createBuilder().</li>
<li>Added c.t.x.io.xml.JDom2Driver.createBuilder().</li>
<li>Deprecated c.t.x.mapper.ClassAliaslingMapper.itemTypeAsAttributes(Class) and
c.t.x.mapper.ClassAliaslingMapper.aliasIsAttribute(String). Methods never called, left-over from old refactoring.</li>
</ul>

<h1 id="1.4.8">1.4.8</h1>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005, 2006 Joe Walnes.
* Copyright (C) 2006, 2007, 2008, 2009, 2011 XStream Committers.
* Copyright (C) 2006, 2007, 2008, 2009, 2011, 2015 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
Expand Down Expand Up @@ -79,10 +79,16 @@ public Class realClass(String elementName) {
return super.realClass(elementName);
}

/**
* @deprecated As of upcoming
*/
public boolean itemTypeAsAttribute(Class clazz) {
return classToName.containsKey(clazz);
return classToName.containsKey(clazz.getName());
}

/**
* @deprecated As of upcoming
*/
public boolean aliasIsAttribute(String name) {
return nameToType.containsKey(name);
}
Expand Down

0 comments on commit 292766d

Please sign in to comment.