Remove formatter-on/off comments
This commit is contained in:
@@ -10,12 +10,10 @@ public enum ProjectStatus {
|
||||
|
||||
@JsonCreator
|
||||
public static ProjectStatus fromName(String name) {
|
||||
// @formatter:off
|
||||
return Arrays.stream(ProjectStatus.values())
|
||||
.filter(type -> type.name().equals(name))
|
||||
.findFirst()
|
||||
.orElse(ProjectStatus.ACTIVE);
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,12 +10,10 @@ public enum ReleaseStatus {
|
||||
|
||||
@JsonCreator
|
||||
public static ReleaseStatus fromName(String name) {
|
||||
// @formatter:off
|
||||
return Arrays.stream(ReleaseStatus.values())
|
||||
.filter(type -> type.name().equals(name))
|
||||
.findFirst()
|
||||
.orElse(ReleaseStatus.GENERAL_AVAILABILITY);
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,13 +17,9 @@ import org.springframework.web.client.RestTemplate;
|
||||
@Component
|
||||
public class SpringProjectsClient {
|
||||
|
||||
// @formatter:off
|
||||
|
||||
private static final TypeReferences.CollectionModelType<Release> releaseCollection =
|
||||
new TypeReferences.CollectionModelType<Release>() {};
|
||||
|
||||
// @formatter:on
|
||||
|
||||
private final Traverson traverson;
|
||||
|
||||
public SpringProjectsClient(RestTemplateBuilder builder) {
|
||||
@@ -34,11 +30,9 @@ public class SpringProjectsClient {
|
||||
}
|
||||
|
||||
public Project fetchProject(String projectSlug) {
|
||||
// @formatter:off
|
||||
return this.traverson.follow("projects")
|
||||
.follow(Hop.rel("project").withParameter("id", projectSlug))
|
||||
.toObject(Project.class);
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
public List<Release> fetchProjectReleases(String projectSlug) {
|
||||
|
||||
@@ -18,12 +18,10 @@ public class ArtifactRepositoriesInitializer implements ApplicationRunner {
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
// @formatter:off
|
||||
List<ArtifactRepository> repositoryList = Arrays.asList(
|
||||
new ArtifactRepository("spring-releases", "Spring Releases", "https://repo.spring.io/libs-releases"),
|
||||
new ArtifactRepository("spring-milestones", "Spring Milestones", "https://repo.spring.io/libs-milestones"),
|
||||
new ArtifactRepository("spring-snapshots", "Spring Snapshots", "https://repo.spring.io/libs-snapshots"));
|
||||
// @formatter:on
|
||||
repositories.saveAll(repositoryList);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@ import org.springframework.test.web.servlet.MockMvc;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
// @formatter:off
|
||||
|
||||
/**
|
||||
* GraphQL requests via {@link GraphQlTester} connecting to {@link MockMvc}.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user