Bug 412982 - [breakpoints] conditional breakpoint should have condition
"return false;" by default

Change-Id: I4708f288b39a6a1ad402439a89fe8babff4b70e1
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsTests.java
index b417227..09d3582 100755
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsTests.java
@@ -471,4 +471,25 @@
 			removeAllBreakpoints();
 		}	
 	}
+
+	/**
+	 * Tests a breakpoint with a simple systrace Launch should don't suspend for simple systrace
+	 * 
+	 * @throws Exception
+	 */
+	public void testSystracelBreakpoint() throws Exception {
+		String typeName = "HitCountLooper";
+		IJavaLineBreakpoint bp = createConditionalLineBreakpoint(16, typeName, "System.out.println(\"enclosing_type.enclosing_method()\");", true);
+
+		IJavaThread thread = null;
+		try {
+			thread = launchToLineBreakpoint(typeName, bp);
+		}
+		finally {
+			bp.delete();
+			assertNotNull(thread);
+			terminateAndRemove(thread);
+			removeAllBreakpoints();
+		}
+	}
 }
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ConditionalBreakpointHandler.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ConditionalBreakpointHandler.java
index 703f298..ee90a07 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ConditionalBreakpointHandler.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ConditionalBreakpointHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2012 IBM Corporation and others.
+ * Copyright (c) 2009, 2016 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,6 +34,7 @@
 import org.eclipse.jdt.internal.debug.core.JDIDebugPlugin;
 import org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget;
 import org.eclipse.jdt.internal.debug.core.model.JDIThread;
+import org.eclipse.jdt.internal.debug.core.model.JDIValue;
 
 import com.ibm.icu.text.MessageFormat;
 import com.sun.jdi.VMDisconnectedException;
@@ -123,6 +124,12 @@
 							return DONT_SUSPEND;
 						}
 					}
+					if (value instanceof JDIValue) {
+						JDIValue jdiValue = (JDIValue)value;
+						// If return is void, don't suspend (no error dialog)
+						if (jdiValue.getJavaType().getName().equals("void")) //$NON-NLS-1$
+							return DONT_SUSPEND;
+					}
 					IStatus status = new Status(
 							IStatus.ERROR,
 							JDIDebugPlugin.getUniqueIdentifier(),