Skip to main content
added 38 characters in body
Source Link
janos
  • 111.7k
  • 15
  • 152
  • 391

A few minor points on top of Vogel's:

  • It seems PostController postController can be final
  • Instead of using request.getRequestURI() (the entire URL) and Matcher.find(), you could use request.getContextPath() (just the path part) and Matcher.matches(). The pattern matching logic would be slightly simpler that way, and you could drop the $ from the end of the patterns

A few minor points on top of Vogel's:

  • It seems PostController postController can be final
  • Instead of using request.getRequestURI() and Matcher.find(), you could use request.getContextPath() and Matcher.matches(). The pattern matching logic would be slightly simpler that way, and you could drop the $ from the end of the patterns

A few minor points on top of Vogel's:

  • It seems PostController postController can be final
  • Instead of using request.getRequestURI() (the entire URL) and Matcher.find(), you could use request.getContextPath() (just the path part) and Matcher.matches(). The pattern matching logic would be slightly simpler that way, and you could drop the $ from the end of the patterns
added 107 characters in body
Source Link
janos
  • 111.7k
  • 15
  • 152
  • 391

A few minor points on top of Vogel's:

  • It seems PostController postController can be final
  • Instead of using request.getRequestURI() and Matcher.find(), usingyou could use request.getContextPath() and Matcher.matches(). The pattern matching logic would be more explicit. Youslightly simpler that way, and you could also drop the $ from the end of yourthe patterns

A few minor points on top of Vogel's:

  • It seems PostController postController can be final
  • Instead of using Matcher.find(), using Matcher.matches() would be more explicit. You could also drop the $ from the end of your patterns

A few minor points on top of Vogel's:

  • It seems PostController postController can be final
  • Instead of using request.getRequestURI() and Matcher.find(), you could use request.getContextPath() and Matcher.matches(). The pattern matching logic would be slightly simpler that way, and you could drop the $ from the end of the patterns
Source Link
janos
  • 111.7k
  • 15
  • 152
  • 391

A few minor points on top of Vogel's:

  • It seems PostController postController can be final
  • Instead of using Matcher.find(), using Matcher.matches() would be more explicit. You could also drop the $ from the end of your patterns