Merge pull request #41 from apache/dependabot/maven/com.puppycrawl.tools-checkstyle-8.40

Bump checkstyle from 8.39 to 8.40
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 420394b..e66ceb0 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -48,6 +48,7 @@
 
 New Features in 3.2:
 ====================
+* JEXL-344:      Don't fill stack trace for JexlExpression#Return (to improve performance)
 * JEXL-334:      Remove offensive terminology from code and API
 * JEXL-333:      Allow declaration of namespace within script
 * JEXL-317:      Support script cancellation through less invasive API
diff --git a/src/main/java/org/apache/commons/jexl3/JexlException.java b/src/main/java/org/apache/commons/jexl3/JexlException.java
index 35c7ff1..45d3299 100644
--- a/src/main/java/org/apache/commons/jexl3/JexlException.java
+++ b/src/main/java/org/apache/commons/jexl3/JexlException.java
@@ -69,7 +69,19 @@
      * @param cause the exception causing the error
      */
     public JexlException(final JexlNode node, final String msg, final Throwable cause) {
-        super(msg != null ? msg : "", unwrap(cause));
+        this(node, msg != null ? msg : "", unwrap(cause), true);
+    }
+
+    /**
+     * Creates a new JexlException.
+     *
+     * @param node  the node causing the error
+     * @param msg   the error message
+     * @param cause the exception causing the error
+     * @param trace whether this exception has a stacktrace and can <em>not</em> be suppressed
+     */
+    protected JexlException(final JexlNode node, final String msg, final Throwable cause, boolean trace) {
+        super(msg != null ? msg : "", unwrap(cause), !trace, trace);
         if (node != null) {
             mark = node;
             info = node.jexlInfo();
@@ -946,7 +958,7 @@
          * @param value the returned value
          */
         public Return(final JexlNode node, final String msg, final Object value) {
-            super(node, msg, null);
+            super(node, msg, null, false);
             this.result = value;
         }
 
@@ -986,7 +998,7 @@
          * @param node the break
          */
         public Break(final JexlNode node) {
-            super(node, "break loop", null);
+            super(node, "break loop", null, false);
         }
     }
 
@@ -1002,7 +1014,7 @@
          * @param node the continue
          */
         public Continue(final JexlNode node) {
-            super(node, "continue loop", null);
+            super(node, "continue loop", null, false);
         }
     }
 
diff --git a/src/site/xdoc/changes.xml b/src/site/xdoc/changes.xml
index 661e8a8..ce6e90a 100644
--- a/src/site/xdoc/changes.xml
+++ b/src/site/xdoc/changes.xml
@@ -26,6 +26,9 @@
     </properties>
     <body>
         <release version="3.2">
+            <action dev="henrib" type="fix" issue="JEXL-344"  due-to="David Costanzo">
+                Don't fill stack trace for JexlExpression#Return (to improve performance)
+            </action>
             <action dev="Hussachai Puripunpinyo" type="fix" issue="JEXL-336">
                 Escape some control characters
             </action>