From 0d7c5626936d07446f4ba3f10df2fcbf8d68c551 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Wed, 24 Nov 2021 12:42:04 +0000 Subject: [PATCH] Polishing contribution Closes gh-910 --- .../web/servlet/tags/form/TagWriter.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagWriter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagWriter.java index 29b62c2b93..a8167bcbf3 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagWriter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2021 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. @@ -97,12 +97,11 @@ public class TagWriter { this.writer.append(" ").append(attributeName).append("=\"") .append(attributeValue).append("\""); } - + /** - * Write an empty HTML attribute with the specified name. - *

Be sure to write all attributes before writing - * any inner text or nested tags. - * @throws IllegalStateException if the opening tag is closed + * Variant of {@link #writeAttribute(String, String)} for writing empty HTML + * attributes without a value such as {@code required}. + * @since 5.3.14 */ public void writeAttribute(String attributeName) throws JspException { if (currentState().isBlockTag()) {