You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2015/11/07 15:29:08 UTC
svn commit: r1713131 - in /webservices/axiom/trunk/testing/xml-truth:
pom.xml src/main/java/org/apache/axiom/truth/xml/XMLTruth.java
Author: veithen
Date: Sat Nov 7 14:29:07 2015
New Revision: 1713131
URL: http://svn.apache.org/viewvc?rev=1713131&view=rev
Log:
Hide the internal org.apache.axiom.truth.xml.spi package.
Modified:
webservices/axiom/trunk/testing/xml-truth/pom.xml
webservices/axiom/trunk/testing/xml-truth/src/main/java/org/apache/axiom/truth/xml/XMLTruth.java
Modified: webservices/axiom/trunk/testing/xml-truth/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/xml-truth/pom.xml?rev=1713131&r1=1713130&r2=1713131&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/xml-truth/pom.xml (original)
+++ webservices/axiom/trunk/testing/xml-truth/pom.xml Sat Nov 7 14:29:07 2015
@@ -71,6 +71,10 @@
<reports>
<report>javadoc-no-fork</report>
</reports>
+ <configuration>
+ <!-- Internal API that may change without notice -->
+ <excludePackageNames>org.apache.axiom.truth.xml.spi</excludePackageNames>
+ </configuration>
</reportSet>
</reportSets>
</plugin>
Modified: webservices/axiom/trunk/testing/xml-truth/src/main/java/org/apache/axiom/truth/xml/XMLTruth.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/xml-truth/src/main/java/org/apache/axiom/truth/xml/XMLTruth.java?rev=1713131&r1=1713130&r2=1713131&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/xml-truth/src/main/java/org/apache/axiom/truth/xml/XMLTruth.java (original)
+++ webservices/axiom/trunk/testing/xml-truth/src/main/java/org/apache/axiom/truth/xml/XMLTruth.java Sat Nov 7 14:29:07 2015
@@ -196,7 +196,11 @@ public final class XMLTruth {
return SUBJECT_FACTORY;
}
- public static <T> XML xml(Class<T> type, T object) {
+ public static <T> Object xml(Class<T> type, T object) {
+ return createXML(type, object);
+ }
+
+ private static <T> XML createXML(Class<T> type, T object) {
XMLFactory<?> factory = null;
for (XMLFactory<?> candidate : factories) {
Class<?> expectedType = candidate.getExpectedType();
@@ -211,15 +215,15 @@ public final class XMLTruth {
if (factory == null) {
throw new IllegalArgumentException();
} else {
- return xml(factory, object);
+ return createXML0(factory, object);
}
}
static XML xml(Object object) {
- return xml((Class<Object>)null, object);
+ return createXML(null, object);
}
- private static <T> XML xml(XMLFactory<T> factory, Object object) {
+ private static <T> XML createXML0(XMLFactory<T> factory, Object object) {
return factory.createXML(factory.getExpectedType().cast(object));
}
}