Browse Source

Fix elvis operator documentation

Lee Hinman 8 years ago
parent
commit
faee825fea
1 changed files with 4 additions and 4 deletions
  1. 4 4
      docs/painless/painless-operators.asciidoc

+ 4 - 4
docs/painless/painless-operators.asciidoc

@@ -1700,10 +1700,10 @@ elvis: expression '?:' expression;
 *Examples:*
 [source,Java]
 ----
-List l = new ArrayList();     // declares the List variable l and sets it to a newly allocated ArrayList
-List y = l : new ArrayList(); // declares the List variable y and sets it to l since l is not null
-y = null;                     // sets y to null
-def z = y ?: new HashMap();   // declares the def variable z and sets it to a newly allocated HashMap since y is null
+List l = new ArrayList();      // declares the List variable l and sets it to a newly allocated ArrayList
+List y = l ?: new ArrayList(); // declares the List variable y and sets it to l since l is not null
+y = null;                      // sets y to null
+def z = y ?: new HashMap();    // declares the def variable z and sets it to a newly allocated HashMap since y is null
 ----
 
 ==== Assignment