Re: [JPP-Devel] A question about null values...

2007-05-16 Thread A. Craig West
Your cast should be fine, although of course you will get a null
pointer exception if you ever try to actually dereference casted...
-Craig

On 5/16/07, Sunburned Surveyor [EMAIL PROTECTED] wrote:
 Are you allowed to cast an object with a value of null, or does this
 throw an exception?

 For example, would the following statement throw an exception if the
 needToCast reference was null?

 IRendererFactoryTool casted = (IRendererFactoryTool) needToCast;

 Thanks,

 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
 Jump-pilot-devel@lists.sourceforge.net
 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
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] A question about null values...

2007-05-16 Thread Sunburned Surveyor
Craig,

Thanks for your help. This tells me that the problem could possibly be
with other statements in the method throwing the null pointer
exception, not just the HashMap. I'll have to do some more digging to
see what is going on.

You help is appreciated.

The Sunburned Surveyor

On 5/16/07, A. Craig West [EMAIL PROTECTED] wrote:
 Your cast should be fine, although of course you will get a null
 pointer exception if you ever try to actually dereference casted...
 -Craig

 On 5/16/07, Sunburned Surveyor [EMAIL PROTECTED] wrote:
  Are you allowed to cast an object with a value of null, or does this
  throw an exception?
 
  For example, would the following statement throw an exception if the
  needToCast reference was null?
 
  IRendererFactoryTool casted = (IRendererFactoryTool) needToCast;
 
  Thanks,
 
  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
  Jump-pilot-devel@lists.sourceforge.net
  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
 Jump-pilot-devel@lists.sourceforge.net
 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
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] A question about null values...

2007-05-16 Thread Larry Becker
SS,

   When you get an exception while running in Eclipse, you should be
able to click on the line in the Console and have it take you to the
exact line that caused the error.  Even if you are not running in
Eclipse, the line number should be available in the Details, and
Navigate - Go to Line should take you there.

regards,
Larry

On 5/16/07, Sunburned Surveyor [EMAIL PROTECTED] wrote:
 Craig,

 Thanks for your help. This tells me that the problem could possibly be
 with other statements in the method throwing the null pointer
 exception, not just the HashMap. I'll have to do some more digging to
 see what is going on.

 You help is appreciated.

 The Sunburned Surveyor

 On 5/16/07, A. Craig West [EMAIL PROTECTED] wrote:
  Your cast should be fine, although of course you will get a null
  pointer exception if you ever try to actually dereference casted...
  -Craig
 
  On 5/16/07, Sunburned Surveyor [EMAIL PROTECTED] wrote:
   Are you allowed to cast an object with a value of null, or does this
   throw an exception?
  
   For example, would the following statement throw an exception if the
   needToCast reference was null?
  
   IRendererFactoryTool casted = (IRendererFactoryTool) needToCast;
  
   Thanks,
  
   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
   Jump-pilot-devel@lists.sourceforge.net
   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
  Jump-pilot-devel@lists.sourceforge.net
  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
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel



-- 
http://amusingprogrammer.blogspot.com/

-
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
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel