mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-03 07:13:15 +00:00
fix of the issue 1230. @Tolerate not working for @Builder methods?
This commit is contained in:
1 parent
4d9da60f4f
commit
105c32f4b6
7 files changed
+135
-17
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import lombok.Builder;
|
||||
import lombok.experimental.Tolerate;
|
||||
|
||||
@Builder
|
||||
public class BuilderWithTolerate {
|
||||
private final int value;
|
||||
|
||||
public static void main(String[] args) {
|
||||
BuilderWithTolerate.builder().value("42").build();
|
||||
}
|
||||
|
||||
public static class BuilderWithTolerateBuilder {
|
||||
@Tolerate
|
||||
public BuilderWithTolerateBuilder value(String s) {
|
||||
return this.value(Integer.parseInt(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user