cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anathan...@apache.org
Subject svn commit: r1154385 - in /cocoon/cocoon3/trunk/cocoon-optional/src: main/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/GenericType.java test/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/JAXBGeneratorTestCase.java
Date Fri, 05 Aug 2011 21:36:05 GMT
Author: anathaniel
Date: Fri Aug  5 21:36:05 2011
New Revision: 1154385

URL: http://svn.apache.org/viewvc?rev=1154385&view=rev
Log:
Revert to previous version needed by the reflection voodoo.

Modified:
    cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/GenericType.java
    cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/JAXBGeneratorTestCase.java

Modified: cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/GenericType.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/GenericType.java?rev=1154385&r1=1154384&r2=1154385&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/GenericType.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-optional/src/main/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/GenericType.java
Fri Aug  5 21:36:05 2011
@@ -24,13 +24,13 @@ import java.lang.reflect.Type;
 /**
  * @version $Id$
  */
-public final class GenericType<T> {
+public abstract class GenericType<T> {
 
     public static <T> GenericType<T> toGenericType(T t) {
         if (t == null) {
             throw new IllegalArgumentException("Parameter 't' must not be null");
         }
-        return new GenericType<T>(t);
+        return new GenericType<T>(t) {};
     }
 
     private final T object;
@@ -39,7 +39,7 @@ public final class GenericType<T> {
 
     private final Class<?> type;
 
-    private GenericType(T object) {
+    public GenericType(T object) {
         this.object = object;
         this.rawType = object.getClass();
 

Modified: cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/JAXBGeneratorTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/JAXBGeneratorTestCase.java?rev=1154385&r1=1154384&r2=1154385&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/JAXBGeneratorTestCase.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/jaxb/JAXBGeneratorTestCase.java
Fri Aug  5 21:36:05 2011
@@ -104,7 +104,7 @@ public final class JAXBGeneratorTestCase
         animals.add(animal);
         animals.add(animal);
 
-        this.internalAssert(GenericType.toGenericType(animals),
+        this.internalAssert(new GenericType<List<Animal>>(animals){},
                 "<?xml version=\"1.0\" encoding=\"UTF-8\"?><animals><animal><call>Dook</call><colour>albino</colour><latinName>Mustela
putoris furo</latinName><name>Lector</name><age>5</age></animal><animal><call>Dook</call><colour>albino</colour><latinName>Mustela
putoris furo</latinName><name>Lector</name><age>5</age></animal></animals>");
     }
 



Mime
View raw message