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:
kohsuke committed 2007-09-16 00:34:48 +00:00
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();
}
}
}