File tree Expand file tree Collapse file tree
sdk-platform-java/api-common-java/src/main/java/com/google/api/pathtemplate Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ public String getCanonicalResourceName(Set<String> knownResources) {
414414 }
415415
416416 List <Segment > canonicalSegments = segments .subList (startIndex , lastValidEndBindingIndex + 1 );
417- return toSyntax (canonicalSegments , true );
417+ return toSyntax (canonicalSegments , true ). replace ( "=*}" , "}" ) ;
418418 }
419419
420420 /**
@@ -1118,9 +1118,6 @@ private static ImmutableList<Segment> parseTemplate(String template) {
11181118 }
11191119
11201120 private static boolean isSegmentBeginOrEndInvalid (String seg ) {
1121- if (seg .isEmpty ()) {
1122- return false ;
1123- }
11241121 // A segment is invalid if it contains only one character and the character is a delimiter
11251122 if (seg .length () == 1 && COMPLEX_DELIMITER_PATTERN .matcher (seg ).find ()) {
11261123 return true ;
@@ -1243,7 +1240,7 @@ private String decodeUrl(String url) {
12431240 // the list iterator in its state.
12441241 private static boolean peek (ListIterator <Segment > segments , SegmentKind ... kinds ) {
12451242 int start = segments .nextIndex ();
1246- boolean success = true ;
1243+ boolean success = false ;
12471244 for (SegmentKind kind : kinds ) {
12481245 if (!segments .hasNext () || segments .next ().kind () != kind ) {
12491246 success = false ;
You can’t perform that action at this time.
0 commit comments