Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #16097
| From | Daniel Pitts <newsgroup.nospam@virtualinfinity.net> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: throw null investigation |
| References | (3 earlier) <ju7a51$d92$1@dont-email.me> <ju7amv$hfv$1@dont-email.me> <ju7c31$p8e$1@dont-email.me> <ju7esk$8q3$2@dont-email.me> <3eHNr.53442$FV6.1759@newsfe05.iad> |
| Message-ID | <atHNr.20107$lt3.6461@newsfe18.iad> (permalink) |
| Date | 2012-07-18 16:16 -0700 |
On 7/18/12 4:00 PM, Daniel Pitts wrote: > On 7/18/12 3:55 PM, markspace wrote: >> On 7/18/2012 3:06 PM, Daniele Futtorovic wrote: >>> >>> But if what you say is correct, and Java does /not/ systematically wrap >>> nulls "thrown" from JNI (assuming it's possible), then it would be >>> technically possible to catch a null Exception in the Java runtime, >>> wouldn't it? >> >> >> I want to emphasize there than I'm speculating and extrapolating from >> barely remembered blogs. It's something for the OP to consider, but >> he's going to have to decide if I'm talking rubbish or not. >> >> Executive summary: I dunno. >> >> >> > Lets check the JLS... > Actually, the JLS doesn't seem to handle this, but the JNI spec does: <http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/design.html#wp17593> > The JNI does not check for programming errors such as passing in NULL pointers or illegal argument types. [snip] > The programmer must not pass illegal pointers or arguments of the wrong type to JNI functions. Doing so could result in arbitrary consequences, including a corrupted system state or VM crash. It seems to me then, if the JNI code is passing NULL to "Throw" or "ThrowNew", it is "undefined" behavior.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
throw null investigation bob smith <bob@coolfone.comze.com> - 2012-07-18 10:10 -0700
Re: throw null investigation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-07-18 12:39 -0700
Re: throw null investigation markspace <-@.> - 2012-07-18 13:35 -0700
Re: throw null investigation Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-07-18 23:33 +0200
Re: throw null investigation markspace <-@.> - 2012-07-18 14:43 -0700
Re: throw null investigation Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-07-19 00:06 +0200
Re: throw null investigation markspace <-@.> - 2012-07-18 15:55 -0700
Re: throw null investigation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-07-18 16:00 -0700
Re: throw null investigation Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-07-18 16:16 -0700
Re: throw null investigation Roedy Green <see_website@mindprod.com.invalid> - 2012-07-18 17:09 -0700
csiph-web