Skip to content

Commit 4b6b230

Browse files
committed
Merge branch '761-optional-old-password'
2 parents a1133e3 + f292ca6 commit 4b6b230

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ChangeUserPasswordRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import com.fasterxml.jackson.annotation.JsonIgnore;
2020
import com.fasterxml.jackson.annotation.JsonProperty;
21+
import org.cloudfoundry.Nullable;
2122
import org.cloudfoundry.uaa.IdentityZoned;
2223
import org.immutables.value.Value;
2324

@@ -31,6 +32,7 @@ abstract class _ChangeUserPasswordRequest implements IdentityZoned {
3132
* The user's existing password
3233
*/
3334
@JsonProperty("oldPassword")
35+
@Nullable
3436
abstract String getOldPassword();
3537

3638
/**

cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/ChangeUserPasswordRequestTest.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,23 @@
2020

2121
public final class ChangeUserPasswordRequestTest {
2222

23-
@Test(expected = IllegalStateException.class)
24-
public void noOldPassword() {
25-
ChangeUserPasswordRequest.builder()
26-
.password("test-password")
27-
.userId("test-user-id")
28-
.build();
29-
}
30-
3123
@Test(expected = IllegalStateException.class)
3224
public void noPassword() {
3325
ChangeUserPasswordRequest.builder()
34-
.oldPassword("test-old-password")
3526
.userId("test-user-id")
3627
.build();
3728
}
3829

3930
@Test(expected = IllegalStateException.class)
4031
public void noUserId() {
4132
ChangeUserPasswordRequest.builder()
42-
.oldPassword("test-old-password")
4333
.password("test-password")
4434
.build();
4535
}
4636

4737
@Test
4838
public void valid() {
4939
ChangeUserPasswordRequest.builder()
50-
.oldPassword("test-old-password")
5140
.password("test-password")
5241
.userId("test-user-id")
5342
.build();

0 commit comments

Comments
 (0)