Skip to content

Commit

Permalink
increasing flexibility of input parameter processing
Browse files Browse the repository at this point in the history
spaces, empty lines, etc. are now neglected in the processing of the bpolys and showMetadata parameters
  • Loading branch information
kowatsch committed Jun 4, 2018
1 parent 885bf1f commit f559b9b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ else if (DbConnData.igniteDb == null)
}
if (showMetadata == null)
this.showMetadata = false;
else if (showMetadata.equalsIgnoreCase("true") || showMetadata.equalsIgnoreCase("yes"))
else if (showMetadata.replaceAll("\\s","").equalsIgnoreCase("true") || showMetadata.replaceAll("\\s","").equalsIgnoreCase("yes"))
this.showMetadata = true;
else if (showMetadata.equalsIgnoreCase("false") || showMetadata.equals("")
|| showMetadata.equalsIgnoreCase("no"))
else if (showMetadata.replaceAll("\\s","").equalsIgnoreCase("false") || showMetadata.replaceAll("\\s","").equals("")
|| showMetadata.replaceAll("\\s","").equalsIgnoreCase("no"))
this.showMetadata = false;
else
throw new BadRequestException(
Expand Down Expand Up @@ -467,7 +467,7 @@ private void checkBoundaryParams(String bboxes, String bcircles, String bpolys)
boundaryValues = utils.splitBoundaryParam(bcircles, boundary);
} else if (bboxes.isEmpty() && bcircles.isEmpty() && !bpolys.isEmpty()) {
boundary = BoundaryType.BPOLYS;
if (bpolys.startsWith("{")) {
if (bpolys.replaceAll("\\s","").startsWith("{")) {
// geoJson expected
boundaryValues = null;
} else {
Expand Down

0 comments on commit f559b9b

Please sign in to comment.