Skip to content

Commit 3f61ce5

Browse files
committed
---
yaml --- r: 27659 b: refs/heads/allowcolonsinids c: 5a44af8 h: refs/heads/master i: 27657: 1df2b32 27655: d598669
1 parent 4b1f0de commit 3f61ce5

3 files changed

Lines changed: 2 additions & 7 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,4 @@ refs/heads/unignorekmstest: 6ff8941f200b6150202b2ffa8df78c1b3f43707e
193193
refs/tags/v0.85.0: dd1c4125c845f8f309f62f02940b738f11b1d8c2
194194
refs/tags/v0.86.0: adbfc3b9e67b06058e3caa5aaa4897079102d2be
195195
refs/tags/v0.87.0: 32837d5fc5563a2a10a1f11b054f0ea44a18df04
196-
refs/heads/allowcolonsinids: ac0084f2e5700a4c38c7087f1c41a9bbad8de027
196+
refs/heads/allowcolonsinids: 5a44af8de49d149f471a7e4ffcb19e30a0e815b1

branches/allowcolonsinids/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/Identity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public String strValue() {
255255
* policy identities to {@code Identity} objects.
256256
*/
257257
public static Identity valueOf(String identityStr) {
258-
String[] info = identityStr.split(":");
258+
String[] info = identityStr.split(":", 2);
259259
Type type = Type.valueOf(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, info[0]));
260260
if (info.length == 1) {
261261
return new Identity(type, null);

branches/allowcolonsinids/google-cloud-clients/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ public void testValueOfEmpty() {
141141
Identity.valueOf("");
142142
}
143143

144-
@Test(expected = IllegalArgumentException.class)
145-
public void testValueOfThreePart() {
146-
Identity.valueOf("a:b:c");
147-
}
148-
149144
@Test
150145
public void testUnrecognizedToString() {
151146
assertEquals("a:b", Identity.valueOf("a:b").strValue());

0 commit comments

Comments
 (0)