Skip to content

Commit

Permalink
fix: Sonar issue [DHIS2-18368]
Browse files Browse the repository at this point in the history
  • Loading branch information
maikelarabori committed Jan 8, 2025
1 parent 3282d23 commit 466f8d8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public class DimensionalObjectUtils {
* dx:FTRrcoaog83;WSGAb5XwJ3Y.QFX1FLWBwtq.R3ShQczKnI9[l8S7SjnQ58G;rexqxNDqUKg], splits into
* FTRrcoaog83 and WSGAb5XwJ3Y.QFX1FLWBwtq.R3ShQczKnI9[l8S7SjnQ58G;rexqxNDqUKg]
*/
private static final String DX_REGEX = ";(?![^\\(\\[]*[\\]\\)])";
private static final Pattern DX_REGEX_PATTERN = Pattern.compile(";(?![^\\(\\[]*[\\]\\)])");

/**
* Matching data element operand, program data element, program attribute, data set reporting rate
Expand Down Expand Up @@ -397,7 +397,7 @@ public static List<String> getDimensionItemsFromParam(String param) {
// Extracts dimension items by removing dimension name and separator
String dimensionItems = param.substring(param.indexOf(DIMENSION_NAME_SEP) + 1);

return Arrays.asList(dimensionItems.split(DX_REGEX));
return Arrays.asList(DX_REGEX_PATTERN.split(dimensionItems));
}

return new ArrayList<>();
Expand Down

0 comments on commit 466f8d8

Please sign in to comment.