Polishing contribution

Closes gh-910
This commit is contained in:
Rossen Stoyanchev 2021-11-24 12:42:04 +00:00
parent 913cc079af
commit 0d7c562693
1 changed files with 5 additions and 6 deletions

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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("=\"") this.writer.append(" ").append(attributeName).append("=\"")
.append(attributeValue).append("\""); .append(attributeValue).append("\"");
} }
/** /**
* Write an empty HTML attribute with the specified name. * Variant of {@link #writeAttribute(String, String)} for writing empty HTML
* <p>Be sure to write all attributes <strong>before</strong> writing * attributes without a value such as {@code required}.
* any inner text or nested tags. * @since 5.3.14
* @throws IllegalStateException if the opening tag is closed
*/ */
public void writeAttribute(String attributeName) throws JspException { public void writeAttribute(String attributeName) throws JspException {
if (currentState().isBlockTag()) { if (currentState().isBlockTag()) {