-
Notifications
You must be signed in to change notification settings - Fork 185
Closed
Description
Take the following code blocks
package com.example.demo;
import java.util.Optional;
import java.util.function.Function;
public class Test {
public static void main(String[] args) {
map(t -> Optional.ofNullable(t), "Null").isPresent();
}
private static <T, R> Optional<? extends R> map(Function<? super T, ? extends Optional<? extends R>> mapper, T value) {
return mapper.apply(value);
}
}
package com.example.demo;
import java.util.Optional;
import java.util.function.Function;
public class Test {
public static void main(String[] args) {
map(t -> Optional.ofNullable(t), "Null").isPresent();
}
private static <T, R> Optional<R> map(Function<T, Optional<R>> mapper, T value) {
return mapper.apply(value);
}
}
package com.example.demo;
import java.util.Optional;
import java.util.function.Function;
public class Test {
public static void main(String[] args) {
map(t -> Optional.ofNullable(t), "Null").isPresent();
}
private static Optional<String> map(Function<String, Optional<String>> mapper, String value) {
return mapper.apply(value);
}
}
Environment
- Operating System: Any
- JDK version: 17
- Visual Studio Code version: 1.79.2
- Java extension version: 1.20
- Java Debugger extension version: 0.52
Steps To Reproduce
- Add inline breakpoint into
t -> Optional.ofNullable(t) - Run the program
Current Result
The breakpoint doesn't work
Expected Result
The execution should stop at the lambda
Additional Informations
The issue is when trying to find lambda methods from the debugger API, the method object doesn't provide the generic signature, But the signature we try to match has the generic signature which cause the match failure.
Metadata
Metadata
Assignees
Labels
No labels