java/src/org/apache/qetest/xsl/BugzillaTestletDriver.java [405:430]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public Testlet getTestlet(TraxDatalet d)
    {
        try
        {
            // Calculate the java classname
            String testletSourceName = (String)d.options.get(JAVA_SOURCE_NAME);
            // Potential problem: what if the SourceName doesn't have .java at end?
            String testletClassName = testletSourceName.substring(0, testletSourceName.indexOf(JAVA_EXTENSION));
            //@todo should we attempt to compile to a .class file 
            //  if we can't find the class here?  This adds a bunch 
            //  of complexity here; so I'm thinking it's better to 
            //  simply require the user to 'build all' first
            Class testletClazz = Class.forName(testletClassName);
            // Create it and set our reporter into it
            Testlet t = (Testlet)testletClazz.newInstance();
            t.setLogger((Logger)reporter);
            return (Testlet)t;
        }
        catch (Exception e)
        {
            // Ooops, none found, log an error
            reporter.logThrowable(Logger.ERRORMSG, e, "getTestlet(d) threw");
            reporter.checkErr("getTestlet(d) threw: " + e.toString());
            return null;
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



java/src/org/apache/qetest/xsl/JiraTestletDriver.java [404:429]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public Testlet getTestlet(TraxDatalet d)
    {
        try
        {
            // Calculate the java classname
            String testletSourceName = (String)d.options.get(JAVA_SOURCE_NAME);
            // Potential problem: what if the SourceName doesn't have .java at end?
            String testletClassName = testletSourceName.substring(0, testletSourceName.indexOf(JAVA_EXTENSION));
            //@todo should we attempt to compile to a .class file 
            //  if we can't find the class here?  This adds a bunch 
            //  of complexity here; so I'm thinking it's better to 
            //  simply require the user to 'build all' first
            Class testletClazz = Class.forName(testletClassName);
            // Create it and set our reporter into it
            Testlet t = (Testlet)testletClazz.newInstance();
            t.setLogger((Logger)reporter);
            return (Testlet)t;
        }
        catch (Exception e)
        {
            // Ooops, none found, log an error
            reporter.logThrowable(Logger.ERRORMSG, e, "getTestlet(d) threw");
            reporter.checkErr("getTestlet(d) threw: " + e.toString());
            return null;
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



