-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge fixes of inner type decls, enable sorting nested types in one-go
- Loading branch information
Showing
5 changed files
with
270 additions
and
25 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
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
65 changes: 65 additions & 0 deletions
65
...-prone-experimental/src/test/resources/TypeMemberOrderNestedCompilationUnitTestInput.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,65 @@ | ||
class A { | ||
class AInner2 { | ||
private static final int foo = 1; | ||
int bar = 2; | ||
|
||
class AInner2Inner1 { | ||
private static final int foo = 1; | ||
int bar = 2; | ||
} | ||
|
||
class AInner2Inner2 { | ||
int bar = 2; | ||
private static final int foo = 1; | ||
} | ||
} | ||
|
||
private static final int foo = 1; | ||
|
||
class OnlyTopLevelSortedClass { | ||
private static final int foo = 1; | ||
int bar = 2; | ||
|
||
class UnsortedNestedClass { | ||
int bar = 2; | ||
private static final int foo = 1; | ||
} | ||
} | ||
|
||
class AInner1 { | ||
class AInner1Inner1 { | ||
int bar = 2; | ||
private static final int foo = 1; | ||
} | ||
|
||
enum DeeplyNestedEnum { | ||
/** FOO's JavaDoc */ | ||
FOO, | ||
/* Dangling comment trailing enumerations. */ ; | ||
|
||
/** `quz` method's dangling comment */ | ||
; | ||
|
||
/** `quz` method's comment */ | ||
void qux() {} | ||
|
||
// `baz` method's comment | ||
final int baz = 2; | ||
|
||
static final int BAR = 1; | ||
// trailing comment | ||
} | ||
|
||
private static final int foo = 1; | ||
|
||
class AInner1Inner2 { | ||
int bar = 2; | ||
private static final int foo = 1; | ||
} | ||
|
||
int bar = 2; | ||
} | ||
|
||
static int baz = 3; | ||
private final int bar = 2; | ||
} |
Oops, something went wrong.