Skip to content

Commit

Permalink
Fix CustomElementMatchers test on windows (#3765)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasKunz authored Aug 19, 2024
1 parent d4280c9 commit 24b2b19
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLClassLoader;
import java.net.URI;
import java.nio.file.Files;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.CodeSigner;
Expand All @@ -42,7 +42,12 @@
import java.util.List;
import java.util.Map;

import static co.elastic.apm.agent.sdk.bytebuddy.CustomElementMatchers.*;
import static co.elastic.apm.agent.sdk.bytebuddy.CustomElementMatchers.classLoaderCanLoadClass;
import static co.elastic.apm.agent.sdk.bytebuddy.CustomElementMatchers.implementationVersionGte;
import static co.elastic.apm.agent.sdk.bytebuddy.CustomElementMatchers.implementationVersionLte;
import static co.elastic.apm.agent.sdk.bytebuddy.CustomElementMatchers.isAgentClassLoader;
import static co.elastic.apm.agent.sdk.bytebuddy.CustomElementMatchers.isInAnyPackage;
import static co.elastic.apm.agent.sdk.bytebuddy.CustomElementMatchers.isInternalPluginClassLoader;
import static net.bytebuddy.matcher.ElementMatchers.none;
import static org.assertj.core.api.Assertions.assertThat;

Expand Down Expand Up @@ -84,7 +89,7 @@ void testSemVerFallbackOnMavenProperties(@TempDir Path tempDir) throws URISyntax
Map<String, String> fsProperties = new HashMap<>();
fsProperties.put("create", "false");

URI fsUri = URI.create("jar:file://" + modifiedJar.toAbsolutePath());
URI fsUri = URI.create("jar:" + modifiedJar.toUri());
try (FileSystem zipFs = FileSystems.newFileSystem(fsUri, fsProperties)) {
Files.delete(zipFs.getPath("META-INF", "MANIFEST.MF"));
}
Expand Down

0 comments on commit 24b2b19

Please sign in to comment.