Details
-
Bug
-
Status: Closed
-
Should
-
Resolution: Fixed
-
None
-
None
Description
SpotBugs spotted a bug in class org.openmrs.module.webservices.rest.OpenmrsPathMatcher
Bug : There is an apparent infinite recursive loop in org.openmrs.module.webservices.rest.OpenmrsPathMatcher.matchStart(String, String)
This method unconditionally invokes itself. This would seem to indicate an infinite recursive loop that will result in a stack overflow.
Rank : Scary (9), confidence : High *Pattern : IL_INFINITE_RECURSIVE_LOOP * Type : IL, Category : CORRECTNESS (Correctness)
The method
{{}}
public boolean matchStart(String pattern, String path) {
{{ return this.matchStart(pattern, path);}}
{{ }}}
should be
public boolean matchStart(String pattern, String path) {
{{ return this.}}delegate{{.matchStart(pattern, path); }}
{{ }}}
{{ }}
Sorry, I can't figure out which component to choose but the class lives in
<artifactId>webservices.rest-omod-common</artifactId> <packaging>jar</packaging> <name>Rest Web Services Common OMOD</name> <description>OpenMRS module project for Rest Web Services</description>
The parent is
<parent> <groupId>org.openmrs.module</groupId> <artifactId>webservices.rest</artifactId> <version>2.26.0-SNAPSHOT</version> </parent>
{{ }}