[rules-dev] DummyKieScanner instantiated in catch{} in Impl

Mario Fusco mario.fusco at gmail.com
Mon Mar 10 04:04:55 EDT 2014


Joe,

as said by Mark the DummyKieScanner acts only as a placeholder to avoid
tons of null checks inside the code. But you're right when you wrote that
it should fail fast when requested to load an artifact. I'll make the
DummyKieScanner.loadArtifact methods to throw a more meaningful Exception
when invoked.

Thank you for having reported this,
Mario


On Sat, Mar 8, 2014 at 3:53 AM, Mark Proctor <mproctor at codehaus.org> wrote:

> I suspect the DummyKieScanner was there to avoid people getting null
> pointers. But I think actually it may be best to throw an exception, to
> fail fast. The dummy can’t be used for anything, and it will jut confuse
> users.
>
> @mario: thoughts?
>
> Mark
> On 7 Mar 2014, at 23:18, Joe White <Joe.White at recondotech.com> wrote:
>
> In the KieRepositoryImpl code what is the purpose of instantiating to the
> DummyScanner if the kie-ci jar is not on the classpath. Lines 120-126 in
> the impl. Ultimately this results in a Not Found exception downstream but
> masks the true issue of the missing jar. Seems like it would be better off
> throwing the exception back out to the caller so they know they are missing
> the jar?
>
> I’m just trying to get a handle on how it is all wired together and spent
> a couple of hours chasing why it wouldn’t find my kmodule jar when the core
> problem was my ear was just missing the kie-ci.
>
> Thanks,
>
> Joe
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20140310/9b34778f/attachment.html 


More information about the rules-dev mailing list