You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Shekhar Gulati (JIRA)" <ji...@apache.org> on 2010/08/07 12:51:15 UTC

[jira] Issue Comment Edited: (LANG-641) Maven build failing --Two Junit test cases in ArrayUtilsTest giving Error

    [ https://issues.apache.org/jira/browse/LANG-641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12896244#action_12896244 ] 

Shekhar Gulati edited comment on LANG-641 at 8/7/10 6:49 AM:
-------------------------------------------------------------

I have fixed the problem you can apply the patch attached with this issue. Test was failing because it was not specifying the type to be used while creating an empty generic array.

      was (Author: shekhargulati):
    Patch for the build failure. Test was failing because it was not specifying the type to be used while creating an empty generic array.
  
> Maven build failing --Two Junit test cases in ArrayUtilsTest giving Error
> -------------------------------------------------------------------------
>
>                 Key: LANG-641
>                 URL: https://issues.apache.org/jira/browse/LANG-641
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: Nightly Builds
>         Environment: Windows Vista 
>            Reporter: Shekhar Gulati
>             Fix For: Nightly Builds
>
>         Attachments: patch_Issue-641-ArrayUtilsTest_Failure.txt
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Two unit test in ArrayUtilsTest are giving error hence the build is failing.
> -------------------------------------------------------------------------------
> Test set: org.apache.commons.lang3.ArrayUtilsTest
> -------------------------------------------------------------------------------
> Tests run: 145, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.067 sec <<< FAILURE!
> testEmptyArrayCreation(org.apache.commons.lang3.ArrayUtilsTest)  Time elapsed: 0.003 sec  <<< ERROR!
> java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
> 	at org.apache.commons.lang3.ArrayUtilsTest.testEmptyArrayCreation(ArrayUtilsTest.java:184)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at junit.framework.TestCase.runTest(TestCase.java:168)
> 	at junit.framework.TestCase.runBare(TestCase.java:134)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:124)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:232)
> 	at junit.framework.TestSuite.run(TestSuite.java:227)
> 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> 	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102)
> 	at org.apache.maven.surefire.Surefire.run(Surefire.java:180)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
> 	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
> testIndirectEmptyArrayCreation(org.apache.commons.lang3.ArrayUtilsTest)  Time elapsed: 0 sec  <<< ERROR!
> java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
> 	at org.apache.commons.lang3.ArrayUtilsTest.testIndirectEmptyArrayCreation(ArrayUtilsTest.java:193)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at junit.framework.TestCase.runTest(TestCase.java:168)
> 	at junit.framework.TestCase.runBare(TestCase.java:134)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:124)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:232)
> 	at junit.framework.TestSuite.run(TestSuite.java:227)
> 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> 	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102)
> 	at org.apache.maven.surefire.Surefire.run(Surefire.java:180)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
> 	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.