[COLLECTIONS] CartesianProductIterator
G'day to all! It seems there's no Iterator that would implement the same thing as Python's itertools.product (quite literally a nested for loop) with some Java stream() capabilities. Is this intentional (as in, was considered and rejected) or a PR with such CartesianProductIterator would be welcomed? Be well, Alexey
TEST fails for commons-compress:1.26
Hi Team, I am able to build commons-compress from source code, but while trying to run the tests it fails with the following error. Please assist me on how to fix this > [INFO] Results: > [INFO] > [ERROR] Failures: > [ERROR] TarArchiveEntryTest.testLinuxFileInformationFromFile:199 > expected: not equal but was: <0> > [ERROR] TarArchiveEntryTest.testLinuxFileInformationFromPath:208 > expected: not equal but was: <0> > [ERROR] Errors: > [ERROR] ListerTest.testMain:47 ? MalformedInput Input length = 1 > [ERROR] > GzipCompressorOutputStreamTest.testFileNameChinesePercentEncoded:71->testFileName:38 > ? InvalidPath Malformed input or input contains unmappable characters: > ??.xml12263541264916463068??.xml > [INFO] > [ERROR] Tests run: 2746, Failures: 2, Errors: 2, Skipped: 27 > [INFO] > [INFO] > > [INFO] BUILD FAILURE > [INFO] > > [INFO] Total time: 46.075 s > [INFO] Finished at: 2024-06-24T12:26:41Z > [INFO] > > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on > project commons-compress: There are test failures. > Source URL: https://github.com/apache/commons-compress/archive/refs/tags/rel/commons-compress-1.26.0.zip BUILD COMMAND: mvn clean install -DskipTests TEST COMMAND: mvn test JAVA Version: 17.0.8 MAVEN Version: 3.9.4 Regards, Sumera
Re: TEST fails for commons-compress:1.26
Hi, There have been some patch releases since 1.26. Can you try with the latest release (1.26.2): https://commons.apache.org/compress/download_compress.cgi If this still doesn't work can you provide the output of 'mvn -v' when run from within the source root directory. This will provide your build platform details so we can try and reproduce the issue. Thanks, Alex On Wed, 26 Jun 2024 at 17:28, sumera sum wrote: > Hi Team, > I am able to build commons-compress from source code, but while trying to > run the tests it fails with the following error. Please assist me on how to > fix this > > > [INFO] Results: > > [INFO] > > [ERROR] Failures: > > [ERROR] TarArchiveEntryTest.testLinuxFileInformationFromFile:199 > > expected: not equal but was: <0> > > [ERROR] TarArchiveEntryTest.testLinuxFileInformationFromPath:208 > > expected: not equal but was: <0> > > [ERROR] Errors: > > [ERROR] ListerTest.testMain:47 ? MalformedInput Input length = 1 > > [ERROR] > > > GzipCompressorOutputStreamTest.testFileNameChinesePercentEncoded:71->testFileName:38 > > ? InvalidPath Malformed input or input contains unmappable characters: > > ??.xml12263541264916463068??.xml > > [INFO] > > [ERROR] Tests run: 2746, Failures: 2, Errors: 2, Skipped: 27 > > [INFO] > > [INFO] > > > > [INFO] BUILD FAILURE > > [INFO] > > > > [INFO] Total time: 46.075 s > > [INFO] Finished at: 2024-06-24T12:26:41Z > > [INFO] > > > > [ERROR] Failed to execute goal > > org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) > on > > project commons-compress: There are test failures. > > > > Source URL: > > https://github.com/apache/commons-compress/archive/refs/tags/rel/commons-compress-1.26.0.zip > BUILD COMMAND: mvn clean install -DskipTests > TEST COMMAND: mvn test > JAVA Version: 17.0.8 > MAVEN Version: 3.9.4 > > Regards, > Sumera >
Re: TEST fails for commons-compress:1.26
Also what is your local OS and file encoding? It could be a file encoding issue... Gary On Wed, Jun 26, 2024, 12:52 PM Alex Herbert wrote: > Hi, > > There have been some patch releases since 1.26. Can you try with the latest > release (1.26.2): > > https://commons.apache.org/compress/download_compress.cgi > > If this still doesn't work can you provide the output of 'mvn -v' when run > from within the source root directory. This will provide your build > platform details so we can try and reproduce the issue. > > Thanks, > > Alex > > > On Wed, 26 Jun 2024 at 17:28, sumera sum wrote: > > > Hi Team, > > I am able to build commons-compress from source code, but while trying to > > run the tests it fails with the following error. Please assist me on how > to > > fix this > > > > > [INFO] Results: > > > [INFO] > > > [ERROR] Failures: > > > [ERROR] TarArchiveEntryTest.testLinuxFileInformationFromFile:199 > > > expected: not equal but was: <0> > > > [ERROR] TarArchiveEntryTest.testLinuxFileInformationFromPath:208 > > > expected: not equal but was: <0> > > > [ERROR] Errors: > > > [ERROR] ListerTest.testMain:47 ? MalformedInput Input length = 1 > > > [ERROR] > > > > > > GzipCompressorOutputStreamTest.testFileNameChinesePercentEncoded:71->testFileName:38 > > > ? InvalidPath Malformed input or input contains unmappable characters: > > > ??.xml12263541264916463068??.xml > > > [INFO] > > > [ERROR] Tests run: 2746, Failures: 2, Errors: 2, Skipped: 27 > > > [INFO] > > > [INFO] > > > > > > > [INFO] BUILD FAILURE > > > [INFO] > > > > > > > [INFO] Total time: 46.075 s > > > [INFO] Finished at: 2024-06-24T12:26:41Z > > > [INFO] > > > > > > > [ERROR] Failed to execute goal > > > org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test > (default-test) > > on > > > project commons-compress: There are test failures. > > > > > > > Source URL: > > > > > https://github.com/apache/commons-compress/archive/refs/tags/rel/commons-compress-1.26.0.zip > > BUILD COMMAND: mvn clean install -DskipTests > > TEST COMMAND: mvn test > > JAVA Version: 17.0.8 > > MAVEN Version: 3.9.4 > > > > Regards, > > Sumera > > >
Re: [COLLECTIONS] CartesianProductIterator
I don't know if it's been proposed before, but I think any implementation would necessarily be inefficient. I imagine such an iterator would need to produce objects of type Pair. This would lead to a lot of allocation and could create garbage collection pressure. The same functionality can be achieved with a nested for-loop (or flatMap()), much more efficiently. On Wed, Jun 26, 2024, 12:27 PM Alexey Pelykh wrote: > G'day to all! > > It seems there's no Iterator that would implement the same thing as > Python's itertools.product (quite literally a nested for loop) with some > Java stream() capabilities. > Is this intentional (as in, was considered and rejected) or a PR with such > CartesianProductIterator would be welcomed? > > Be well, > Alexey