]> gcc.gnu.org Git - gcc.git/commitdiff
natVMVirtualMachine.cc (getSourceFile): Check for null source file and throw an excep...
authorKyle Galloway <kgallowa@redhat.com>
Mon, 23 Apr 2007 14:23:39 +0000 (14:23 +0000)
committerKyle Galloway <kgallowa@gcc.gnu.org>
Mon, 23 Apr 2007 14:23:39 +0000 (14:23 +0000)
2007-04-23  Kyle Galloway  <kgallowa@redhat.com>

* gnu/classpath/jdwp/natVMVirtualMachine.cc (getSourceFile): Check
for null source file and throw an exception indicating this.

From-SVN: r124066

libjava/ChangeLog
libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc

index b29a44312e285f26dc1d09732883a8f300cd2407..5d51892301e604a909198afbdd31b94063ec0e88 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-23  Kyle Galloway  <kgallowa@redhat.com>
+
+       * gnu/classpath/jdwp/natVMVirtualMachine.cc (getSourceFile): Check
+       for null source file and throw an exception indicating this.
+
 2007-04-20  Keith Seitz  <keiths@redhat.com>
 
        * gnu/gcj/jvmti/BreakpointManager.java (newBreakpoint):
index 73b21eedff1bbbc396238db438a69d65ea4fb5b5..c77aed257ddb8ee042aceb4a01dd186c3e545700 100644 (file)
@@ -46,6 +46,7 @@ details. */
 #include <gnu/classpath/jdwp/event/filters/IEventFilter.h>
 #include <gnu/classpath/jdwp/event/filters/LocationOnlyFilter.h>
 #include <gnu/classpath/jdwp/event/filters/StepFilter.h>
+#include <gnu/classpath/jdwp/exception/AbsentInformationException.h>
 #include <gnu/classpath/jdwp/exception/InvalidFrameException.h>
 #include <gnu/classpath/jdwp/exception/InvalidLocationException.h>
 #include <gnu/classpath/jdwp/exception/InvalidMethodException.h>
@@ -647,7 +648,14 @@ jstring
 gnu::classpath::jdwp::VMVirtualMachine::
 getSourceFile (jclass clazz)
 {
-  return _Jv_GetInterpClassSourceFile (clazz);
+  jstring file = _Jv_GetInterpClassSourceFile (clazz);
+  
+  // Check if the source file was found.
+  if (file == NULL)
+    throw new exception::AbsentInformationException (
+                           _Jv_NewStringUTF("Source file not found"));
+  
+  return file;
 }
 
 void
This page took 0.06662 seconds and 5 git commands to generate.