diff --git a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/catalog/CatalogRest.java b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/catalog/CatalogRest.java index 882b9ecf7..8a7b7e000 100644 --- a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/catalog/CatalogRest.java +++ b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/catalog/CatalogRest.java @@ -30,7 +30,7 @@ public Response catalogListFilterType( @PathParam("type") String type ) { DocCatalogSample.getInstance().getPlaygroundCoreCatalog() .stream().filter( e -> type.equalsIgnoreCase( e.getType() ) ).map( e -> new OptionItem( e.getId(), e.getDescription() ) - ).collect( Collectors.toList() ) ).build() + ).toList() ).build() ); } @@ -42,7 +42,7 @@ public Response catalogList() { DocCatalogSample.getInstance().getPlaygroundCoreCatalog() .stream().map( e -> new OptionItem( e.getId(), e.getDescription() ) - ).collect( Collectors.toList() ) ).build() + ).toList() ).build() ); } diff --git a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/val/ValUtils.java b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/val/ValUtils.java index 3ed72c6bb..0c79dbe2f 100644 --- a/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/val/ValUtils.java +++ b/fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/val/ValUtils.java @@ -25,7 +25,7 @@ public static boolean isInTmpFolder( File tempFile ) throws IOException { public static Response doIfInTmpFolder(File tempFile, UnsafeSupplier fun ) throws IOException { Response res = null; if ( isInTmpFolder( tempFile ) ) { - res = HelperIOException.get( () -> fun.get() ); + res = HelperIOException.get( fun::get ); } else { // no access res = Response.status(Response.Status.UNAUTHORIZED).build(); diff --git a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValUtilsTest.java b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValUtilsTest.java index 69aa259c0..1a54ecec0 100644 --- a/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValUtilsTest.java +++ b/fj-doc-playground-quarkus/src/test/java/org/fugerit/java/doc/playground/ValUtilsTest.java @@ -8,16 +8,16 @@ import java.io.File; import java.io.IOException; -public class ValUtilsTest { +class ValUtilsTest { @Test - public void testDoIfInTmpFolder401() throws IOException { + void testDoIfInTmpFolder401() throws IOException { Response response = ValUtils.doIfInTmpFolder(new File("/"), () -> null); Assertions.assertEquals( Response.Status.UNAUTHORIZED.getStatusCode(), response.getStatus() ); } @Test - public void testDoIfInTmpFolder200() throws IOException { + void testDoIfInTmpFolder200() throws IOException { Response response = ValUtils.doIfInTmpFolder( new File( System.getProperty( "java.io.tmpdir" ), "test.txt" ), () -> null); Assertions.assertNull( response ); }