You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Benedikt Ritter <be...@systemoutprintln.de> on 2012/02/07 16:01:37 UTC

Re: svn commit: r1241133 [2/2] - in /commons/sandbox/beanutils2/trunk: ./ src/main/java/org/apache/commons/beanutils2/type/ src/test/java/org/apache/commons/beanutils2/type/

Hi,

the setup of TypesTest fails with a ClassCastException being thrown in 
line 90 (see the above code snippet).
I haven't digged deep enough into all of the new code to make a 
suggestion on how to repair the test. I guess you will probably know a 
fix anyway ;)

Have a nice day!
Benedikt

Am 06.02.2012 20:56, schrieb simonetripodi@apache.org:

[...]

> Added: commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java
> URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java?rev=1241133&view=auto
> ==============================================================================
> --- commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java (added)
> +++ commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java Mon Feb  6 19:56:42 2012
> @@ -0,0 +1,277 @@
> +package org.apache.commons.beanutils2.type;
> +

[...]

> +/**
> + * @author jessewilson@google.com (Jesse Wilson)
> + */
> +public class TypesTest
> +{

[...]

> +    @Before
> +    public void setUp()
> +        throws Exception
> +    {
> +        mapStringInteger = (ParameterizedType) getClass().getDeclaredField( "a" ).getGenericType();
> +        innerFloatDouble = (ParameterizedType) getClass().getDeclaredField( "b" ).getGenericType();
> +        listStringArray = (ParameterizedType) getClass().getDeclaredField( "c" ).getGenericType();
> +        listString = (ParameterizedType) getClass().getDeclaredField( "d" ).getGenericType();
> +        setString = (ParameterizedType) getClass().getDeclaredField( "e" ).getGenericType();
> +        stringArray = (GenericArrayType) listStringArray.getActualTypeArguments()[0]; <--- THIS FAILS
> +        outerInner = (ParameterizedType) getClass().getDeclaredField( "f" ).getGenericType();
> +    }

[...]


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1241133 [2/2] - in /commons/sandbox/beanutils2/trunk: ./ src/main/java/org/apache/commons/beanutils2/type/ src/test/java/org/apache/commons/beanutils2/type/

Posted by Benedikt Ritter <be...@systemoutprintln.de>.
I'm getting the same errors when compiling guice.

Am 07.02.2012 16:42, schrieb Simone Tripodi:
> Thanks Jöerg,
>
> indeed, commons components aim to embrace the wider range of JDKs as
> possible, so the issue exists and have to be fixed.
>
> @Benedikt: try to compile Google Guice[1], where I extracted the
> TypeLiterl framework - if it passes, something wrong happened during
> the import.
>
> TIA,
> -Simo
>
> [1] http://code.google.com/p/google-guice/
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
>
>
> On Tue, Feb 7, 2012 at 4:32 PM, Jörg Schaible
> <Jo...@scalaris.com>  wrote:
>> Hi Benedikt,
>>
>> Benedikt Ritter wrote:
>>
>>> Do you wnat me to swtich to Java 6 for future development? I think it's
>>> a good thing the test with different Java versions, even if the target
>>> source code level is Java 5.
>>
>> Hehehe, when it's read for voting, I will use my complete compiler zoo to
>> build from source and run the tests ... if it fails on one of the compilers,
>> I'll vote -1 anyway ... so use whatever Java version you like ;-)
>>
>> Cheers,
>> Jörg
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1241133 [2/2] - in /commons/sandbox/beanutils2/trunk: ./ src/main/java/org/apache/commons/beanutils2/type/ src/test/java/org/apache/commons/beanutils2/type/

Posted by Simone Tripodi <si...@apache.org>.
Thanks Jöerg,

indeed, commons components aim to embrace the wider range of JDKs as
possible, so the issue exists and have to be fixed.

@Benedikt: try to compile Google Guice[1], where I extracted the
TypeLiterl framework - if it passes, something wrong happened during
the import.

TIA,
-Simo

[1] http://code.google.com/p/google-guice/

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



On Tue, Feb 7, 2012 at 4:32 PM, Jörg Schaible
<Jo...@scalaris.com> wrote:
> Hi Benedikt,
>
> Benedikt Ritter wrote:
>
>> Do you wnat me to swtich to Java 6 for future development? I think it's
>> a good thing the test with different Java versions, even if the target
>> source code level is Java 5.
>
> Hehehe, when it's read for voting, I will use my complete compiler zoo to
> build from source and run the tests ... if it fails on one of the compilers,
> I'll vote -1 anyway ... so use whatever Java version you like ;-)
>
> Cheers,
> Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1241133 [2/2] - in /commons/sandbox/beanutils2/trunk: ./ src/main/java/org/apache/commons/beanutils2/type/ src/test/java/org/apache/commons/beanutils2/type/

Posted by Jörg Schaible <Jo...@scalaris.com>.
Hi Benedikt,

Benedikt Ritter wrote:

> Do you wnat me to swtich to Java 6 for future development? I think it's
> a good thing the test with different Java versions, even if the target
> source code level is Java 5.

Hehehe, when it's read for voting, I will use my complete compiler zoo to 
build from source and run the tests ... if it fails on one of the compilers, 
I'll vote -1 anyway ... so use whatever Java version you like ;-)

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1241133 [2/2] - in /commons/sandbox/beanutils2/trunk: ./ src/main/java/org/apache/commons/beanutils2/type/ src/test/java/org/apache/commons/beanutils2/type/

Posted by Benedikt Ritter <be...@systemoutprintln.de>.
Do you wnat me to swtich to Java 6 for future development? I think it's 
a good thing the test with different Java versions, even if the target 
source code level is Java 5.

Regards,
Benedikt

Am 07.02.2012 16:20, schrieb Simone Tripodi:
> Ah, Java7... once figured out how to install JDK7 on Mac OS X, I'll
> report the bug to the original author.
> Dankeshön,
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
>
>
> On Tue, Feb 7, 2012 at 4:13 PM, Benedikt Ritter
> <be...@systemoutprintln.de>  wrote:
>> Hi, here's some info:
>>
>> C:\Users\Bene>mvn -version
>> Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
>> Maven home: D:\Entwicklung\maven\3.0.3
>> Java version: 1.7.0_01, vendor: Oracle Corporation
>> Java home: D:\Entwicklung\Java\jdk1.7.0_01\jre
>> Default locale: de_DE, platform encoding: Cp1252
>> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>>
>> Complete mvn test output:
>>
>> [INFO] Scanning for projects...
>> [INFO]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building Apache Commons BeanUtils2 0.1-SNAPSHOT
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO]
>> [INFO] --- maven-antrun-plugin:1.6:run (javadoc.resources) @
>> commons-beanutils2 ---
>> [INFO] Executing tasks
>>
>> main:
>> [INFO] Executed tasks
>> [INFO]
>> [INFO] --- maven-remote-resources-plugin:1.1:process (default) @
>> commons-beanutils2 ---
>> [INFO] Setting property: classpath.resource.loader.class =>
>> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
>> [INFO] Setting property: velocimacro.messages.on =>  'false'.
>> [INFO] Setting property: resource.loader =>  'classpath'.
>> [INFO] Setting property: resource.manager.logwhenfound =>  'false'.
>> [INFO]
>> [INFO] --- buildnumber-maven-plugin:1.0:create (default) @
>> commons-beanutils2 ---
>> [INFO] Checking for local modifications: skipped.
>> [INFO] Updating project files from SCM: skipped.
>> [INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
>> [INFO] Working directory: D:\Entwicklung\workspace\beanutils2
>> [INFO] Storing buildNumber: ?????? at timestamp: 1328627538889
>> [INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
>> [INFO] Working directory: D:\Entwicklung\workspace\beanutils2
>> [INFO] Storing buildScmBranch: UNKNOWN_BRANCH
>> [INFO]
>> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @
>> commons-beanutils2 ---
>> [debug] execute contextualize
>> [INFO] Using 'iso-8859-1' encoding to copy filtered resources.
>> [INFO] Copying 1 resource to META-INF
>> [INFO] skip non existing resourceDirectory
>> D:\Entwicklung\workspace\beanutils2\src\main\resources
>> [INFO]
>> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
>> commons-beanutils2 ---
>> [INFO] Compiling 4 source files to
>> D:\Entwicklung\workspace\beanutils2\target\classes
>> [INFO]
>> [INFO] --- maven-bundle-plugin:2.3.5:manifest (bundle-manifest) @
>> commons-beanutils2 ---
>> [INFO]
>> [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources)
>> @ commons-beanutils2 ---
>> [debug] execute contextualize
>> [INFO] Using 'iso-8859-1' encoding to copy filtered resources.
>> [INFO] skip non existing resourceDirectory
>> D:\Entwicklung\workspace\beanutils2\src\test\resources
>> [INFO]
>> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
>> commons-beanutils2 ---
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO]
>> [INFO] --- maven-surefire-plugin:2.9:test (default-test) @
>> commons-beanutils2 ---
>> [INFO] Surefire report directory:
>> D:\Entwicklung\workspace\beanutils2\target\surefire-reports
>>
>> -------------------------------------------------------
>>   T E S T S
>> -------------------------------------------------------
>> Running org.apache.commons.beanutils2.ArgumentTest
>> Tests run: 62, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.129 sec
>> Running org.apache.commons.beanutils2.BeanUtilsTest
>> Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec
>> Running org.apache.commons.beanutils2.ConstructorsTestCase
>> Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec
>> Running org.apache.commons.beanutils2.DescribeTestCase
>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 sec
>> Running org.apache.commons.beanutils2.GetPropertyTestCase
>> Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
>> Running org.apache.commons.beanutils2.internal.AssertionsTest
>> Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec
>> Running org.apache.commons.beanutils2.MethodsTestCase
>> Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec
>> Running org.apache.commons.beanutils2.PopulateTestCase
>> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
>> Running org.apache.commons.beanutils2.SetPropertyTestCase
>> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
>> Running org.apache.commons.beanutils2.StaticMethodsTestCase
>> Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec
>> Running org.apache.commons.beanutils2.type.TypeLiteralTest
>> Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.077 sec
>> Running org.apache.commons.beanutils2.type.TypeLiteralTypeResolutionTest
>> Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec
>> Running org.apache.commons.beanutils2.type.TypesTest
>> Tests run: 10, Failures: 0, Errors: 10, Skipped: 0, Time elapsed: 0.018 sec
>> <<<  FAILURE!
>> Running org.apache.commons.beanutils2.TypeUtilsTest
>> Tests run: 244, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.126 sec
>>
>> Results :
>>
>> Tests in error:
>>
>> testInnerParameterizedEvenWithZeroArgs(org.apache.commons.beanutils2.type.TypesTest):
>> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>>
>> testCanonicalizeRequiresOwnerTypes(org.apache.commons.beanutils2.type.TypesTest):
>> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>>
>> testWildcardBoundsMustNotBePrimitives(org.apache.commons.beanutils2.type.TypesTest):
>> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>>
>> testTypeParametersMustNotBePrimitives(org.apache.commons.beanutils2.type.TypesTest):
>> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>>   testTypeWithOwnerType(org.apache.commons.beanutils2.type.TypesTest):
>> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>>   testDefensiveCopies(org.apache.commons.beanutils2.type.TypesTest):
>> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>>   testListSetMap(org.apache.commons.beanutils2.type.TypesTest):
>> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>>   testWildcardTypes(org.apache.commons.beanutils2.type.TypesTest):
>> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>>   testEqualsAndHashcode(org.apache.commons.beanutils2.type.TypesTest):
>> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>>   testToString(org.apache.commons.beanutils2.type.TypesTest): java.lang.Class
>> cannot be cast to java.lang.reflect.GenericArrayType
>>
>> Tests run: 471, Failures: 0, Errors: 10, Skipped: 0
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 5.389s
>> [INFO] Finished at: Tue Feb 07 16:12:21 CET 2012
>> [INFO] Final Memory: 21M/174M
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-surefire-plugin:2.9:test (default-test) on
>> project commons-beanutils2: There are test failures.
>> [ERROR]
>> [ERROR] Please refer to
>> D:\Entwicklung\workspace\beanutils2\target\surefire-reports for the
>> individual test results.
>> [ERROR] ->  [Help 1]
>> [ERROR]
>> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
>> switch.
>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>> [ERROR]
>> [ERROR] For more information about the errors and possible solutions, please
>> read the following articles:
>> [ERROR] [Help 1]
>> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>>
>>
>> Am 07.02.2012 16:09, schrieb Simone Tripodi:
>>
>>> Which environment are you using? It doesn't fails on mine
>>>
>>> $ mvn --version
>>> Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
>>> Maven home: /Applications/apache-maven-3.0.4
>>> Java version: 1.6.0_29, vendor: Apple Inc.
>>> Java home:
>>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
>>> Default locale: en_US, platform encoding: MacRoman
>>> OS name: "mac os x", version: "10.7.2", arch: "x86_64", family: "mac"
>>>
>>> http://people.apache.org/~simonetripodi/
>>> http://simonetripodi.livejournal.com/
>>> http://twitter.com/simonetripodi
>>> http://www.99soft.org/
>>>
>>>
>>>
>>> On Tue, Feb 7, 2012 at 4:01 PM, Benedikt Ritter
>>> <be...@systemoutprintln.de>    wrote:
>>>>
>>>> Hi,
>>>>
>>>> the setup of TypesTest fails with a ClassCastException being thrown in
>>>> line
>>>> 90 (see the above code snippet).
>>>> I haven't digged deep enough into all of the new code to make a
>>>> suggestion
>>>> on how to repair the test. I guess you will probably know a fix anyway ;)
>>>>
>>>> Have a nice day!
>>>> Benedikt
>>>>
>>>> Am 06.02.2012 20:56, schrieb simonetripodi@apache.org:
>>>>
>>>> [...]
>>>>
>>>>> Added:
>>>>>
>>>>> commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java
>>>>> URL:
>>>>>
>>>>> http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java?rev=1241133&view=auto
>>>>>
>>>>>
>>>>> ==============================================================================
>>>>> ---
>>>>>
>>>>> commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java
>>>>> (added)
>>>>> +++
>>>>>
>>>>> commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java
>>>>> Mon Feb  6 19:56:42 2012
>>>>> @@ -0,0 +1,277 @@
>>>>> +package org.apache.commons.beanutils2.type;
>>>>> +
>>>>
>>>>
>>>>
>>>> [...]
>>>>
>>>>> +/**
>>>>> + * @author jessewilson@google.com (Jesse Wilson)
>>>>> + */
>>>>> +public class TypesTest
>>>>> +{
>>>>
>>>>
>>>>
>>>> [...]
>>>>
>>>>> +    @Before
>>>>> +    public void setUp()
>>>>> +        throws Exception
>>>>> +    {
>>>>> +        mapStringInteger = (ParameterizedType)
>>>>> getClass().getDeclaredField( "a" ).getGenericType();
>>>>> +        innerFloatDouble = (ParameterizedType)
>>>>> getClass().getDeclaredField( "b" ).getGenericType();
>>>>> +        listStringArray = (ParameterizedType)
>>>>> getClass().getDeclaredField( "c" ).getGenericType();
>>>>> +        listString = (ParameterizedType) getClass().getDeclaredField(
>>>>> "d"
>>>>> ).getGenericType();
>>>>> +        setString = (ParameterizedType) getClass().getDeclaredField(
>>>>> "e"
>>>>> ).getGenericType();
>>>>> +        stringArray = (GenericArrayType)
>>>>> listStringArray.getActualTypeArguments()[0];<--- THIS FAILS
>>>>> +        outerInner = (ParameterizedType) getClass().getDeclaredField(
>>>>> "f"
>>>>> ).getGenericType();
>>>>> +    }
>>>>
>>>>
>>>>
>>>> [...]
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1241133 [2/2] - in /commons/sandbox/beanutils2/trunk: ./ src/main/java/org/apache/commons/beanutils2/type/ src/test/java/org/apache/commons/beanutils2/type/

Posted by Simone Tripodi <si...@apache.org>.
Ah, Java7... once figured out how to install JDK7 on Mac OS X, I'll
report the bug to the original author.
Dankeshön,
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



On Tue, Feb 7, 2012 at 4:13 PM, Benedikt Ritter
<be...@systemoutprintln.de> wrote:
> Hi, here's some info:
>
> C:\Users\Bene>mvn -version
> Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
> Maven home: D:\Entwicklung\maven\3.0.3
> Java version: 1.7.0_01, vendor: Oracle Corporation
> Java home: D:\Entwicklung\Java\jdk1.7.0_01\jre
> Default locale: de_DE, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>
> Complete mvn test output:
>
> [INFO] Scanning for projects...
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Apache Commons BeanUtils2 0.1-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-antrun-plugin:1.6:run (javadoc.resources) @
> commons-beanutils2 ---
> [INFO] Executing tasks
>
> main:
> [INFO] Executed tasks
> [INFO]
> [INFO] --- maven-remote-resources-plugin:1.1:process (default) @
> commons-beanutils2 ---
> [INFO] Setting property: classpath.resource.loader.class =>
> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
> [INFO] Setting property: velocimacro.messages.on => 'false'.
> [INFO] Setting property: resource.loader => 'classpath'.
> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
> [INFO]
> [INFO] --- buildnumber-maven-plugin:1.0:create (default) @
> commons-beanutils2 ---
> [INFO] Checking for local modifications: skipped.
> [INFO] Updating project files from SCM: skipped.
> [INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
> [INFO] Working directory: D:\Entwicklung\workspace\beanutils2
> [INFO] Storing buildNumber: ?????? at timestamp: 1328627538889
> [INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
> [INFO] Working directory: D:\Entwicklung\workspace\beanutils2
> [INFO] Storing buildScmBranch: UNKNOWN_BRANCH
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @
> commons-beanutils2 ---
> [debug] execute contextualize
> [INFO] Using 'iso-8859-1' encoding to copy filtered resources.
> [INFO] Copying 1 resource to META-INF
> [INFO] skip non existing resourceDirectory
> D:\Entwicklung\workspace\beanutils2\src\main\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
> commons-beanutils2 ---
> [INFO] Compiling 4 source files to
> D:\Entwicklung\workspace\beanutils2\target\classes
> [INFO]
> [INFO] --- maven-bundle-plugin:2.3.5:manifest (bundle-manifest) @
> commons-beanutils2 ---
> [INFO]
> [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources)
> @ commons-beanutils2 ---
> [debug] execute contextualize
> [INFO] Using 'iso-8859-1' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
> D:\Entwicklung\workspace\beanutils2\src\test\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
> commons-beanutils2 ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-surefire-plugin:2.9:test (default-test) @
> commons-beanutils2 ---
> [INFO] Surefire report directory:
> D:\Entwicklung\workspace\beanutils2\target\surefire-reports
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.commons.beanutils2.ArgumentTest
> Tests run: 62, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.129 sec
> Running org.apache.commons.beanutils2.BeanUtilsTest
> Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec
> Running org.apache.commons.beanutils2.ConstructorsTestCase
> Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec
> Running org.apache.commons.beanutils2.DescribeTestCase
> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 sec
> Running org.apache.commons.beanutils2.GetPropertyTestCase
> Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
> Running org.apache.commons.beanutils2.internal.AssertionsTest
> Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec
> Running org.apache.commons.beanutils2.MethodsTestCase
> Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec
> Running org.apache.commons.beanutils2.PopulateTestCase
> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
> Running org.apache.commons.beanutils2.SetPropertyTestCase
> Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
> Running org.apache.commons.beanutils2.StaticMethodsTestCase
> Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec
> Running org.apache.commons.beanutils2.type.TypeLiteralTest
> Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.077 sec
> Running org.apache.commons.beanutils2.type.TypeLiteralTypeResolutionTest
> Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec
> Running org.apache.commons.beanutils2.type.TypesTest
> Tests run: 10, Failures: 0, Errors: 10, Skipped: 0, Time elapsed: 0.018 sec
> <<< FAILURE!
> Running org.apache.commons.beanutils2.TypeUtilsTest
> Tests run: 244, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.126 sec
>
> Results :
>
> Tests in error:
>
> testInnerParameterizedEvenWithZeroArgs(org.apache.commons.beanutils2.type.TypesTest):
> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>
> testCanonicalizeRequiresOwnerTypes(org.apache.commons.beanutils2.type.TypesTest):
> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>
> testWildcardBoundsMustNotBePrimitives(org.apache.commons.beanutils2.type.TypesTest):
> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>
> testTypeParametersMustNotBePrimitives(org.apache.commons.beanutils2.type.TypesTest):
> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>  testTypeWithOwnerType(org.apache.commons.beanutils2.type.TypesTest):
> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>  testDefensiveCopies(org.apache.commons.beanutils2.type.TypesTest):
> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>  testListSetMap(org.apache.commons.beanutils2.type.TypesTest):
> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>  testWildcardTypes(org.apache.commons.beanutils2.type.TypesTest):
> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>  testEqualsAndHashcode(org.apache.commons.beanutils2.type.TypesTest):
> java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
>  testToString(org.apache.commons.beanutils2.type.TypesTest): java.lang.Class
> cannot be cast to java.lang.reflect.GenericArrayType
>
> Tests run: 471, Failures: 0, Errors: 10, Skipped: 0
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 5.389s
> [INFO] Finished at: Tue Feb 07 16:12:21 CET 2012
> [INFO] Final Memory: 21M/174M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.9:test (default-test) on
> project commons-beanutils2: There are test failures.
> [ERROR]
> [ERROR] Please refer to
> D:\Entwicklung\workspace\beanutils2\target\surefire-reports for the
> individual test results.
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>
>
> Am 07.02.2012 16:09, schrieb Simone Tripodi:
>
>> Which environment are you using? It doesn't fails on mine
>>
>> $ mvn --version
>> Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
>> Maven home: /Applications/apache-maven-3.0.4
>> Java version: 1.6.0_29, vendor: Apple Inc.
>> Java home:
>> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
>> Default locale: en_US, platform encoding: MacRoman
>> OS name: "mac os x", version: "10.7.2", arch: "x86_64", family: "mac"
>>
>> http://people.apache.org/~simonetripodi/
>> http://simonetripodi.livejournal.com/
>> http://twitter.com/simonetripodi
>> http://www.99soft.org/
>>
>>
>>
>> On Tue, Feb 7, 2012 at 4:01 PM, Benedikt Ritter
>> <be...@systemoutprintln.de>  wrote:
>>>
>>> Hi,
>>>
>>> the setup of TypesTest fails with a ClassCastException being thrown in
>>> line
>>> 90 (see the above code snippet).
>>> I haven't digged deep enough into all of the new code to make a
>>> suggestion
>>> on how to repair the test. I guess you will probably know a fix anyway ;)
>>>
>>> Have a nice day!
>>> Benedikt
>>>
>>> Am 06.02.2012 20:56, schrieb simonetripodi@apache.org:
>>>
>>> [...]
>>>
>>>> Added:
>>>>
>>>> commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java
>>>> URL:
>>>>
>>>> http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java?rev=1241133&view=auto
>>>>
>>>>
>>>> ==============================================================================
>>>> ---
>>>>
>>>> commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java
>>>> (added)
>>>> +++
>>>>
>>>> commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java
>>>> Mon Feb  6 19:56:42 2012
>>>> @@ -0,0 +1,277 @@
>>>> +package org.apache.commons.beanutils2.type;
>>>> +
>>>
>>>
>>>
>>> [...]
>>>
>>>> +/**
>>>> + * @author jessewilson@google.com (Jesse Wilson)
>>>> + */
>>>> +public class TypesTest
>>>> +{
>>>
>>>
>>>
>>> [...]
>>>
>>>> +    @Before
>>>> +    public void setUp()
>>>> +        throws Exception
>>>> +    {
>>>> +        mapStringInteger = (ParameterizedType)
>>>> getClass().getDeclaredField( "a" ).getGenericType();
>>>> +        innerFloatDouble = (ParameterizedType)
>>>> getClass().getDeclaredField( "b" ).getGenericType();
>>>> +        listStringArray = (ParameterizedType)
>>>> getClass().getDeclaredField( "c" ).getGenericType();
>>>> +        listString = (ParameterizedType) getClass().getDeclaredField(
>>>> "d"
>>>> ).getGenericType();
>>>> +        setString = (ParameterizedType) getClass().getDeclaredField(
>>>> "e"
>>>> ).getGenericType();
>>>> +        stringArray = (GenericArrayType)
>>>> listStringArray.getActualTypeArguments()[0];<--- THIS FAILS
>>>> +        outerInner = (ParameterizedType) getClass().getDeclaredField(
>>>> "f"
>>>> ).getGenericType();
>>>> +    }
>>>
>>>
>>>
>>> [...]
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1241133 [2/2] - in /commons/sandbox/beanutils2/trunk: ./ src/main/java/org/apache/commons/beanutils2/type/ src/test/java/org/apache/commons/beanutils2/type/

Posted by Benedikt Ritter <be...@systemoutprintln.de>.
Hi, here's some info:

C:\Users\Bene>mvn -version
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: D:\Entwicklung\maven\3.0.3
Java version: 1.7.0_01, vendor: Oracle Corporation
Java home: D:\Entwicklung\Java\jdk1.7.0_01\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

Complete mvn test output:

[INFO] Scanning for projects...
[INFO] 

[INFO] 
------------------------------------------------------------------------
[INFO] Building Apache Commons BeanUtils2 0.1-SNAPSHOT
[INFO] 
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-antrun-plugin:1.6:run (javadoc.resources) @ 
commons-beanutils2 ---
[INFO] Executing tasks

main:
[INFO] Executed tasks
[INFO]
[INFO] --- maven-remote-resources-plugin:1.1:process (default) @ 
commons-beanutils2 ---
[INFO] Setting property: classpath.resource.loader.class => 
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO]
[INFO] --- buildnumber-maven-plugin:1.0:create (default) @ 
commons-beanutils2 ---
[INFO] Checking for local modifications: skipped.
[INFO] Updating project files from SCM: skipped.
[INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
[INFO] Working directory: D:\Entwicklung\workspace\beanutils2
[INFO] Storing buildNumber: ?????? at timestamp: 1328627538889
[INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
[INFO] Working directory: D:\Entwicklung\workspace\beanutils2
[INFO] Storing buildScmBranch: UNKNOWN_BRANCH
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ 
commons-beanutils2 ---
[debug] execute contextualize
[INFO] Using 'iso-8859-1' encoding to copy filtered resources.
[INFO] Copying 1 resource to META-INF
[INFO] skip non existing resourceDirectory 
D:\Entwicklung\workspace\beanutils2\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ 
commons-beanutils2 ---
[INFO] Compiling 4 source files to 
D:\Entwicklung\workspace\beanutils2\target\classes
[INFO]
[INFO] --- maven-bundle-plugin:2.3.5:manifest (bundle-manifest) @ 
commons-beanutils2 ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources 
(default-testResources) @ commons-beanutils2 ---
[debug] execute contextualize
[INFO] Using 'iso-8859-1' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
D:\Entwicklung\workspace\beanutils2\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) 
@ commons-beanutils2 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.9:test (default-test) @ 
commons-beanutils2 ---
[INFO] Surefire report directory: 
D:\Entwicklung\workspace\beanutils2\target\surefire-reports

-------------------------------------------------------
  T E S T S
-------------------------------------------------------
Running org.apache.commons.beanutils2.ArgumentTest
Tests run: 62, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.129 sec
Running org.apache.commons.beanutils2.BeanUtilsTest
Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec
Running org.apache.commons.beanutils2.ConstructorsTestCase
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec
Running org.apache.commons.beanutils2.DescribeTestCase
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 sec
Running org.apache.commons.beanutils2.GetPropertyTestCase
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
Running org.apache.commons.beanutils2.internal.AssertionsTest
Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec
Running org.apache.commons.beanutils2.MethodsTestCase
Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec
Running org.apache.commons.beanutils2.PopulateTestCase
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
Running org.apache.commons.beanutils2.SetPropertyTestCase
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
Running org.apache.commons.beanutils2.StaticMethodsTestCase
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec
Running org.apache.commons.beanutils2.type.TypeLiteralTest
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.077 sec
Running org.apache.commons.beanutils2.type.TypeLiteralTypeResolutionTest
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec
Running org.apache.commons.beanutils2.type.TypesTest
Tests run: 10, Failures: 0, Errors: 10, Skipped: 0, Time elapsed: 0.018 
sec <<< FAILURE!
Running org.apache.commons.beanutils2.TypeUtilsTest
Tests run: 244, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.126 sec

Results :

Tests in error:
 
testInnerParameterizedEvenWithZeroArgs(org.apache.commons.beanutils2.type.TypesTest): 
java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
 
testCanonicalizeRequiresOwnerTypes(org.apache.commons.beanutils2.type.TypesTest): 
java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
 
testWildcardBoundsMustNotBePrimitives(org.apache.commons.beanutils2.type.TypesTest): 
java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
 
testTypeParametersMustNotBePrimitives(org.apache.commons.beanutils2.type.TypesTest): 
java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
   testTypeWithOwnerType(org.apache.commons.beanutils2.type.TypesTest): 
java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
   testDefensiveCopies(org.apache.commons.beanutils2.type.TypesTest): 
java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
   testListSetMap(org.apache.commons.beanutils2.type.TypesTest): 
java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
   testWildcardTypes(org.apache.commons.beanutils2.type.TypesTest): 
java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
   testEqualsAndHashcode(org.apache.commons.beanutils2.type.TypesTest): 
java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType
   testToString(org.apache.commons.beanutils2.type.TypesTest): 
java.lang.Class cannot be cast to java.lang.reflect.GenericArrayType

Tests run: 471, Failures: 0, Errors: 10, Skipped: 0

[INFO] 
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: 5.389s
[INFO] Finished at: Tue Feb 07 16:12:21 CET 2012
[INFO] Final Memory: 21M/174M
[INFO] 
------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:2.9:test (default-test) 
on project commons-beanutils2: There are test failures.
[ERROR]
[ERROR] Please refer to 
D:\Entwicklung\workspace\beanutils2\target\surefire-reports for the 
individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the 
-e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, 
please read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


Am 07.02.2012 16:09, schrieb Simone Tripodi:
> Which environment are you using? It doesn't fails on mine
>
> $ mvn --version
> Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
> Maven home: /Applications/apache-maven-3.0.4
> Java version: 1.6.0_29, vendor: Apple Inc.
> Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x", version: "10.7.2", arch: "x86_64", family: "mac"
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
>
>
> On Tue, Feb 7, 2012 at 4:01 PM, Benedikt Ritter
> <be...@systemoutprintln.de>  wrote:
>> Hi,
>>
>> the setup of TypesTest fails with a ClassCastException being thrown in line
>> 90 (see the above code snippet).
>> I haven't digged deep enough into all of the new code to make a suggestion
>> on how to repair the test. I guess you will probably know a fix anyway ;)
>>
>> Have a nice day!
>> Benedikt
>>
>> Am 06.02.2012 20:56, schrieb simonetripodi@apache.org:
>>
>> [...]
>>
>>> Added:
>>> commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java
>>> URL:
>>> http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java?rev=1241133&view=auto
>>>
>>> ==============================================================================
>>> ---
>>> commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java
>>> (added)
>>> +++
>>> commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java
>>> Mon Feb  6 19:56:42 2012
>>> @@ -0,0 +1,277 @@
>>> +package org.apache.commons.beanutils2.type;
>>> +
>>
>>
>> [...]
>>
>>> +/**
>>> + * @author jessewilson@google.com (Jesse Wilson)
>>> + */
>>> +public class TypesTest
>>> +{
>>
>>
>> [...]
>>
>>> +    @Before
>>> +    public void setUp()
>>> +        throws Exception
>>> +    {
>>> +        mapStringInteger = (ParameterizedType)
>>> getClass().getDeclaredField( "a" ).getGenericType();
>>> +        innerFloatDouble = (ParameterizedType)
>>> getClass().getDeclaredField( "b" ).getGenericType();
>>> +        listStringArray = (ParameterizedType)
>>> getClass().getDeclaredField( "c" ).getGenericType();
>>> +        listString = (ParameterizedType) getClass().getDeclaredField( "d"
>>> ).getGenericType();
>>> +        setString = (ParameterizedType) getClass().getDeclaredField( "e"
>>> ).getGenericType();
>>> +        stringArray = (GenericArrayType)
>>> listStringArray.getActualTypeArguments()[0];<--- THIS FAILS
>>> +        outerInner = (ParameterizedType) getClass().getDeclaredField( "f"
>>> ).getGenericType();
>>> +    }
>>
>>
>> [...]
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1241133 [2/2] - in /commons/sandbox/beanutils2/trunk: ./ src/main/java/org/apache/commons/beanutils2/type/ src/test/java/org/apache/commons/beanutils2/type/

Posted by Simone Tripodi <si...@apache.org>.
Which environment are you using? It doesn't fails on mine

$ mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /Applications/apache-maven-3.0.4
Java version: 1.6.0_29, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.7.2", arch: "x86_64", family: "mac"

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



On Tue, Feb 7, 2012 at 4:01 PM, Benedikt Ritter
<be...@systemoutprintln.de> wrote:
> Hi,
>
> the setup of TypesTest fails with a ClassCastException being thrown in line
> 90 (see the above code snippet).
> I haven't digged deep enough into all of the new code to make a suggestion
> on how to repair the test. I guess you will probably know a fix anyway ;)
>
> Have a nice day!
> Benedikt
>
> Am 06.02.2012 20:56, schrieb simonetripodi@apache.org:
>
> [...]
>
>> Added:
>> commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java
>> URL:
>> http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java?rev=1241133&view=auto
>>
>> ==============================================================================
>> ---
>> commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java
>> (added)
>> +++
>> commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/type/TypesTest.java
>> Mon Feb  6 19:56:42 2012
>> @@ -0,0 +1,277 @@
>> +package org.apache.commons.beanutils2.type;
>> +
>
>
> [...]
>
>> +/**
>> + * @author jessewilson@google.com (Jesse Wilson)
>> + */
>> +public class TypesTest
>> +{
>
>
> [...]
>
>> +    @Before
>> +    public void setUp()
>> +        throws Exception
>> +    {
>> +        mapStringInteger = (ParameterizedType)
>> getClass().getDeclaredField( "a" ).getGenericType();
>> +        innerFloatDouble = (ParameterizedType)
>> getClass().getDeclaredField( "b" ).getGenericType();
>> +        listStringArray = (ParameterizedType)
>> getClass().getDeclaredField( "c" ).getGenericType();
>> +        listString = (ParameterizedType) getClass().getDeclaredField( "d"
>> ).getGenericType();
>> +        setString = (ParameterizedType) getClass().getDeclaredField( "e"
>> ).getGenericType();
>> +        stringArray = (GenericArrayType)
>> listStringArray.getActualTypeArguments()[0]; <--- THIS FAILS
>> +        outerInner = (ParameterizedType) getClass().getDeclaredField( "f"
>> ).getGenericType();
>> +    }
>
>
> [...]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org