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 + + * gnu/classpath/jdwp/natVMVirtualMachine.cc (getSourceFile): Check + for null source file and throw an exception indicating this. + 2007-04-20 Keith Seitz * 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 #include #include +#include #include #include #include @@ -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