mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-03 20:15:52 +01:00
fix potential bugs, detected by findbugs and pmd
This commit is contained in:
@@ -275,11 +275,15 @@ public class GitReceiveHook implements PreReceiveHook, PostReceiveHook
|
||||
scriptName = FILE_HOOK_PRE_RECEIVE;
|
||||
}
|
||||
|
||||
File hookScript = getHookScript(directory, scriptName);
|
||||
|
||||
if (hookScript != null)
|
||||
if (scriptName != null)
|
||||
{
|
||||
executeFileHook(rpack, rc, hookScript, oldId, newId, rc.getRefName());
|
||||
File hookScript = getHookScript(directory, scriptName);
|
||||
|
||||
if (hookScript != null)
|
||||
{
|
||||
executeFileHook(rpack, rc, hookScript, oldId, newId,
|
||||
rc.getRefName());
|
||||
}
|
||||
}
|
||||
|
||||
fireHookEvent(rpack, rc, directory, oldId, newId, type);
|
||||
|
||||
Reference in New Issue
Block a user