summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorkgallowa <kgallowa@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-23 14:23:39 +0000
committerkgallowa <kgallowa@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-23 14:23:39 +0000
commit9f3445353f18c85d5480d2bb0b027756db96ed27 (patch)
tree25126b91f7b8a2feff3cb7a0e1c50df070b78240 /libjava
parentf1456a875b137b2b09ef429f8dc80be815eed7be (diff)
downloadgcc-9f3445353f18c85d5480d2bb0b027756db96ed27.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124066 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc10
2 files changed, 14 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index b29a44312e2..5d51892301e 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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):
diff --git a/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc b/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc
index 73b21eedff1..c77aed257dd 100644
--- a/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc
+++ b/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc
@@ -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