commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hen...@apache.org
Subject svn commit: r1812625 - /commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/Engine.java
Date Thu, 19 Oct 2017 12:01:32 GMT
Author: henrib
Date: Thu Oct 19 12:01:32 2017
New Revision: 1812625

URL: http://svn.apache.org/viewvc?rev=1812625&view=rev
Log:
JEXL-241:
bad implementation of a double-check lazy initialization, aka item 71

Modified:
    commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/Engine.java

Modified: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/Engine.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/Engine.java?rev=1812625&r1=1812624&r2=1812625&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/Engine.java
(original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/Engine.java
Thu Oct 19 12:01:32 2017
@@ -651,7 +651,8 @@ public class Engine extends JexlEngine {
         TemplateEngine e = jxlt;
         if (e == null) {
             synchronized(this) {
-                if (jxlt == null) {
+                e = jxlt;
+                if (e == null) {
                     e = new TemplateEngine(this, true, 0, '$', '#');
                     jxlt = e;
                 }



Mime
View raw message