Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaSearchBugsTests2: do not add jar to classpath before creating #3472

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

jukzi
Copy link
Contributor

@jukzi jukzi commented Dec 18, 2024

Avoids to log NoSuchFileException

@jukzi
Copy link
Contributor Author

jukzi commented Dec 18, 2024

example log entry:

     [java] Failed to init Classpath for jar file C:\Users\genie.releng\workspace\AutomatedTests\ep435I-unit-win32-x86_64-java21\workarea\I20241217-1800\eclipse-testing\test-eclipse\eclipse\jdt_model_folder\data\P\lib478042.jar
     [java] java.nio.file.NoSuchFileException: C:\Users\genie.releng\workspace\AutomatedTests\ep435I-unit-win32-x86_64-java21\workarea\I20241217-1800\eclipse-testing\test-eclipse\eclipse\jdt_model_folder\data\P\lib478042.jar
     [java] 	at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
     [java] 	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
     [java] 	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
     [java] 	at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
     [java] 	at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
     [java] 	at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:197)
     [java] 	at java.base/java.nio.file.Files.readAttributes(Files.java:1853)
     [java] 	at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445)
     [java] 	at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
     [java] 	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
     [java] 	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
     [java] 	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:194)
     [java] 	at org.eclipse.jdt.internal.compiler.batch.ClasspathJar.initialize(ClasspathJar.java:196)
     [java] 	at org.eclipse.jdt.internal.compiler.batch.FileSystem.<init>(FileSystem.java:206)
     [java] 	at org.eclipse.jdt.internal.compiler.batch.FileSystem.<init>(FileSystem.java:190)
     [java] 	at org.eclipse.jdt.core.tests.util.Util.compile(Util.java:267)
     [java] 	at org.eclipse.jdt.core.tests.util.Util.createJar(Util.java:473)
     [java] 	at org.eclipse.jdt.core.tests.util.Util.createJar(Util.java:497)
     [java] 	at org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.createJar(AbstractJavaModelTests.java:1657)
     [java] 	at org.eclipse.jdt.core.tests.model.JavaSearchBugsTests2.testBug478042_005(JavaSearchBugsTests2.java:2194)
     [java] 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
     [java] 	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
     [java] 	at junit.framework.TestCase.runTest(TestCase.java:177)
     [java] 	at org.eclipse.jdt.core.tests.junit.extension.TestCase.runTest(TestCase.java:970)
     [java] 	at junit.framework.TestCase.runBare(TestCase.java:142)
     [java] 	at junit.framework.TestResult$1.protect(TestResult.java:122)
     [java] 	at junit.framework.TestResult.runProtected(TestResult.java:142)
     [java] 	at junit.framework.TestResult.run(TestResult.java:125)
     [java] 	at junit.framework.TestCase.run(TestCase.java:130)
     [java] 	at junit.framework.TestSuite.runTest(TestSuite.java:241)
     [java] 	at org.eclipse.jdt.core.tests.model.SuiteOfTestCases$Suite.runTest(SuiteOfTestCases.java:114)
     [java] 	at junit.framework.TestSuite.run(TestSuite.java:236)
     [java] 	at org.eclipse.jdt.core.tests.model.SuiteOfTestCases$Suite.superRun(SuiteOfTestCases.java:97)
     [java] 	at org.eclipse.jdt.core.tests.model.SuiteOfTestCases$Suite$1.protect(SuiteOfTestCases.java:85)
     [java] 	at junit.framework.TestResult.runProtected(TestResult.java:142)
     [java] 	at org.eclipse.jdt.core.tests.model.SuiteOfTestCases$Suite.run(SuiteOfTestCases.java:94)
     [java] 	at junit.framework.TestSuite.runTest(TestSuite.java:241)
     [java] 	at junit.framework.TestSuite.run(TestSuite.java:236)
     [java] 	at junit.framework.TestSuite.runTest(TestSuite.java:241)
     [java] 	at junit.framework.TestSuite.run(TestSuite.java:236)
     [java] 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
     [java] 	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
     [java] 	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
     [java] 	at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:42)
     [java] 	at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:80)
     [java] 	at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:72)
     [java] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:198)
     [java] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169)
     [java] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93)
     [java] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58)
     [java] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141)
     [java] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57)
     [java] 	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103)
     [java] 	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85)
     [java] 	at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
     [java] 	at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:63)
     [java] 	at org.eclipse.test.EclipseTestRunner.runTests(EclipseTestRunner.java:212)
     [java] 	at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:187)
     [java] 	at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:53)
     [java] 	at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:35)
     [java] 	at org.eclipse.test.CoreTestApplication.start(CoreTestApplication.java:44)
     [java] 	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
     [java] 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
     [java] 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
     [java] 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
     [java] 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
     [java] 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
     [java] 	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
     [java] 	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)
     [java] 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)
     [java] 	at org.eclipse.equinox.launcher.Main.run(Main.java:1481)
     [java] 	at org.eclipse.equinox.launcher.Main.main(Main.java:1454)

@jukzi jukzi added the test Work on unit tests, no change of productive code label Dec 18, 2024
@jukzi jukzi merged commit 7adbfef into eclipse-jdt:master Dec 18, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Work on unit tests, no change of productive code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant