muse-dev[bot] commented on a change in pull request #5835:
URL: https://github.com/apache/skywalking/pull/5835#discussion_r526139611
##########
File path:
oap-server/analyzer/meter-analyzer/src/main/java/org/apache/skywalking/oap/meter/analyzer/dsl/Expression.java
##########
@@ -23,18 +23,35 @@
import groovy.lang.GroovyObjectSupport;
import groovy.util.DelegatingScript;
import java.time.Instant;
+import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
/**
* Expression is a reusable monadic container type which represents a DSL
expression.
*/
@Slf4j
+@RequiredArgsConstructor
public class Expression {
+ private final String literal;
+
private final DelegatingScript expression;
- Expression(DelegatingScript expression) {
- this.expression = expression;
+ /**
+ * Parse the expression statically.
+ *
+ * @return Parsed context of the expression.
+ */
+ public ExpressionParsingContext parse() {
+ try (ExpressionParsingContext ctx = ExpressionParsingContext.create())
{
+ ctx.downsampling = DownsamplingType.AVG;
Review comment:
*NULL_DEREFERENCE:* object `ctx` last assigned on line 46 could be null
and is dereferenced at line 47.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]