mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
Fixed NPE in case the query parameter is not supplied.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6092 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
5e821174a3
commit
4e9c6a83ad
1 file changed
+7
-5
@@ -35,11 +35,13 @@ public class Search {
|
||||
|
||||
SearchIndex index = smo.getSearchIndex();
|
||||
String query = req.getParameter("q");
|
||||
SuggestedItem target = find(index, query);
|
||||
if(target!=null) {
|
||||
// found
|
||||
rsp.sendRedirect2(a.getUrl()+target.getUrl());
|
||||
return;
|
||||
if(query!=null) {
|
||||
SuggestedItem target = find(index, query);
|
||||
if(target!=null) {
|
||||
// found
|
||||
rsp.sendRedirect2(a.getUrl()+target.getUrl());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user