aboutsummaryrefslogtreecommitdiff
path: root/test/pretty/resource/before/ExoticJava.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2015-11-01 16:08:06 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2015-11-16 22:18:29 +0100
commit8db179346171d47230b88cdd509954391fb49d1c (patch)
treef00590990f717118ad491d3c01ac277542b53e61 /test/pretty/resource/before/ExoticJava.java
parentdc5e1b9b35e853e6b503efac367999e02569108e (diff)
downloadlombok-8db179346171d47230b88cdd509954391fb49d1c.tar.gz
lombok-8db179346171d47230b88cdd509954391fb49d1c.tar.bz2
lombok-8db179346171d47230b88cdd509954391fb49d1c.zip
Added a prettyprinter test case with some exotic java constructs, and fixed a few bugs involving these. Also removed the old pretty printer.
Diffstat (limited to 'test/pretty/resource/before/ExoticJava.java')
-rw-r--r--test/pretty/resource/before/ExoticJava.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/pretty/resource/before/ExoticJava.java b/test/pretty/resource/before/ExoticJava.java
new file mode 100644
index 00000000..b70b1e12
--- /dev/null
+++ b/test/pretty/resource/before/ExoticJava.java
@@ -0,0 +1,45 @@
+import static java.lang.String.*;
+
+import java.io.*;
+
+class ExoticJava<V> {
+ public <T> ExoticJava(T genericsInConstructor, V genericsInType) {
+ System.out.println(new <String>ExoticJava<Integer>("Hello", 5));
+ }
+ ;;;;
+ public void test() {
+ int x = 5, y[] = {10};
+ ;
+ class MethodLocal implements Serializable, java.util.RandomAccess {
+ @SuppressWarnings({"unchecked", "rawtypes"})
+ strictfp public final int foo() {
+ int x = super.hashCode();
+ x <<= 5;
+ do {
+ x <<= 5;
+ } while (Boolean.FALSE);
+ return x;
+ }
+ }
+
+ for (int i = 10, j[] = {20}; i < 5; i++, j[0]++) {
+ String z = "";
+ try (PrintWriter pw = new PrintWriter(System.out); PrintWriter p2 = new PrintWriter(System.out)) {
+ pw.println();
+ } finally {
+ synchronized (z) {
+ System.out.println(z);
+ }
+ }
+
+ if ((y == null)) {}
+ if (((y == null))) ;
+ {;}
+ java.util.List<String> list = new java.util.ArrayList<>();
+ assert Boolean.TRUE : "That's weird";
+ double d = -1.8e12;
+ long loooong = 0x1234ABCD;
+ int octal = 0127;
+ }
+ }
+} \ No newline at end of file