Upgrade to spring javaformat 0.0.35

This commit is contained in:
Stephane Nicoll
2022-10-06 07:55:02 +02:00
parent c8da0769d1
commit d8c3a13ad5
6 changed files with 74 additions and 74 deletions

View File

@@ -164,22 +164,22 @@ public abstract class GradleBuildWriter {
return "implementation";
}
switch (type) {
case ANNOTATION_PROCESSOR:
return "annotationProcessor";
case COMPILE:
return "implementation";
case COMPILE_ONLY:
return "compileOnly";
case PROVIDED_RUNTIME:
return "providedRuntime";
case RUNTIME:
return "runtimeOnly";
case TEST_COMPILE:
return "testImplementation";
case TEST_RUNTIME:
return "testRuntimeOnly";
default:
throw new IllegalStateException("Unrecognized dependency type '" + type + "'");
case ANNOTATION_PROCESSOR:
return "annotationProcessor";
case COMPILE:
return "implementation";
case COMPILE_ONLY:
return "compileOnly";
case PROVIDED_RUNTIME:
return "providedRuntime";
case RUNTIME:
return "runtimeOnly";
case TEST_COMPILE:
return "testImplementation";
case TEST_RUNTIME:
return "testRuntimeOnly";
default:
throw new IllegalStateException("Unrecognized dependency type '" + type + "'");
}
}

View File

@@ -264,22 +264,22 @@ public class MavenBuildWriter {
return null;
}
switch (type) {
case ANNOTATION_PROCESSOR:
return null;
case COMPILE:
return null;
case COMPILE_ONLY:
return null;
case PROVIDED_RUNTIME:
return "provided";
case RUNTIME:
return "runtime";
case TEST_COMPILE:
return "test";
case TEST_RUNTIME:
return "test";
default:
throw new IllegalStateException("Unrecognized dependency type '" + type + "'");
case ANNOTATION_PROCESSOR:
return null;
case COMPILE:
return null;
case COMPILE_ONLY:
return null;
case PROVIDED_RUNTIME:
return "provided";
case RUNTIME:
return "runtime";
case TEST_COMPILE:
return "test";
case TEST_RUNTIME:
return "test";
default:
throw new IllegalStateException("Unrecognized dependency type '" + type + "'");
}
}
@@ -613,23 +613,23 @@ public class MavenBuildWriter {
for (int i = 0; i < text.length(); i++) {
char character = text.charAt(i);
switch (character) {
case '\'':
sb.append("&apos;");
break;
case '\"':
sb.append("&quot;");
break;
case '<':
sb.append("&lt;");
break;
case '>':
sb.append("&gt;");
break;
case '&':
sb.append("&amp;");
break;
default:
sb.append(character);
case '\'':
sb.append("&apos;");
break;
case '\"':
sb.append("&quot;");
break;
case '<':
sb.append("&lt;");
break;
case '>':
sb.append("&gt;");
break;
case '&':
sb.append("&amp;");
break;
default:
sb.append(character);
}
}
return sb.toString();

View File

@@ -52,18 +52,18 @@ public final class MetadataBuildItemMapper {
private static DependencyScope toDependencyScope(String scope) {
switch (scope) {
case Dependency.SCOPE_ANNOTATION_PROCESSOR:
return DependencyScope.ANNOTATION_PROCESSOR;
case Dependency.SCOPE_COMPILE:
return DependencyScope.COMPILE;
case Dependency.SCOPE_RUNTIME:
return DependencyScope.RUNTIME;
case Dependency.SCOPE_COMPILE_ONLY:
return DependencyScope.COMPILE_ONLY;
case Dependency.SCOPE_PROVIDED:
return DependencyScope.PROVIDED_RUNTIME;
case Dependency.SCOPE_TEST:
return DependencyScope.TEST_COMPILE;
case Dependency.SCOPE_ANNOTATION_PROCESSOR:
return DependencyScope.ANNOTATION_PROCESSOR;
case Dependency.SCOPE_COMPILE:
return DependencyScope.COMPILE;
case Dependency.SCOPE_RUNTIME:
return DependencyScope.RUNTIME;
case Dependency.SCOPE_COMPILE_ONLY:
return DependencyScope.COMPILE_ONLY;
case Dependency.SCOPE_PROVIDED:
return DependencyScope.PROVIDED_RUNTIME;
case Dependency.SCOPE_TEST:
return DependencyScope.TEST_COMPILE;
}
return null;
}

View File

@@ -156,12 +156,12 @@ public class ProjectMetadataController extends AbstractMetadataController {
private static InitializrMetadataJsonMapper getJsonMapper(InitializrMetadataVersion version) {
switch (version) {
case V2:
return new InitializrMetadataV2JsonMapper();
case V2_1:
return new InitializrMetadataV21JsonMapper();
default:
return new InitializrMetadataV22JsonMapper();
case V2:
return new InitializrMetadataV2JsonMapper();
case V2_1:
return new InitializrMetadataV21JsonMapper();
default:
return new InitializrMetadataV22JsonMapper();
}
}

View File

@@ -239,12 +239,12 @@ public abstract class AbstractInitializrIntegrationTests {
Path archiveFile = writeArchive(content);
Path project = this.folder.resolve("project");
switch (archiveType) {
case ZIP:
unzip(archiveFile, project);
break;
case TGZ:
untar(archiveFile, project);
break;
case ZIP:
unzip(archiveFile, project);
break;
case TGZ:
untar(archiveFile, project);
break;
}
return new ProjectStructure(project);
}

View File

@@ -84,7 +84,7 @@
</property>
</activation>
<properties>
<spring-javaformat.version>0.0.33</spring-javaformat.version>
<spring-javaformat.version>0.0.35</spring-javaformat.version>
<nohttp-checkstyle.version>0.0.10</nohttp-checkstyle.version>
</properties>
<build>