Skip to content

Commit

Permalink
Add "not null" javadocs to a chain of text node methods (#6905)
Browse files Browse the repository at this point in the history
  • Loading branch information
Legioth authored and ujoni committed Nov 11, 2019
1 parent 1c7ba87 commit 7a805cc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ default void add(Component... components) {
* Add the given text as a child of this component.
*
* @param text
* the text to add
* the text to add, not <code>null</code>
*/
default void add(String text) {
add(new Text(text));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class Text extends Component implements HasText {
* Creates an instance using the given text.
*
* @param text
* the text to show
* the text to show, not <code>null</code>
*/
public Text(String text) {
super(Element.createText(text));
Expand Down
2 changes: 1 addition & 1 deletion flow-server/src/main/java/com/vaadin/flow/dom/Element.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public Stream<Element> getChildren() {
* Creates a text node with the given text.
*
* @param text
* the text in the node
* the text in the node, not <code>null</code>
* @return an element representing the text node
*/
public static Element createText(String text) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private BasicTextElementStateProvider() {
* Creates a compatible text state node using the given text.
*
* @param text
* the text to use
* the text to use, not <code>null</code>
* @return a initialized and compatible state node
*/
public static StateNode createStateNode(String text) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected String getKey() {
* Sets the text of this node.
*
* @param text
* the text, not null
* the text, not <code>null</code>
*/
public void setText(String text) {
assert text != null;
Expand Down

0 comments on commit 7a805cc

Please sign in to comment.