Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added missing javac tests of Issue #113
and other tests as well
- Loading branch information
Showing
25 changed files
with
220 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
test/transform/resource/after-delombok/ConflictingStaticConstructorNames.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
class ConflictingStaticConstructorNames { | ||
@java.lang.Override | ||
@java.lang.SuppressWarnings("all") | ||
public boolean equals(final java.lang.Object o) { | ||
if (o == this) return true; | ||
if (!(o instanceof ConflictingStaticConstructorNames)) return false; | ||
final ConflictingStaticConstructorNames other = (ConflictingStaticConstructorNames)o; | ||
if (!other.canEqual((java.lang.Object)this)) return false; | ||
return true; | ||
} | ||
@java.lang.SuppressWarnings("all") | ||
public boolean canEqual(final java.lang.Object other) { | ||
return other instanceof ConflictingStaticConstructorNames; | ||
} | ||
@java.lang.Override | ||
@java.lang.SuppressWarnings("all") | ||
public int hashCode() { | ||
int result = 1; | ||
return result; | ||
} | ||
@java.lang.Override | ||
@java.lang.SuppressWarnings("all") | ||
public java.lang.String toString() { | ||
return "ConflictingStaticConstructorNames()"; | ||
} | ||
@java.lang.SuppressWarnings("all") | ||
public ConflictingStaticConstructorNames() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 35 additions & 1 deletion
36
test/transform/resource/after-delombok/EnumIdAccessorsPrefix.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,35 @@ | ||
//ignore | ||
class EnumIdAccessorsPrefix { | ||
public enum Status { | ||
WAITING(0), | ||
READY(1), | ||
SKIPPED(-1), | ||
COMPLETED(5); | ||
|
||
private static final java.util.Map<java.lang.Integer, Status> $CODE_LOOKUP = new java.util.HashMap<java.lang.Integer, Status>(); | ||
private final int _code; | ||
|
||
@java.lang.SuppressWarnings("all") | ||
private Status(final int _code) { | ||
this._code = _code; | ||
} | ||
|
||
static { | ||
for (Status status : Status.values()) { | ||
$CODE_LOOKUP.put(status._code, status); | ||
} | ||
} | ||
|
||
@java.lang.SuppressWarnings("all") | ||
public static Status findByCode(final int code) { | ||
if ($CODE_LOOKUP.containsKey(code)) { | ||
return $CODE_LOOKUP.get(code); | ||
} | ||
throw new java.lang.IllegalArgumentException(java.lang.String.format("Enumeration \'Status\' has no value for \'code = %s\'", code)); | ||
} | ||
|
||
@java.lang.SuppressWarnings("all") | ||
public int getCode() { | ||
return this._code; | ||
} | ||
} | ||
} |
14 changes: 13 additions & 1 deletion
14
test/transform/resource/after-delombok/FluentSetterAccessorsPrefix.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
//ignore | ||
class FluentSetterAccessorsPrefix<T, K> { | ||
int _fluent; | ||
|
||
@java.lang.SuppressWarnings("all") | ||
public FluentSetterAccessorsPrefix() { | ||
} | ||
|
||
@java.lang.SuppressWarnings("all") | ||
public FluentSetterAccessorsPrefix<T, K> fluent(final int fluent) { | ||
this._fluent = fluent; | ||
return this; | ||
} | ||
} |
10 changes: 6 additions & 4 deletions
10
test/transform/resource/after-delombok/GetterLazyInvalid.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
test/transform/resource/after-delombok/LoggerSlf4jOnNonType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
class LoggerSlf4jOnNonType { | ||
|
||
@lombok.extern.slf4j.Slf4j | ||
void foo() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
test/transform/resource/after-delombok/SynchronizedNameNoSuchField.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class SynchronizedNameNoSuchField { | ||
private Object read = new Object(); | ||
private static Object READ = new Object(); | ||
@lombok.Synchronized("write") | ||
void test2() { | ||
System.out.println("two"); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
test/transform/resource/after-delombok/SynchronizedNameStaticToInstanceRef.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class SynchronizedNameStaticToInstanceRef { | ||
private Object read = new Object(); | ||
private static Object READ = new Object(); | ||
static void test3() { | ||
synchronized (SynchronizedNameStaticToInstanceRef.read) { | ||
System.out.println("three"); | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
test/transform/resource/after-ecj/ConflictingStaticConstructorNames.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@lombok.Data(staticConstructor = "of") @lombok.NoArgsConstructor class ConflictingStaticConstructorNames { | ||
public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { | ||
if ((o == this)) | ||
return true; | ||
if ((! (o instanceof ConflictingStaticConstructorNames))) | ||
return false; | ||
final @java.lang.SuppressWarnings("all") ConflictingStaticConstructorNames other = (ConflictingStaticConstructorNames) o; | ||
if ((! other.canEqual((java.lang.Object) this))) | ||
return false; | ||
return true; | ||
} | ||
public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { | ||
return (other instanceof ConflictingStaticConstructorNames); | ||
} | ||
public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { | ||
int result = 1; | ||
return result; | ||
} | ||
public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { | ||
return "ConflictingStaticConstructorNames()"; | ||
} | ||
public @java.lang.SuppressWarnings("all") ConflictingStaticConstructorNames() { | ||
super(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
test/transform/resource/after-ecj/SynchronizedNameNoSuchField.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class SynchronizedNameNoSuchField { | ||
private Object read = new Object(); | ||
private static Object READ = new Object(); | ||
<clinit>() { | ||
} | ||
SynchronizedNameNoSuchField() { | ||
super(); | ||
} | ||
@lombok.Synchronized("write") void test2() { | ||
System.out.println("two"); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
test/transform/resource/after-ecj/SynchronizedNameStaticToInstanceRef.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class SynchronizedNameStaticToInstanceRef { | ||
private Object read = new Object(); | ||
private static Object READ = new Object(); | ||
<clinit>() { | ||
} | ||
SynchronizedNameStaticToInstanceRef() { | ||
super(); | ||
} | ||
static @lombok.Synchronized("read") void test3() { | ||
synchronized (SynchronizedNameStaticToInstanceRef.read) | ||
{ | ||
System.out.println("three"); | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
test/transform/resource/before/ConflictingStaticConstructorNames.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@lombok.Data(staticConstructor="of") | ||
@lombok.NoArgsConstructor | ||
class ConflictingStaticConstructorNames { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
test/transform/resource/before/SynchronizedNameNoSuchField.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class SynchronizedNameNoSuchField { | ||
private Object read = new Object(); | ||
private static Object READ = new Object(); | ||
|
||
@lombok.Synchronized("write") void test2() { | ||
System.out.println("two"); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
test/transform/resource/before/SynchronizedNameStaticToInstanceRef.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class SynchronizedNameStaticToInstanceRef { | ||
private Object read = new Object(); | ||
private static Object READ = new Object(); | ||
|
||
@lombok.Synchronized("read") static void test3() { | ||
System.out.println("three"); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
test/transform/resource/messages-delombok/ConflictingStaticConstructorNames.java.messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1:1 WARNING Ignoring static constructor name: explicit @XxxArgsConstructor annotation present; its `staticName` parameter will be used. |
1 change: 1 addition & 0 deletions
1
test/transform/resource/messages-delombok/SynchronizedNameNoSuchField.java.messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5:9 ERROR The field write does not exist. |
1 change: 1 addition & 0 deletions
1
test/transform/resource/messages-delombok/SynchronizedNameStaticToInstanceRef.java.messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5:9 ERROR non-static variable read cannot be referenced from a static context |
1 change: 1 addition & 0 deletions
1
test/transform/resource/messages-ecj/ConflictingStaticConstructorNames.java.messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 warning Ignoring static constructor name: explicit @XxxArgsConstructor annotation present; its `staticName` parameter will be used. |
1 change: 1 addition & 0 deletions
1
test/transform/resource/messages-ecj/SynchronizedNameNoSuchField.java.messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5 error The field write does not exist. |
1 change: 1 addition & 0 deletions
1
test/transform/resource/messages-ecj/SynchronizedNameStaticToInstanceRef.java.messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5 error Cannot make a static reference to the non-static field SynchronizedNameStaticToInstanceRef.read |