Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-19681

camel-joor: review disabled tests

    XMLWordPrintableJSON

Details

    • Task
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • None
    • 4.x
    • camel-joor
    • Advanced

    Description

      There are a couple of tests disabled in camel-joor that need to be reviewed. They are failing with compilation errors such as:

      org.apache.camel.language.csimple.joor.JoorCSimpleCompilationException: csimple-joor compilation error for class: org.apache.camel.language.csimple.joor.compiled.CSimpleScript130
        1 package org.apache.camel.language.csimple.joor.compiled;
        2 
        3 import java.util.*;
        4 import java.util.concurrent.*;
        5 import java.util.stream.*;
        6 
        7 import org.apache.camel.*;
        8 import org.apache.camel.util.*;
        9 import org.apache.camel.spi.*;
       10 import static org.apache.camel.language.csimple.CSimpleHelper.*;
       11 
       12 import org.apache.camel.language.csimple.joor.OriginalSimpleTest.*;
       13 
       14 public class CSimpleScript130 extends org.apache.camel.language.csimple.CSimpleSupport {
       15 
       16     Language bean;
       17 
       18     public CSimpleScript130() {
       19     }
       20 
       21     @Override
       22     public boolean isPredicate() {
       23         return false;
       24     }
       25 
       26     @Override
       27     public String getText() {
       28         return "${bodyAs(Animal).getFriend?.getFriend.getName}";
       29     }
       30 
       31     @Override
       32     public Object evaluate(CamelContext context, Exchange exchange, Message message, Object body) throws Exception {
       33         return bodyAs(message, Animal.class).getFriend().get?.getFriend().getName();
       34     }
       35 }
      	at org.apache.camel.language.csimple.joor.JoorCSimpleCompiler.doCompile(JoorCSimpleCompiler.java:107)
      	at org.apache.camel.language.csimple.joor.JoorCSimpleCompiler.compileExpression(JoorCSimpleCompiler.java:80)
      	at org.apache.camel.language.csimple.CSimpleLanguage$CompilationSupport.compileExpression(CSimpleLanguage.java:271)
      	at org.apache.camel.language.csimple.CSimpleLanguage.createExpression(CSimpleLanguage.java:176)
      	at org.apache.camel.test.junit5.CamelTestSupport.assertExpression(CamelTestSupport.java:960)
      	at org.apache.camel.test.junit5.LanguageTestSupport.assertExpression(LanguageTestSupport.java:69)
      	at org.apache.camel.test.junit5.LanguageTestSupport.assertExpression(LanguageTestSupport.java:76)
      	at org.apache.camel.language.csimple.joor.OriginalSimpleTest.testBodyOGNLNullSafeToAvoidNPE(OriginalSimpleTest.java:1416)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
      	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
      	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
      	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
      	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
      	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
      	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
      	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
      	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
      	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
      	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
      	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
      	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
      	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
      	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
      	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
      	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
      	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
      	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:202)
      	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.executeNonConcurrentTasks(ForkJoinPoolHierarchicalTestExecutorService.java:172)
      	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:152)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
      	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
      	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:202)
      	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:146)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
      	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
      	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:202)
      	at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:194)
      	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
      	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
      	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
      	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
      	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
      Caused by: org.joor.ReflectException: Compilation error: /org/apache/camel/language/csimple/joor/compiled/CSimpleScript130.java:33: error: illegal start of expression
              return bodyAs(message, Animal.class).getFriend().get?.getFriend().getName();
                                                                   ^
      1 error
      	at org.joor.Compile.compile(Compile.java:105)
      	at org.joor.Reflect.compile(Reflect.java:104)
      	at org.joor.Reflect.compile(Reflect.java:79)
      	at org.apache.camel.language.csimple.joor.JoorCSimpleCompiler.doCompile(JoorCSimpleCompiler.java:103)
      	... 66 more
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              orpiske Otavio Rodolfo Piske
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: