File tree Expand file tree Collapse file tree 4 files changed +15
-11
lines changed
main/java/com/diffplug/spotless/extra/eclipse/groovy Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ ext {
12
12
// the once used during code formatting
13
13
' org.codehaus.groovy' :' +' , // Groovy compiler patches supporting use within GrEclipse and Groovy itself
14
14
' org.codehaus.groovy.eclipse.core' :' +' , // Groovy core classes (provides central logging used by formatter)
15
- // 'org.eclipse.jdt.core':"${VER_JDT_PATCH}" , // Patches org.eclipse.jdt.core classes supporting use within GrEclipse (provides AST generator)
15
+ ' org.eclipse.jdt.core' :' + ' , // Patches org.eclipse.jdt.core classes supporting use within GrEclipse (provides AST generator)
16
16
' org.eclipse.jdt.groovy.core' :' +' // Extends org.eclipse.jdt.core for Groovy
17
17
]
18
18
19
19
internalJars = [
20
20
// Jars included by org.codehaus.groovy
21
- " **/groovy-all- ${ VER_GROOVY} -indy" , // Use Groovy compiler compatible with GrEclipse instead of localGroovy
21
+ " **/groovy-${ VER_GROOVY} -indy" , // Use Groovy compiler compatible with GrEclipse instead of localGroovy
22
22
' **/groovy-eclipse' , // Patches/Overrides some of the Groovy compiler classes
23
23
' **/eclipse-trace' , // Provides logging capabilities for groovy-eclipse
24
24
Original file line number Diff line number Diff line change 1
1
# Versions correspond to the Groovy-Eclipse version used for the fat-JAR.
2
2
# See https://github.com/groovy/groovy-eclipse/releases for further information about Groovy-Eclipse versions.
3
3
# Patch version can be incremented independently for backward compatible patches of this library.
4
- ext_version =2.9.2
4
+ ext_version =3.0.0
5
5
ext_artifactId =spotless-eclipse-groovy
6
6
ext_description =Groovy Eclipse's formatter bundled for Spotless
7
7
@@ -12,8 +12,7 @@ ext_group=com.diffplug.spotless
12
12
ext_VER_JAVA =1.8
13
13
14
14
# Compile
15
- VER_ECLIPSE =4.7
15
+ VER_ECLIPSE =4.8
16
16
VER_SPOTLESS_ECLISPE_BASE =[3.0.0,4.0.0[
17
17
VER_ECLISPE_JFACE =[3.12.0,4.0.0[
18
- VER_GROOVY =2.5.0
19
- VER_JDT_PATCH =3.13.100.xx-201801041714-e47-RELEASE
18
+ VER_GROOVY =2.6.0
Original file line number Diff line number Diff line change @@ -369,7 +369,7 @@ public SimpleLogEntry(LogLevel level, String message) {
369
369
}
370
370
371
371
public SimpleLogEntry (LogLevel level , String message , Throwable execption ) {
372
- this (level , message , Optional .of (execption ));
372
+ this (level , message , Optional .ofNullable (execption ));
373
373
}
374
374
375
375
private SimpleLogEntry (LogLevel level , String message , Optional <Throwable > execption ) {
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public class GrEclipseFormatterStepImplTest {
31
31
private final static TestData TEST_DATA = TestData .getTestDataOnFileSystem ();
32
32
private final static String PARSER_EXCEPTION = "class Test { void method() {} " ;
33
33
private final static String SCANNER_EXCEPTION = "{" ;
34
- private final static String BOUNDED_WILDCARDS = "foo(Map<String, ? extends Object> e) { }" ;
34
+ private final static String BOUNDED_WILDCARDS = "foo(Map<String, ? extends Object> e)\n { \n e.clear(); \n }" ;
35
35
36
36
@ Test
37
37
public void defaultFormat () throws Throwable {
@@ -71,10 +71,15 @@ public void scannerException() throws Throwable {
71
71
format (SCANNER_EXCEPTION , config -> {});
72
72
}
73
73
74
- /** Test the handling bounded wildcards templates */
75
- @ Test (expected = IllegalArgumentException .class )
74
+ /**
75
+ * Test the handling bounded wildcards templates
76
+ * No exception since Groovy-Eclipse 3.0.0.
77
+ */
78
+ @ Test
76
79
public void boundedWildCards () throws Throwable {
77
- format (BOUNDED_WILDCARDS , config -> {});
80
+ String output = format (BOUNDED_WILDCARDS , config -> {});
81
+ assertEquals ("Groovy formatter does notformat after bounded wildcards correctly." ,
82
+ BOUNDED_WILDCARDS .replace ("\n " , " " ), output );
78
83
}
79
84
80
85
@ Test
You can’t perform that action at this time.
0 commit comments