Skip to content

Commit e75ad68

Browse files
committed
Enforce "since major.minor.patch" javadoc convention
Closes gh-1345
1 parent 656c190 commit e75ad68

File tree

7 files changed

+15
-7
lines changed

7 files changed

+15
-7
lines changed

spring-graphql-test/src/main/java/org/springframework/graphql/test/tester/GraphQlTester.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ interface Request<T extends Request<T>> {
152152
* and is defined with the {@code fragment} keyword.
153153
* @param fragment the fragment definition
154154
* @return this request spec
155-
* @since 1.3
155+
* @since 1.3.0
156156
* @see <a href="http://spec.graphql.org/October2021/#sec-Language.Fragments">Fragments specification</a>
157157
*/
158158
T fragment(String fragment);
@@ -164,7 +164,7 @@ interface Request<T extends Request<T>> {
164164
* @param fragmentName the name of the fragment to append
165165
* @return this request spec
166166
* @throws IllegalArgumentException if the fragmentName cannot be resolved
167-
* @since 1.3
167+
* @since 1.3.0
168168
*/
169169
T fragmentName(String fragmentName);
170170

spring-graphql/src/main/java/org/springframework/graphql/ResponseError.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* Represents a GraphQL response error.
2828
*
2929
* @author Rossen Stoyanchev
30-
* @since 1.0
30+
* @since 1.0.0
3131
*/
3232
public interface ResponseError {
3333

spring-graphql/src/main/java/org/springframework/graphql/data/method/annotation/support/AnnotatedControllerDetectionSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public void setExecutor(Executor executor) {
221221
* On Java 20 and lower, the predicate returns false. You can configure the
222222
* predicate for more control, or alternatively, return {@link Callable}.
223223
* @param predicate the predicate to use
224-
* @since 1.3
224+
* @since 1.3.0
225225
*/
226226
public void setBlockingMethodPredicate(@Nullable Predicate<HandlerMethod> predicate) {
227227
this.blockingMethodPredicate = ((predicate != null) ? predicate : (handlerMethod) -> false);

spring-graphql/src/main/java/org/springframework/graphql/server/TimeoutWebGraphQlInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* until the response stream is established. Transport-specific timeouts are
3232
* configurable on the transport handlers directly.
3333
* @author Brian Clozel
34-
* @since 1.4
34+
* @since 1.4.0
3535
*/
3636
public class TimeoutWebGraphQlInterceptor implements WebGraphQlInterceptor {
3737

spring-graphql/src/main/java/org/springframework/graphql/server/webflux/GraphQlWebSocketHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public GraphQlWebSocketHandler(
105105
* the WebSocket for the {@code "connection_ini"} message from the client.
106106
* @param keepAliveDuration how frequently to send ping messages when no
107107
* other messages are sent
108-
* @since 1.3
108+
* @since 1.3.0
109109
*/
110110
public GraphQlWebSocketHandler(
111111
WebGraphQlHandler graphQlHandler, CodecConfigurer codecConfigurer,

spring-graphql/src/main/java/org/springframework/graphql/server/webmvc/GraphQlWebSocketHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public GraphQlWebSocketHandler(
129129
* the WebSocket for the {@code "connection_ini"} message from the client.
130130
* @param keepAliveDuration how frequently to send ping messages when no
131131
* other messages are sent
132-
* @since 1.3
132+
* @since 1.3.0
133133
*/
134134
public GraphQlWebSocketHandler(
135135
WebGraphQlHandler graphQlHandler, HttpMessageConverter<Object> converter,

src/checkstyle/checkstyle.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,13 @@
2020
<property name="accessModifiers" value="public,protected"/>
2121
<property name="allowMissingReturnTag" value="true"/>
2222
</module>
23+
<module name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck">
24+
<property name="id" value="atSinceVersionConvention"/>
25+
<property name="format" value="\@since \d+\.\d+$"/>
26+
<property name="maximum" value="0"/>
27+
<property name="message"
28+
value="@since should use Major.Minor.Patch version convention"/>
29+
<property name="ignoreComments" value="false"/>
30+
</module>
2331
</module>
2432
</module>

0 commit comments

Comments
 (0)