Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #16092

Re: throw null investigation

From Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: throw null investigation
Date 2012-07-19 00:06 +0200
Organization A noiseless patient Spider
Message-ID <ju7c31$p8e$1@dont-email.me> (permalink)
References <a8e60469-b392-4a98-b845-42caa79f7959@googlegroups.com> <GhENr.7926$jA7.4844@newsfe15.iad> <ju76n5$pcv$1@dont-email.me> <ju7a51$d92$1@dont-email.me> <ju7amv$hfv$1@dont-email.me>

Show all headers | View raw


On 18/07/2012 23:43, markspace allegedly wrote:
> On 7/18/2012 2:33 PM, Daniele Futtorovic wrote:
> 
>> But if the JNI code actually wanted to throw an NPE, and teh Jav wraps a
>> null into an NPE, wouldn't it actually be more efficient if the JNI code
>> "threw" a null?
> 
> 
> That's what I'm saying.  I think perhaps Java does NOT wrap a null
> exception thrown by JNI code.  Java wraps a null value when you throw it
> from Java, but JNI tends to have a lot of holes, especially if you are
> dealing with "signed" or "trusted" code.  There's ways to get around the
> checks Java does of JNI code in the interest of speed, and if you don't
> check, then you don't get protection.

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?

-- 
DF.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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