Skip to content
Permalink
Browse files

Merge pull request #905 from Vlatombe/fixIncludeRegexListView

[JENKINS-19082] Fix ListView includeRegex
  • Loading branch information
olivergondza committed Aug 12, 2013
2 parents 3d9745c + 47fde3b commit 17240f43475dff37c0ecfe62d2e3822656e534bb
Showing with 5 additions and 10 deletions.
  1. +5 −10 core/src/main/java/hudson/model/ListView.java
@@ -329,7 +329,7 @@ protected void submit(StaplerRequest req) throws ServletException, FormException
}
}

setIncludeRegex(req.getParameter("useincluderegex"));
setIncludeRegex(req.getParameter("useincluderegex") != null ? req.getParameter("includeRegex") : null);

if (columns == null) {
columns = new DescribableList<ListViewColumn,Descriptor<ListViewColumn>>(this);
@@ -346,16 +346,11 @@ protected void submit(StaplerRequest req) throws ServletException, FormException
}

public void setIncludeRegex(String includeRegex) {
if (includeRegex != null) {
this.includeRegex = Util.nullify(includeRegex);
if (this.includeRegex == null)
this.includePattern = null;
else
this.includePattern = Pattern.compile(includeRegex);
} else {
this.includeRegex = null;
this.includeRegex = Util.nullify(includeRegex);
if (this.includeRegex == null)
this.includePattern = null;
}
else
this.includePattern = Pattern.compile(includeRegex);
}

@Extension

0 comments on commit 17240f4

Please sign in to comment.
You can’t perform that action at this time.