Browse Source

Merge pull request #905 from ericbottard/patch-1

* pr/905:
  Fix elvis operator example
pull/907/head
Stephane Nicoll 9 years ago
parent
commit
48576f2815
  1. 2
      src/asciidoc/core-expressions.adoc

2
src/asciidoc/core-expressions.adoc

@ -1113,7 +1113,7 @@ Instead you can use the Elvis operator, named for the resemblance to Elvis' hair @@ -1113,7 +1113,7 @@ Instead you can use the Elvis operator, named for the resemblance to Elvis' hair
----
ExpressionParser parser = new SpelExpressionParser();
String name = parser.parseExpression("null?:'Unknown'").getValue(String.class);
String name = parser.parseExpression("name?:'Unknown'").getValue(String.class);
System.out.println(name); // 'Unknown'
----

Loading…
Cancel
Save