From c51c340881e907e34516249851c6b0988b495aa7 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Fri, 6 May 2011 18:57:41 +0000 Subject: [PATCH] Update MockEnvironment / MockPropertySource types Reflecting signature changes in getProperty() methods --- .../java/org/springframework/mock/env/MockEnvironment.java | 1 + .../java/org/springframework/mock/env/MockPropertySource.java | 4 ++-- .../java/org/springframework/mock/env/MockPropertySource.java | 4 ++-- .../java/org/springframework/mock/env/MockPropertySource.java | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/org.springframework.context/src/test/java/org/springframework/mock/env/MockEnvironment.java b/org.springframework.context/src/test/java/org/springframework/mock/env/MockEnvironment.java index e8f55721c2..0ad1a200c6 100644 --- a/org.springframework.context/src/test/java/org/springframework/mock/env/MockEnvironment.java +++ b/org.springframework.context/src/test/java/org/springframework/mock/env/MockEnvironment.java @@ -56,4 +56,5 @@ public class MockEnvironment extends AbstractEnvironment { this.setProperty(key, value); return this; } + } diff --git a/org.springframework.core/src/test/java/org/springframework/mock/env/MockPropertySource.java b/org.springframework.core/src/test/java/org/springframework/mock/env/MockPropertySource.java index 14f239e848..45f8b61ad7 100644 --- a/org.springframework.core/src/test/java/org/springframework/mock/env/MockPropertySource.java +++ b/org.springframework.core/src/test/java/org/springframework/mock/env/MockPropertySource.java @@ -87,7 +87,7 @@ public class MockPropertySource extends PropertiesPropertySource { /** * Set the given property on the underlying {@link Properties} object. */ - public void setProperty(String key, String value) { + public void setProperty(String key, Object value) { this.source.put(key, value); } @@ -96,7 +96,7 @@ public class MockPropertySource extends PropertiesPropertySource { * Useful for method chaining and fluent-style use. * @return this {@link MockPropertySource} instance */ - public MockPropertySource withProperty(String key, String value) { + public MockPropertySource withProperty(String key, Object value) { this.setProperty(key, value); return this; } diff --git a/org.springframework.expression/src/test/java/org/springframework/mock/env/MockPropertySource.java b/org.springframework.expression/src/test/java/org/springframework/mock/env/MockPropertySource.java index 458cb188ff..f303eca546 100644 --- a/org.springframework.expression/src/test/java/org/springframework/mock/env/MockPropertySource.java +++ b/org.springframework.expression/src/test/java/org/springframework/mock/env/MockPropertySource.java @@ -86,7 +86,7 @@ public class MockPropertySource extends PropertiesPropertySource { /** * Set the given property on the underlying {@link Properties} object. */ - public void setProperty(String key, String value) { + public void setProperty(String key, Object value) { this.source.put(key, value); } @@ -95,7 +95,7 @@ public class MockPropertySource extends PropertiesPropertySource { * Useful for method chaining and fluent-style use. * @return this {@link MockPropertySource} instance */ - public MockPropertySource withProperty(String key, String value) { + public MockPropertySource withProperty(String key, Object value) { this.setProperty(key, value); return this; } diff --git a/org.springframework.test/src/main/java/org/springframework/mock/env/MockPropertySource.java b/org.springframework.test/src/main/java/org/springframework/mock/env/MockPropertySource.java index 14f239e848..45f8b61ad7 100644 --- a/org.springframework.test/src/main/java/org/springframework/mock/env/MockPropertySource.java +++ b/org.springframework.test/src/main/java/org/springframework/mock/env/MockPropertySource.java @@ -87,7 +87,7 @@ public class MockPropertySource extends PropertiesPropertySource { /** * Set the given property on the underlying {@link Properties} object. */ - public void setProperty(String key, String value) { + public void setProperty(String key, Object value) { this.source.put(key, value); } @@ -96,7 +96,7 @@ public class MockPropertySource extends PropertiesPropertySource { * Useful for method chaining and fluent-style use. * @return this {@link MockPropertySource} instance */ - public MockPropertySource withProperty(String key, String value) { + public MockPropertySource withProperty(String key, Object value) { this.setProperty(key, value); return this; }