diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ReflectiveScan.java b/spring-context/src/main/java/org/springframework/context/annotation/ReflectiveScan.java index c71da8589e..b83bff6ef9 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ReflectiveScan.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ReflectiveScan.java @@ -51,9 +51,9 @@ import org.springframework.core.annotation.AliasFor; * ignored. * * @author Stephane Nicoll + * @since 6.2 * @see Reflective @Reflective * @see RegisterReflection @RegisterReflection - * @since 6.2 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) diff --git a/spring-web/src/main/java/org/springframework/web/util/RfcUriParser.java b/spring-web/src/main/java/org/springframework/web/util/RfcUriParser.java index 024cfb932e..18e5b4f5fa 100644 --- a/spring-web/src/main/java/org/springframework/web/util/RfcUriParser.java +++ b/spring-web/src/main/java/org/springframework/web/util/RfcUriParser.java @@ -30,7 +30,6 @@ import org.springframework.util.Assert; * * @author Rossen Stoyanchev * @since 6.2 - * * @see RFC 3986 */ abstract class RfcUriParser { @@ -78,10 +77,10 @@ abstract class RfcUriParser { * @param query the query, if present * @param fragment the fragment, if present */ - record UriRecord(@Nullable String scheme, boolean isOpaque, - @Nullable String user, @Nullable String host, @Nullable String port, - @Nullable String path, @Nullable String query, @Nullable String fragment) { - + record UriRecord( + @Nullable String scheme, boolean isOpaque, + @Nullable String user, @Nullable String host, @Nullable String port, + @Nullable String path, @Nullable String query, @Nullable String fragment) { } @@ -130,6 +129,7 @@ abstract class RfcUriParser { } }, + HOST_OR_PATH { @Override @@ -158,6 +158,7 @@ abstract class RfcUriParser { } }, + SCHEME_OR_PATH { @Override @@ -188,6 +189,7 @@ abstract class RfcUriParser { } }, + HOST { @Override @@ -229,6 +231,7 @@ abstract class RfcUriParser { } }, + IPV6 { @Override @@ -259,6 +262,7 @@ abstract class RfcUriParser { } }, + PORT { @Override @@ -291,6 +295,7 @@ abstract class RfcUriParser { } }, + PATH { @Override @@ -319,6 +324,7 @@ abstract class RfcUriParser { } }, + QUERY { @Override @@ -334,7 +340,9 @@ abstract class RfcUriParser { } }, + FRAGMENT { + @Override public void handleNext(InternalParser parser, char c, int i) { } @@ -345,6 +353,7 @@ abstract class RfcUriParser { } }, + WILDCARD { @Override @@ -358,6 +367,7 @@ abstract class RfcUriParser { } }; + /** * Method to handle each character from the input string. * @param parser provides access to parsing state, and helper methods @@ -422,6 +432,7 @@ abstract class RfcUriParser { this.uri = uri; } + // Check internal state public boolean hasScheme() { @@ -444,6 +455,7 @@ abstract class RfcUriParser { return (this.index == this.componentIndex); } + // Top-level parse loop, iterate over chars and delegate to states public UriRecord parse() { @@ -468,6 +480,7 @@ abstract class RfcUriParser { return this.uri.charAt(this.index); } + // Transitions and index updates public void advanceTo(State state) { @@ -493,6 +506,7 @@ abstract class RfcUriParser { this.index = index; } + // Component capture public InternalParser resolveIfOpaque() { @@ -586,6 +600,7 @@ abstract class RfcUriParser { return this; } + // Encoding and curly bracket handling /** @@ -636,6 +651,7 @@ abstract class RfcUriParser { return (this.openCurlyBracketCount > 0); } + @Override public String toString() { return "[State=" + this.state + ", index=" + this.index + ", componentIndex=" + this.componentIndex +