Skip to content

Commit

Permalink
Java formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cromoteca authored and taefi committed Dec 22, 2023
1 parent beef5b0 commit cc9cc57
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ private static Optional<String> getHillaReactVersion() {
return Optional.empty();
}
} catch (Exception e) {
LOGGER.error("Unable to determine com.vaadin.hilla/hilla-react version",
LOGGER.error(
"Unable to determine com.vaadin.hilla/hilla-react version",
e);
}
return Optional.of("?");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ public void restoreContextClassLoader() {

private URL fakeJar(String artifactId, String version) throws IOException {
final Path jar = temporary.newFolder().toPath();
final Path pomProperties = jar.resolve(
"META-INF/maven/com.vaadin.hilla/" + artifactId + "/pom.properties");
final Path pomProperties = jar
.resolve("META-INF/maven/com.vaadin.hilla/" + artifactId
+ "/pom.properties");
Files.createDirectories(pomProperties.getParent());
Files.writeString(pomProperties, "version=" + version);
return jar.toUri().toURL();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ public void setUp() throws IOException {
this.baseDirectory = this.temporaryDirectory.resolve("base");

var parserConfiguration = new ParserConfiguration();
parserConfiguration.setEndpointAnnotation("com.vaadin.hilla.test.Endpoint");
parserConfiguration
.setEndpointExposedAnnotation("com.vaadin.hilla.test.EndpointExposed");
.setEndpointAnnotation("com.vaadin.hilla.test.Endpoint");
parserConfiguration.setEndpointExposedAnnotation(
"com.vaadin.hilla.test.EndpointExposed");
parserConfiguration.setPlugins(new ParserConfiguration.Plugins(List.of(
new ParserConfiguration.Plugin("parser-jvm-plugin-use"),
new ParserConfiguration.Plugin("parser-jvm-plugin-nonnull",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public class EndpointExposedAndSecurityAnnotationTest {
public void throws_when_parentEndpointClass_annotatedWithSecurityAnnotations() {
var exception = assertThrows(ParserException.class, () -> new Parser()
.classLoader(getClass().getClassLoader()).classPath(classPath)
.exposedPackages(
Set.of("com.vaadin.hilla.parser.core.security.classlevel"))
.exposedPackages(Set
.of("com.vaadin.hilla.parser.core.security.classlevel"))
.endpointAnnotation(Endpoint.class.getName())
.endpointExposedAnnotation(EndpointExposed.class.getName())
.execute());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public class EndpointExposedMethodAndSecurityAnnotationTest {
public void throws_when_parentEndpointMethod_annotatedWithSecurityAnnotations() {
var exception = assertThrows(ParserException.class, () -> new Parser()
.classLoader(getClass().getClassLoader()).classPath(classPath)
.exposedPackages(
Set.of("com.vaadin.hilla.parser.core.security.methodlevel"))
.exposedPackages(Set.of(
"com.vaadin.hilla.parser.core.security.methodlevel"))
.endpointAnnotation(Endpoint.class.getName())
.endpointExposedAnnotation(EndpointExposed.class.getName())
.execute());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public class AnnotationsTest {
public void should_GenerateAnnotations()
throws IOException, URISyntaxException {
var openAPI = new Parser().classLoader(getClass().getClassLoader())
.exposedPackages(
Set.of("com.vaadin.hilla.parser.plugins.model.annotations"))
.exposedPackages(Set.of(
"com.vaadin.hilla.parser.plugins.model.annotations"))
.classPath(Set.of(helper.getTargetDir().toString()))
.endpointAnnotation(Endpoint.class.getName())
.endpointExposedAnnotation(EndpointExposed.class.getName())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public class JavaTypeTest {
public void should_GenerateAnnotations()
throws IOException, URISyntaxException {
var openAPI = new Parser().classLoader(getClass().getClassLoader())
.exposedPackages(
Set.of("com.vaadin.hilla.parser.plugins.model.javatypes"))
.exposedPackages(Set
.of("com.vaadin.hilla.parser.plugins.model.javatypes"))
.classPath(Set.of(helper.getTargetDir().toString()))
.endpointAnnotation(Endpoint.class.getName())
.endpointExposedAnnotation(EndpointExposed.class.getName())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public class ValidationTest {
public void should_GenerateValidations()
throws IOException, URISyntaxException {
var openAPI = new Parser().classLoader(getClass().getClassLoader())
.exposedPackages(
Set.of("com.vaadin.hilla.parser.plugins.model.validation"))
.exposedPackages(Set
.of("com.vaadin.hilla.parser.plugins.model.validation"))
.classPath(Set.of(helper.getTargetDir().toString()))
.endpointAnnotation(Endpoint.class.getName())
.endpointExposedAnnotation(EndpointExposed.class.getName())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
import javax.annotation.Nonnull;

/**
* A converter for relative paths of com.vaadin.hilla.engine.EngineConfiguration. It
* solves an issue of testing absolute paths on different OSes.
* A converter for relative paths of
* com.vaadin.hilla.engine.EngineConfiguration. It solves an issue of testing
* absolute paths on different OSes.
* <p>
* The class is detached (has no dependency to the real
* com.vaadin.hilla.engine.EngineConfiguration class) to avoid circular dependencies
* with the `engine-core` package.
* com.vaadin.hilla.engine.EngineConfiguration class) to avoid circular
* dependencies with the `engine-core` package.
*/
public final class TestEngineConfigurationPathResolver {
private static final String BASE_FIELD_NAME = "baseDir";
Expand Down

0 comments on commit cc9cc57

Please sign in to comment.