Dead kittens??? Sheesh! I'll log it and check it in today!!!
[cid:FFF91280-F5AB-4F4B-B2FD-616AC93DD8C7]

From: Luc Boudreau <notifications@github.com<mailto:notifications@github.com>>
Reply-To: pentaho/pentaho-reporting <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Friday, May 24, 2013 11:01 AM
To: pentaho/pentaho-reporting <pentaho-reporting@noreply.github.com<mailto:pentaho-reporting@noreply.github.com>>
Cc: Gretchen Moran <gmoran@pentaho.com<mailto:gmoran@pentaho.com>>
Subject: Re: [pentaho-reporting] PRD-3965 fix for loading default datafactory metadata when running on server. (#80)


In engine/extensions-kettle/source/org/pentaho/reporting/engine/classic/extensions/datasources/kettle/KettleDataFactory.java:

> @@ -232,9 +233,16 @@ public DataFactoryMetaData getMetaData() {
>        KettleTransformationProducer defaultProducer = queries.values().iterator().next();
>        if (defaultProducer instanceof EmbeddedKettleTransformationProducer)
>        {
> -        EmbeddedKettleTransformationProducer producer = (EmbeddedKettleTransformationProducer)defaultProducer;
> -        metadata = DataFactoryRegistry.getInstance().getMetaData(producer.getPluginId());
> -        return metadata;
> +        try{
> +
> +          EmbeddedKettleTransformationProducer producer = (EmbeddedKettleTransformationProducer)defaultProducer;
> +          metadata = DataFactoryRegistry.getInstance().getMetaData(producer.getPluginId());
> +          return metadata;
> +
> +        }catch(MetaDataLookupException e){
> +          // we are on the server... plugin metadata instances are not registered
> +          // Return the default Kettle datafactory metadata...


Can we at least log something here? Every time someone writes an empty catch block, God kills a kitten, and I happen to love kittens.

—
Reply to this email directly or view it on GitHub<https://github.com/pentaho/pentaho-reporting/pull/80/files#r4382589>.