Bug 516861 - Error dialog with message "-1" on inspect

Change-Id: Ieafd4d6f2b5475132418bad9297aebf79f0fa874
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java
index 9c68780..1bb3fc0 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java
@@ -79,6 +79,9 @@
 	 */
 	protected String getCompleteSnippet(String codeSnippet) {
 		codeSnippet = codeSnippet.trim(); // remove whitespaces at the end
+		if(codeSnippet.isEmpty()) {
+			return "return;"; //$NON-NLS-1$
+		}
 		boolean inString = false;
 		char[] chars = codeSnippet.toCharArray();