Bug 579099 - Cannot create lambda entry breakpoints on same method on 2
different lines

Change-Id: Idc63f56ca64c535a315f0e097bc37cbf56eb7507
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/191506
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Sarika Sinha <sarika.sinha@in.ibm.com>
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
index 4e34313..2aab5b4 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
@@ -1283,6 +1283,7 @@
      * @param element the element to get the breakpoint from
      * @return the current breakpoint from the element or <code>null</code>
      */
+	@SuppressWarnings("restriction")
 	protected static IJavaBreakpoint getMethodBreakpoint(IMember element) {
         IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
         IBreakpoint[] breakpoints = breakpointManager.getBreakpoints(JDIDebugModel.getPluginIdentifier());
@@ -1314,6 +1315,9 @@
 				}
 			} else {
 				if (container instanceof IMethod) {
+					if (method instanceof org.eclipse.jdt.internal.core.LambdaMethod) {
+						return null;
+					}
 					if (method.getDeclaringType().getFullyQualifiedName().equals(container.getDeclaringType().getFullyQualifiedName())) {
 						if (method.isSimilar((IMethod) container)) {
 							return methodBreakpoint;