Skip to content

Commit

Permalink
Enforce order of Javadoc tags for records
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Aug 18, 2024
1 parent e0cb7aa commit 143736e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,10 +19,10 @@
/**
* Record class holding key information for beans registered in a bean factory.
*
* @param beanName the name of the registered bean
* @param beanClass the type of the registered bean
* @author Brian Clozel
* @since 6.0.8
* @param beanName the name of the registered bean
* @param beanClass the type of the registered bean
*/
record BeanRegistrationKey(String beanName, Class<?> beanClass) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
* reference to the method's {@linkplain #declaringClass declaring class},
* {@linkplain #methodName name}, and {@linkplain #parameterTypes parameter types}.
*
* @author Sam Brannen
* @since 6.0.11
* @param declaringClass the method's declaring class
* @param methodName the name of the method
* @param parameterTypes the types of parameters accepted by the method
* @author Sam Brannen
* @since 6.0.11
*/
record MethodDescriptor(Class<?> declaringClass, String methodName, Class<?>... parameterTypes) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ public String toString() {
* is usually the declaring class of the {@code executable} (in case of a constructor
* or a locally declared factory method), there are cases where retaining the actual
* concrete class is necessary (e.g. for an inherited factory method).
* @since 6.1.7
* @param executable the {@link Executable} ({@link java.lang.reflect.Constructor}
* or {@link java.lang.reflect.Method}) to invoke
* @param targetClass the target {@link Class} of the executable
* @since 6.1.7
*/
public record InstantiationDescriptor(Executable executable, Class<?> targetClass) {

Expand Down
4 changes: 2 additions & 2 deletions spring-web/src/main/java/org/springframework/http/ETag.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
/**
* Represents an ETag for HTTP conditional requests.
*
* @param tag the unquoted tag value
* @param weak whether the entity tag is for weak or strong validation
* @author Rossen Stoyanchev
* @since 5.3.38
* @param tag the unquoted tag value
* @param weak whether the entity tag is for weak or strong validation
* @see <a href="https://datatracker.ietf.org/doc/html/rfc7232">RFC 7232</a>
*/
public record ETag(String tag, boolean weak) {
Expand Down
2 changes: 1 addition & 1 deletion src/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
<property name="offset" value="0"/>
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.javadoc.AtclauseOrderCheck">
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF"/>
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, RECORD_DEF"/>
<property name="tagOrder" value="@author, @since, @param, @see, @version, @serial, @deprecated"/>
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.javadoc.AtclauseOrderCheck">
Expand Down

0 comments on commit 143736e

Please sign in to comment.