Skip to content

Commit 62f1814

Browse files
committed
Remove [set|with]Property(String, String) variants from MockEnvironment
Since setProperty(String, Object) and withProperty(String, Object) methods were introduced in MockEnvironment in 6.2.8, this commit removes the obsolete variants with (String, String) signatures. See gh-34947 Closes gh-34948
1 parent 6f6e0d4 commit 62f1814

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

spring-test/src/main/java/org/springframework/mock/env/MockEnvironment.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ public void setProperty(String name, Object value) {
5050
this.propertySource.setProperty(name, value);
5151
}
5252

53-
/**
54-
* Set a property on the underlying {@link MockPropertySource} for this environment.
55-
* @see #setProperty(String, Object)
56-
*/
57-
public void setProperty(String name, String value) {
58-
this.propertySource.setProperty(name, value);
59-
}
60-
6153
/**
6254
* Convenient synonym for {@link #setProperty(String, Object)} that returns
6355
* the current instance.
@@ -71,16 +63,4 @@ public MockEnvironment withProperty(String name, Object value) {
7163
return this;
7264
}
7365

74-
/**
75-
* Convenient synonym for {@link #setProperty(String, String)} that returns
76-
* the current instance.
77-
* <p>Useful for method chaining and fluent-style use.
78-
* @return this {@link MockEnvironment} instance
79-
* @see #withProperty(String, Object)
80-
*/
81-
public MockEnvironment withProperty(String name, String value) {
82-
setProperty(name, value);
83-
return this;
84-
}
85-
8666
}

0 commit comments

Comments
 (0)