From 097104584cb29185b953767b4541111b8ab62763 Mon Sep 17 00:00:00 2001 From: Andrey Kolchanov Date: Fri, 1 Jan 2021 17:15:38 +0300 Subject: [PATCH 1/2] Remove unnecessary semicolon See gh-24628 --- spring-boot-project/spring-boot-cli/samples/http.groovy | 4 ++-- .../spring-boot-cli/samples/integration.groovy | 4 ++-- spring-boot-project/spring-boot-cli/samples/template.groovy | 2 +- spring-boot-project/spring-boot-cli/samples/ui.groovy | 2 +- spring-boot-project/spring-boot-cli/samples/web.groovy | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-boot-project/spring-boot-cli/samples/http.groovy b/spring-boot-project/spring-boot-cli/samples/http.groovy index af87329fda65..6a2d553affb4 100644 --- a/spring-boot-project/spring-boot-cli/samples/http.groovy +++ b/spring-boot-project/spring-boot-cli/samples/http.groovy @@ -7,7 +7,7 @@ import groovyx.net.http.* class Example implements CommandLineRunner { @Autowired - ApplicationContext context; + ApplicationContext context @RequestMapping("/") @ResponseBody @@ -16,7 +16,7 @@ class Example implements CommandLineRunner { } void run(String... args) { - def port = context.webServer.port; + def port = context.webServer.port def world = new RESTClient("http://localhost:" + port).get(path:"/").data.text print "Hello " + world } diff --git a/spring-boot-project/spring-boot-cli/samples/integration.groovy b/spring-boot-project/spring-boot-cli/samples/integration.groovy index 8c361ba7daac..62a54dd73f25 100644 --- a/spring-boot-project/spring-boot-cli/samples/integration.groovy +++ b/spring-boot-project/spring-boot-cli/samples/integration.groovy @@ -5,11 +5,11 @@ package org.test class SpringIntegrationExample implements CommandLineRunner { @Autowired - private ApplicationContext context; + private ApplicationContext context @Bean DirectChannel input() { - new DirectChannel(); + new DirectChannel() } @Override diff --git a/spring-boot-project/spring-boot-cli/samples/template.groovy b/spring-boot-project/spring-boot-cli/samples/template.groovy index b23bee101027..95f8b134bc1e 100644 --- a/spring-boot-project/spring-boot-cli/samples/template.groovy +++ b/spring-boot-project/spring-boot-cli/samples/template.groovy @@ -1,6 +1,6 @@ package org.test -import static org.springframework.boot.groovy.GroovyTemplate.*; +import static org.springframework.boot.groovy.GroovyTemplate.* @Component class Example implements CommandLineRunner { diff --git a/spring-boot-project/spring-boot-cli/samples/ui.groovy b/spring-boot-project/spring-boot-cli/samples/ui.groovy index b76f82d47241..a13a2775a9de 100644 --- a/spring-boot-project/spring-boot-cli/samples/ui.groovy +++ b/spring-boot-project/spring-boot-cli/samples/ui.groovy @@ -7,7 +7,7 @@ class Example { @RequestMapping("/") public String helloWorld(Map model) { model.putAll([title: "My Page", date: new Date(), message: "Hello World"]) - return "home"; + return "home" } } diff --git a/spring-boot-project/spring-boot-cli/samples/web.groovy b/spring-boot-project/spring-boot-cli/samples/web.groovy index b7f2df26980e..4af8649eec69 100644 --- a/spring-boot-project/spring-boot-cli/samples/web.groovy +++ b/spring-boot-project/spring-boot-cli/samples/web.groovy @@ -2,12 +2,12 @@ class Example { @Autowired - private MyService myService; + private MyService myService @RequestMapping("/") @ResponseBody public String helloWorld() { - return myService.sayWorld(); + return myService.sayWorld() } } @@ -16,6 +16,6 @@ class Example { class MyService { public String sayWorld() { - return "World!"; + return "World!" } } From f33c7bc27cd51877cf6760c0716e494b3d6efafe Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 5 Jan 2021 08:24:03 +0100 Subject: [PATCH 2/2] Polish "Remove unnecessary semicolon" See gh-24628 --- .../src/test/resources/classloader-test-app.groovy | 2 +- .../spring-boot-cli/src/test/resources/scripts/command.groovy | 2 +- .../spring-boot-cli/test-samples/integration_auto.groovy | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-cli/src/test/resources/classloader-test-app.groovy b/spring-boot-project/spring-boot-cli/src/test/resources/classloader-test-app.groovy index 96e002a9539f..bda31459b4f7 100644 --- a/spring-boot-project/spring-boot-cli/src/test/resources/classloader-test-app.groovy +++ b/spring-boot-project/spring-boot-cli/src/test/resources/classloader-test-app.groovy @@ -6,7 +6,7 @@ public class Test implements CommandLineRunner { public void run(String... args) throws Exception { println "HasClasses-" + ClassUtils.isPresent("missing", null) + "-" + ClassUtils.isPresent("org.springframework.boot.SpringApplication", null) + "-" + - ClassUtils.isPresent(args[0], null); + ClassUtils.isPresent(args[0], null) } } diff --git a/spring-boot-project/spring-boot-cli/src/test/resources/scripts/command.groovy b/spring-boot-project/spring-boot-cli/src/test/resources/scripts/command.groovy index 06de6fd38a42..3479910984f3 100644 --- a/spring-boot-project/spring-boot-cli/src/test/resources/scripts/command.groovy +++ b/spring-boot-project/spring-boot-cli/src/test/resources/scripts/command.groovy @@ -16,7 +16,7 @@ package org.test.command -import java.util.Collection; +import java.util.Collection class TestCommand implements Command { diff --git a/spring-boot-project/spring-boot-cli/test-samples/integration_auto.groovy b/spring-boot-project/spring-boot-cli/test-samples/integration_auto.groovy index b6a7d2ba8a44..f05b9639e824 100644 --- a/spring-boot-project/spring-boot-cli/test-samples/integration_auto.groovy +++ b/spring-boot-project/spring-boot-cli/test-samples/integration_auto.groovy @@ -5,7 +5,7 @@ package com.example class RestTests { @Autowired - TestRestTemplate testRestTemplate; + TestRestTemplate testRestTemplate @Test void testHome() {