Keith Seitz wrote:
Kyle Galloway wrote:
ChangeLog
2007-04-11  Kyle Galloway  <[EMAIL PROTECTED]>

   * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
   (executeSourceFile): Throw an exception if no source file was found.

Questions/comments/concerns?

Hmm. I'm not convinced this is the right way to do this... My initial reaction is to have VMVirtualMachine.getSourceFile throw the exception instead of the return value being reinterpreted. After all, it should know the *exact* reason it cannot return the requested information. All VMVirtualMachine methods are declared throwing JdwpException for this reason.

But perhaps you considered this already and discounted it for some reason?
I though about doing it either way, and decided to put it in ReferenceTypeCommandSet since I thought there may be times when a null source file has meaning (here we go again). I can see how it makes sense to put it in VMVirvtualMachine, so I'll draw up a patch for natVMVirtualMachine in GCJ instead.

PS. Along similar lines, I think that there are a lot of hidden problems with gcj's implementation of VMVirtualMachine. All the unimplemented stub functions return NULL or 0 (or some such thing) instead of throwing NotImplementedException. I think this just confuses things.
I'm definitely seeing this come up, but I'm not sure it will get us around having to implment some things right away. For example I think we're going to need VirtualMachine.AllClasses since I don't think having it throw an unimplemented exception is going to go over very well with the debugger, however, this is something I wil need to check out.

Suffice it to say, patch withdrawn.

- Kyle


Reply via email to