On 2010-02-15 11:26, Gildas Le Corguillé wrote:
> Hi Jari,
> I watched this warning and tried to fix it. But I don't know enough Base
> to understand this warning.
> It was there before I worked on the plugin. It's when it wants to
> retrieve LabeledExtract from Hybridization :
>     ItemResultList<LabeledExtract> labeledExtracts =
>     (ItemResultList<LabeledExtract>) 
>     rba.getScan().getHybridization().getCreationEvent().getSources().list(dc);
>     for (LabeledExtract labeledExtract :labeledExtracts)
>     {
> Despite this, it works :)

Tag the method with @SuppressWarnings("unchecked") to get rid of the
warning. The getSources() method can return LabeledExtract, Extract or
Sample objects depending on which type of objects you start with. So the
compiler issues a warning since it can't guarantee the exact type, but
since you know that you are starting with a Hybridization it is safe to
assume that it will return LabeledExtracts.

I am not so sure that it is safe with


though. You may get a NullPointerException, PermissionDeniedException,
etc. in any one of those steps. But maybe error handling has already
been setup to handle this...

> About, BASE2WSClient.jar, it's a Base2 library. I include it in the lib
> directory because I had a strange error in eclipse without it !?

This jar file is somtimes required to compile even if the actual code
only uses classes in the BASE2Core.jar file. It seems like the Tab2Mage
exporter can be compiled without it. The problems with Eclipse is
probably happening because it tries to load the entire BASE2Core.jar
file, not just the parts that the Tab2Mage exporter needs.


SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
basedb-devel mailing list

Reply via email to