Skip to content

Commit

Permalink
fix: Narrow scanning, skip using "var"
Browse files Browse the repository at this point in the history
  • Loading branch information
mat3e committed Jul 11, 2024
1 parent 59aa7d8 commit 9fc1339
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@

package examples;

import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.stream.Stream;

import org.eclipse.jetty.server.Server;
Expand Down Expand Up @@ -51,7 +49,7 @@ public static Server newServer(int port)
context.setBaseResource(baseResource);
context.setContextPath("/");
context.setWelcomeFiles(new String[]{"index.html", "welcome.html"});
context.setAttribute("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern", ".*/");
context.setAttribute("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern", ".*/classes/*");
context.setParentLoaderPriority(true);
server.setHandler(context);
return server;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.is;

public class EmbedMeTest
class EmbedMeTest
{
private Server server;

@BeforeEach
public void startServer() throws Exception
void startServer() throws Exception
{
server = EmbedMe.newServer(0);
server.start();
}

@AfterEach
public void stopServer()
void stopServer()
{
LifeCycle.stop(server);
}

@Test
public void testGetWelcome() throws IOException, InterruptedException
void testGetWelcome() throws IOException, InterruptedException
{
HttpClient client = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpRequest request = HttpRequest.newBuilder()
Expand All @@ -61,8 +61,8 @@ public void testGetWelcome() throws IOException, InterruptedException

@Test
void testGetIndex() throws IOException, InterruptedException {
var client = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
var request = HttpRequest.newBuilder()
HttpClient client = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpRequest request = HttpRequest.newBuilder()
.uri(server.getURI().resolve("/test"))
.GET()
.build();
Expand Down

0 comments on commit 9fc1339

Please sign in to comment.