Skip to content

Commit

Permalink
#878 and #1121 fixed an NPE introduced by the latest bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanrauh committed May 18, 2020
1 parent 166e233 commit be5d415
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/net/bootsfaces/component/dataTable/DataTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,14 @@ public void queueEvent(FacesEvent event) {
String typeOfSelection = (String) context.getExternalContext().getRequestParameterMap().get("typeOfSelection");
context.getELContext().getELResolver().setValue(context.getELContext(), null, "typeOfSelection", typeOfSelection);

//https://datatables.net/reference/event/deselect#Description
// https://datatables.net/reference/event/deselect#Description
// split the array of indexes
List<Integer> indexList = new ArrayList<>();
Matcher regexMatcher = Pattern.compile("(\\d+)").matcher(indexes);
while (regexMatcher.find()) {
indexList.add(Integer.valueOf(regexMatcher.group()));
if (null != indexes) {
Matcher regexMatcher = Pattern.compile("(\\d+)").matcher(indexes);
if (regexMatcher.find()) {
indexList.add(Integer.valueOf(regexMatcher.group()));
}
}

if (indexList.size() > 0) {
Expand Down

0 comments on commit be5d415

Please sign in to comment.