diff options
Diffstat (limited to 'test/pretty/resource/before')
-rw-r--r-- | test/pretty/resource/before/CastWithIntersection.java | 7 | ||||
-rw-r--r-- | test/pretty/resource/before/Lambda.java | 8 | ||||
-rw-r--r-- | test/pretty/resource/before/MultiCatch.java | 10 |
3 files changed, 25 insertions, 0 deletions
diff --git a/test/pretty/resource/before/CastWithIntersection.java b/test/pretty/resource/before/CastWithIntersection.java new file mode 100644 index 00000000..ce97cba0 --- /dev/null +++ b/test/pretty/resource/before/CastWithIntersection.java @@ -0,0 +1,7 @@ +// version 8: +import java.util.*; +public class CastWithIntersection { + public void test(List<?> list) { + RandomAccess r = (RandomAccess & java.io.Serializable) list; + } +}
\ No newline at end of file diff --git a/test/pretty/resource/before/Lambda.java b/test/pretty/resource/before/Lambda.java new file mode 100644 index 00000000..e7784df5 --- /dev/null +++ b/test/pretty/resource/before/Lambda.java @@ -0,0 +1,8 @@ +// version 8: +public class Lambda { + Runnable r = () -> System.out.println(); + java.util.Comparator<Integer> c1 = (a, b) -> a - b; + java.util.Comparator<Integer> c2 = (Integer a, Integer b) -> { + return a - b; + }; +}
\ No newline at end of file diff --git a/test/pretty/resource/before/MultiCatch.java b/test/pretty/resource/before/MultiCatch.java new file mode 100644 index 00000000..590fe382 --- /dev/null +++ b/test/pretty/resource/before/MultiCatch.java @@ -0,0 +1,10 @@ +// version 7: +public class MultiCatch { + public void test() { + try { + System.out.println(); + } catch (IllegalArgumentException | IllegalStateException e) { + e.printStackTrace(); + } + } +}
\ No newline at end of file |