I think it's just a typo, you have an extra semicolon at the end of the if...
-Craig

On 5/4/07, Sunburned Surveyor <[EMAIL PROTECTED]> wrote:
> Hey guys. I need some help with the use of the instanceof operator. This one
> really has me stumped. :]
>
> In one of my unit tests I have the following test method:
>
>         else if(testResult instanceof
> com.vividsolutions.jump.workbench.ui.renderer.LayerRenderer
> == true);
>         {
>             Class thisClass = testResult.getClass();
>             String toPrint = thisClass.getName();
>             fail("The renderer returned was not an instance of
> LayerRenderer. The object " +
>                     "returned was a " + toPrint);
>         }
>
> This test method fails and prints the following message: "The renderer
> returned was not an instance of LayerRenderer. The ojbect
>  returned was a
> com.vividsolutions.jump.workbench.ui.renderer.LayerRenderer"
>
> How could the testResult object not be an instance of the
> com.vividsolutions.jump.workbench.ui.renderer.LayerRenderer
> when I use the instanceof operator, but be an object of that same class as
> indicated by the error message?
>
> Am I using the instanceof operator incorrectly?
>
> Thanks in advance for the help.
>
> The Sunburned Surveyor
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Jump-pilot-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to