mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 14:02:22 +00:00
added hook for derived types.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4766 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
8333064579
commit
f1e701ecf4
1 file changed
+10
-2
@@ -269,8 +269,9 @@ public abstract class FormFieldValidator {
|
||||
|
||||
if(exe.indexOf(File.separatorChar)>=0) {
|
||||
// this is full path
|
||||
if(new File(exe).exists()) {
|
||||
ok();
|
||||
File f = new File(exe);
|
||||
if(f.exists()) {
|
||||
checkExecutable(f);
|
||||
} else {
|
||||
error("There's no such file: "+exe);
|
||||
}
|
||||
@@ -279,5 +280,12 @@ public abstract class FormFieldValidator {
|
||||
ok();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides an opportunity for derived classes to do additional checks on the executable.
|
||||
*/
|
||||
protected void checkExecutable(File exe) throws IOException, ServletException {
|
||||
ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user