Skip to content

Classpath transforming failure under Windows #1398

@ethauvin

Description

@ethauvin

I'm experiencing the following failure under Windows when running Pitest 1.19 from the command line:

Error: Exception in thread "main" org.pitest.util.PitError: Error transforming classpath element D:\a\bld-pitest\bld-pitest\examples\lib\compile\*

Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Azul Systems, Inc.
Version : 17.0.14+7-LTS
Uptime : 254
Input -> 
BootClassPathSupported : false

	at org.pitest.classpath.ClassPath.lambda$stringToCanonicalFile$3(ClassPath.java:166)
	at org.pitest.functional.FCollection.mapTo(FCollection.java:36)
	at org.pitest.classpath.ClassPath.getClassPathElementsAsFiles(ClassPath.java:124)
	at org.pitest.classpath.ClassPath.getClassPathElementsAsPaths(ClassPath.java:[11](https://github.com/rife2/bld-pitest/actions/runs/14069542281/job/39400336783#step:5:12)6)
	at org.pitest.mutationtest.commandline.OptionsParser.setClassPath(OptionsParser.java:549)
	at org.pitest.mutationtest.commandline.OptionsParser.parseCommandLine(OptionsParser.java:500)
	at org.pitest.mutationtest.commandline.OptionsParser.parse(OptionsParser.java:433)
	at org.pitest.mutationtest.commandline.MutationCoverageReport.main(MutationCoverageReport.java:37)
Caused by: java.io.IOException: Bad pathname
	at java.base/java.io.WinNTFileSystem.canonicalize0(Native Method)
	at java.base/java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:462)
	at java.base/java.io.File.getCanonicalPath(File.java:626)
	at java.base/java.io.File.getCanonicalFile(File.java:651)
	at org.pitest.classpath.ClassPath.lambda$stringToCanonicalFile$3(ClassPath.java:[16](https://github.com/rife2/bld-pitest/actions/runs/14069542281/job/39400336783#step:5:17)4)
	... 7 more

The command line arguments are:

java
-cp D:\a\bld-pitest\bld-pitest\examples\lib\test\*;D:\a\bld-pitest\bld-pitest\examples\lib\compile\*;D:\a\bld-pitest\bld-pitest\examples\build\main;D:\a\bld-pitest\bld-pitest\examples\build\test
org.pitest.mutationtest.commandline.MutationCoverageReport 
--targetTests com.example.* 
--reportDir D:\a\bld-pitest\bld-pitest\examples\reports\mutations
--targetClasses com.example.* 
--sourceDirs D:\a\bld-pitest\bld-pitest\examples\src 
--verbose true

The error can be seen on the bld-pitest GitHub worklow running on windows-latest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions