4040package org .glassfish .jersey .uri ;
4141
4242import java .util .Comparator ;
43- import java .util .regex .MatchResult ;
4443
4544/**
4645 * A path pattern that is a regular expression generated from a URI path
@@ -65,11 +64,11 @@ public final class PathPattern extends PatternWithGroups {
6564 * Path pattern matching the end of a URI path. Can be either empty {@code ""}
6665 * or contain a trailing slash {@code "/"}.
6766 */
68- public static final PathPattern END_OF_PATH_PATTERN = new PathPattern ("" , PathPattern .RightHandPath .capturingZeroSegments );
67+ public static final PathPattern END_OF_PATH_PATTERN = new PathPattern ("" , PathPattern .RightHandPath .capturingZeroSegments );
6968 /**
7069 * Path pattern matching the any URI path.
7170 */
72- public static final PathPattern OPEN_ROOT_PATH_PATTERN = new PathPattern ("" , RightHandPath .capturingZeroOrMoreSegments );
71+ public static final PathPattern OPEN_ROOT_PATH_PATTERN = new PathPattern ("" , RightHandPath .capturingZeroOrMoreSegments );
7372 /**
7473 * Path pattern comparator that defers to {@link UriTemplate#COMPARATOR comparing
7574 * the templates} associated with the patterns.
@@ -120,6 +119,7 @@ private String getRegex() {
120119 public static PathPattern asClosed (PathPattern pattern ) {
121120 return new PathPattern (pattern .getTemplate ().getTemplate (), RightHandPath .capturingZeroSegments );
122121 }
122+
123123 //
124124 private final UriTemplate template ;
125125
@@ -133,7 +133,6 @@ private PathPattern() {
133133 * {@link RightHandPath#capturingZeroOrMoreSegments}.
134134 *
135135 * @param template the path template.
136- *
137136 * @see #PathPattern(String, PathPattern.RightHandPath)
138137 */
139138 public PathPattern (String template ) {
@@ -145,7 +144,6 @@ public PathPattern(String template) {
145144 * {@link RightHandPath#capturingZeroOrMoreSegments}.
146145 *
147146 * @param template the path template
148- *
149147 * @see #PathPattern(PathTemplate, PathPattern.RightHandPath)
150148 */
151149 public PathPattern (PathTemplate template ) {
@@ -159,7 +157,7 @@ public PathPattern(PathTemplate template) {
159157 * Create a path pattern and post fix with a right hand path pattern.
160158 *
161159 * @param template the path template.
162- * @param rhpp the right hand path pattern postfix.
160+ * @param rhpp the right hand path pattern postfix.
163161 */
164162 public PathPattern (String template , RightHandPath rhpp ) {
165163 this (new PathTemplate (template ), rhpp );
@@ -169,7 +167,7 @@ public PathPattern(String template, RightHandPath rhpp) {
169167 * Create a path pattern and post fix with a right hand path pattern.
170168 *
171169 * @param template the path template.
172- * @param rhpp the right hand path pattern postfix.
170+ * @param rhpp the right hand path pattern postfix.
173171 */
174172 public PathPattern (PathTemplate template , RightHandPath rhpp ) {
175173 super (postfixWithCapturingGroup (template .getPattern ().getRegex (), rhpp ),
@@ -194,15 +192,15 @@ private static String postfixWithCapturingGroup(String regex, RightHandPath rhpp
194192 return regex + rhpp .getRegex ();
195193 }
196194
197- private static int [] addIndexForRightHandPathCapturingGroup (int numberOfGroups , int [] indexes ) {
195+ private static int [] addIndexForRightHandPathCapturingGroup (int numberOfGroups , int [] indexes ) {
198196 if (indexes .length == 0 ) {
199197 return indexes ;
200198 }
201-
199+
202200 int [] cgIndexes = new int [indexes .length + 1 ];
203201 System .arraycopy (indexes , 0 , cgIndexes , 0 , indexes .length );
204202
205- cgIndexes [indexes .length ] = numberOfGroups +1 ;
203+ cgIndexes [indexes .length ] = numberOfGroups + 1 ;
206204 return cgIndexes ;
207205 }
208206}
0 commit comments