Polish and fix sonar warnings

This commit is contained in:
Phillip Webb
2013-07-07 16:23:32 -07:00
parent 346a0bace7
commit 9fde0a3715
135 changed files with 1023 additions and 611 deletions

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2012-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.zero.sample.actuator;
import java.io.IOException;
@@ -24,7 +40,6 @@ import org.springframework.security.crypto.codec.Base64;
import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.RestTemplate;
import org.springframework.zero.SpringApplication;
import org.springframework.zero.sample.actuator.SampleActuatorApplication;
import static org.junit.Assert.assertEquals;

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2012-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.zero.sample.actuator;
import java.io.IOException;
@@ -26,7 +42,6 @@ import org.springframework.security.crypto.codec.Base64;
import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.RestTemplate;
import org.springframework.zero.SpringApplication;
import org.springframework.zero.sample.actuator.SampleActuatorApplication;
import static org.junit.Assert.assertEquals;
@@ -39,8 +54,8 @@ public class ManagementAddressSampleActuatorApplicationTests {
private static ConfigurableApplicationContext context;
private static int port = 9000;
private static int managementPort = 9001;
private static int port = 9010;
private static int managementPort = 9011;
@BeforeClass
public static void start() throws Exception {

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2012-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.zero.sample.actuator;
import java.io.IOException;
@@ -17,7 +33,6 @@ import org.springframework.http.client.ClientHttpResponse;
import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.RestTemplate;
import org.springframework.zero.SpringApplication;
import org.springframework.zero.sample.actuator.SampleActuatorApplication;
import static org.junit.Assert.assertEquals;
@@ -25,14 +40,13 @@ import static org.junit.Assert.assertEquals;
* Integration tests for separate management and main service ports.
*
* @author Dave Syer
*
*/
public class ManagementSampleActuatorApplicationTests {
private static ConfigurableApplicationContext context;
private static int port = 9000;
private static int managementPort = 9001;
private static int port = 9010;
private static int managementPort = 9011;
@BeforeClass
public static void start() throws Exception {

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2012-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.zero.sample.actuator;
import java.io.IOException;
@@ -26,7 +42,6 @@ import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.ResourceAccessException;
import org.springframework.web.client.RestTemplate;
import org.springframework.zero.SpringApplication;
import org.springframework.zero.sample.actuator.SampleActuatorApplication;
import static org.junit.Assert.assertEquals;
@@ -34,7 +49,6 @@ import static org.junit.Assert.assertEquals;
* Integration tests for switching off management endpoints.
*
* @author Dave Syer
*
*/
public class NoManagementSampleActuatorApplicationTests {

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2012-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.zero.sample.actuator;
import java.io.IOException;
@@ -25,7 +41,6 @@ import org.springframework.security.crypto.codec.Base64;
import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.RestTemplate;
import org.springframework.zero.SpringApplication;
import org.springframework.zero.sample.actuator.SampleActuatorApplication;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -35,7 +50,6 @@ import static org.junit.Assert.assertTrue;
* Basic integration tests for service demo application.
*
* @author Dave Syer
*
*/
public class SampleActuatorApplicationTests {

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2012-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.zero.sample.actuator;
import java.io.IOException;
@@ -25,7 +41,6 @@ import org.springframework.security.crypto.codec.Base64;
import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.RestTemplate;
import org.springframework.zero.SpringApplication;
import org.springframework.zero.sample.actuator.SampleActuatorApplication;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -34,7 +49,6 @@ import static org.junit.Assert.assertTrue;
* Integration tests for separate management and main service ports.
*
* @author Dave Syer
*
*/
public class ShutdownSampleActuatorApplicationTests {

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2012-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.zero.sample.actuator;
import java.io.IOException;