Skip to content

Commit 00787f5

Browse files
authored
Update style guide (#2210)
1 parent b3aa68c commit 00787f5

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

docs/style-guide.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,9 @@ packages contain implementation details that should not be used by external cons
7878

7979
### `final` keyword usage
8080

81-
Public non-internal classes should be declared `final` where possible. Internal and non-public
82-
classes should not be declared `final`.
81+
Public non-internal non-test classes should be declared `final` where possible.
8382

84-
Methods should only be declared `final` if they are in public non-internal non-final classes.
83+
Methods should only be declared `final` if they are in public non-internal non-test non-final classes.
8584

8685
Fields should be declared `final` where possible.
8786

@@ -124,19 +123,6 @@ Test classes and test methods should generally be package-protected (no explicit
124123
modifier) rather than `public`. This follows the principle of minimal necessary visibility and is
125124
sufficient for JUnit to discover and execute tests.
126125

127-
### AutoService
128-
129-
Use the `@AutoService` annotation when implementing SPI interfaces. This automatically generates the
130-
necessary `META-INF/services/` files at compile time, eliminating the need to manually create and
131-
maintain service registration files.
132-
133-
```java
134-
@AutoService(AutoConfigurationCustomizerProvider.class)
135-
public class MyCustomizerProvider implements AutoConfigurationCustomizerProvider {
136-
// implementation
137-
}
138-
```
139-
140126
### Gradle
141127

142128
- Use Kotlin instead of Groovy for build scripts

0 commit comments

Comments
 (0)