package org.jenkins.tools.test.model.hook;

import hudson.model.UpdateSite.Plugin;
//import org.jenkins.tools.test.model.TestExecutionResult;

import java.util.Map;

/**
 * An abstract class that marks a hook that runs before the checkout stage of the
 * Plugins Compat Tester.
 *
 * This exists simply for the ability to check when a subclass should be implemented.
 */
public abstract class PluginCompatTesterHookBeforeCheckout implements PluginCompatTesterHook {
    /**
     * Check the:
     *  + executionResult - if set, the required result of this execution
     *  + runCheckout - if the plugin should be checked out again
     *  + pluginDir - if set, the location of the plugin directory
     */
    public void validate(Map<String, Object> toCheck) throws Exception {
        /*if((toCheck.get("executionResult") != null && 
            toCheck.get("executionResult") instanceof TestExecutionResult) &&
            (toCheck.get("runCheckout") != null &&
            toCheck.get("runCheckout")) &&
            (toCheck.get("pluginDir") != null && 
            toCheck.get("pluginDir") instanceof String) ) {
                throw new IllegalArgumentException("A hook modified a required parameter for plugin checkout.");
        }*/
    } 
}
@@ -48,97 +48,42 @@
 ort 
-hudson.model.UpdateSite.Plugin;%0A//import org.jenkins.tools.test.model.TestExecutionResult
+org.apache.commons.lang.ClassUtils
 ;%0A%0Ai
@@ -503,16 +503,45 @@
 xecution
+ (CANNOT CHECK IN THIS CLASS)
 %0A     * 
@@ -755,18 +755,16 @@
         
-/*
 if((toCh
@@ -768,38 +768,34 @@
 oCheck.get(%22
-executionResul
+runCheckou
 t%22) != null 
@@ -788,33 +788,32 @@
 out%22) != null &&
- 
 %0A            toC
@@ -801,32 +801,33 @@
  &&%0A            
+(
 toCheck.get(%22exe
@@ -827,149 +827,126 @@
 et(%22
-executionResult%22) instanceof TestExecutionResult) &&%0A            (toCheck.get(%22runCheckout%22) != null &&%0A            toCheck.get(%22runCheckout%22
+runCheckout%22).getClass().isPrimitive() %7C%7C ClassUtils.wrapperToPrimitive(toCheck.get(%22runCheckout%22).getClass()) != null
 )) &
@@ -1170,16 +1170,16 @@
 out.%22);%0A
+
         
@@ -1179,18 +1179,16 @@
        %7D
-*/
 %0A    %7D %0A

Remove impossible check & check primitive