diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/RepositoryConfigurationFactory.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/RepositoryConfigurationFactory.java
index 6d1458d3e5d..9f3892a21c9 100644
--- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/RepositoryConfigurationFactory.java
+++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/RepositoryConfigurationFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2014 the original author or authors.
+ * Copyright 2012-2015 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.
diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/DefaultRepositorySystemSessionAutoConfiguration.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/DefaultRepositorySystemSessionAutoConfiguration.java
index d1bfda16fbc..3393b92a73b 100644
--- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/DefaultRepositorySystemSessionAutoConfiguration.java
+++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/DefaultRepositorySystemSessionAutoConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2014 the original author or authors.
+ * Copyright 2012-2015 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.
diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfiguration.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfiguration.java
index 895868b9ffa..877580100a6 100644
--- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfiguration.java
+++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2014 the original author or authors.
+ * Copyright 2012-2015 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.
diff --git a/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfigurationTests.java b/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfigurationTests.java
index 5dbf1cdfd87..2c237893586 100644
--- a/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfigurationTests.java
+++ b/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfigurationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2014 the original author or authors.
+ * Copyright 2012-2015 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.
diff --git a/spring-boot-cli/src/test/resources/maven-settings/property-interpolation/.m2/settings.xml b/spring-boot-cli/src/test/resources/maven-settings/property-interpolation/.m2/settings.xml
index 998223e5f79..873642e6dd8 100644
--- a/spring-boot-cli/src/test/resources/maven-settings/property-interpolation/.m2/settings.xml
+++ b/spring-boot-cli/src/test/resources/maven-settings/property-interpolation/.m2/settings.xml
@@ -2,7 +2,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
-
+
${foo}/repository
-
\ No newline at end of file
+
diff --git a/spring-boot/src/main/java/org/springframework/boot/test/EnvironmentTestUtils.java b/spring-boot/src/main/java/org/springframework/boot/test/EnvironmentTestUtils.java
index 0af85d0cb1c..a5004fc2356 100644
--- a/spring-boot/src/main/java/org/springframework/boot/test/EnvironmentTestUtils.java
+++ b/spring-boot/src/main/java/org/springframework/boot/test/EnvironmentTestUtils.java
@@ -92,12 +92,11 @@ public abstract class EnvironmentTestUtils {
int equalIndex = pair.indexOf("=");
if (colonIndex == -1) {
return equalIndex;
- } else if (equalIndex == -1) {
- return colonIndex;
}
- else {
- return Math.min(colonIndex, equalIndex);
+ if (equalIndex == -1) {
+ return colonIndex;
}
+ return Math.min(colonIndex, equalIndex);
}
}
diff --git a/spring-boot/src/test/java/org/springframework/boot/test/EnvironmentTestUtilsTests.java b/spring-boot/src/test/java/org/springframework/boot/test/EnvironmentTestUtilsTests.java
index c44d0605cda..3bb8bcd05ef 100644
--- a/spring-boot/src/test/java/org/springframework/boot/test/EnvironmentTestUtilsTests.java
+++ b/spring-boot/src/test/java/org/springframework/boot/test/EnvironmentTestUtilsTests.java
@@ -20,7 +20,6 @@ import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
-
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.MapPropertySource;
import org.springframework.core.env.StandardEnvironment;
@@ -71,16 +70,18 @@ public class EnvironmentTestUtilsTests {
@Test
public void addPairNoValue() {
String propertyName = "my.foo+bar";
- assertFalse(environment.containsProperty(propertyName));
- EnvironmentTestUtils.addEnvironment(environment, propertyName);
- assertTrue(environment.containsProperty(propertyName));
- assertEquals("", environment.getProperty(propertyName));
+ assertFalse(this.environment.containsProperty(propertyName));
+ EnvironmentTestUtils.addEnvironment(this.environment, propertyName);
+ assertTrue(this.environment.containsProperty(propertyName));
+ assertEquals("", this.environment.getProperty(propertyName));
}
private void testAddSimplePair(String key, String value, String delimiter) {
- assertFalse("Property '" + key + "' should not exist", environment.containsProperty(key));
- EnvironmentTestUtils.addEnvironment(environment, key + delimiter + value);
- assertEquals("Wrong value for property '" + key + "'", value, environment.getProperty(key));
+ assertFalse("Property '" + key + "' should not exist",
+ this.environment.containsProperty(key));
+ EnvironmentTestUtils.addEnvironment(this.environment, key + delimiter + value);
+ assertEquals("Wrong value for property '" + key + "'", value,
+ this.environment.getProperty(key));
}
@Test
@@ -88,10 +89,10 @@ public class EnvironmentTestUtilsTests {
Map map = new HashMap();
map.put("my.foo", "bar");
MapPropertySource source = new MapPropertySource("sample", map);
- environment.getPropertySources().addFirst(source);
- assertEquals("bar", environment.getProperty("my.foo"));
- EnvironmentTestUtils.addEnvironment(environment, "my.foo=bar2");
- assertEquals("bar2", environment.getProperty("my.foo"));
+ this.environment.getPropertySources().addFirst(source);
+ assertEquals("bar", this.environment.getProperty("my.foo"));
+ EnvironmentTestUtils.addEnvironment(this.environment, "my.foo=bar2");
+ assertEquals("bar2", this.environment.getProperty("my.foo"));
}
}