Skip to content

Commit 8c7aa66

Browse files
committed
Don't apply override options to formatter
Update the delegate formatter so that the `setOptions` method reapplies the default options rather than overriding them. Closes gh-97
1 parent cff6a01 commit 8c7aa66

File tree

5 files changed

+42
-0
lines changed

5 files changed

+42
-0
lines changed

spring-javaformat/spring-javaformat-formatter/src/main/java/io/spring/javaformat/formatter/Formatter.java

+5
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ private static class DelegateCodeFormatter extends ExtendedCodeFormatter {
190190
Preparators.forEach(this::addPreparator);
191191
}
192192

193+
@Override
194+
public void setOptions(Map<String, String> options) {
195+
super.setOptions(OPTIONS);
196+
}
197+
193198
}
194199

195200
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package sample;
2+
3+
import sample.SpringBootTest.WebEnvironment;
4+
5+
@SpringBootTest(classes = RibbonClientConfigurationIntegrationTests.TestLBConfig.class,
6+
properties = "test.ribbon.ServerListRefreshInterval=999")
7+
public class SampleApplication {
8+
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package sample;
2+
3+
import sample.SpringBootTest.WebEnvironment;
4+
5+
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
6+
properties = { "management.server.port=0", "management.server.address=127.0.0.1",
7+
"management.server.servlet.context-path:/admin" })
8+
public class SampleApplication {
9+
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package sample;
2+
3+
import sample.SpringBootTest.WebEnvironment;
4+
5+
@SpringBootTest(classes = RibbonClientConfigurationIntegrationTests.TestLBConfig.class, properties = "test.ribbon.ServerListRefreshInterval=999")
6+
public class SampleApplication {
7+
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package sample;
2+
3+
import sample.SpringBootTest.WebEnvironment;
4+
5+
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {
6+
"management.server.port=0", "management.server.address=127.0.0.1",
7+
"management.server.servlet.context-path:/admin" })
8+
public class SampleApplication {
9+
10+
}

0 commit comments

Comments
 (0)