Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unable to access java.lang in JDK 11 version #301

Merged
merged 1 commit into from
May 12, 2023

Conversation

beiketianzhuang
Copy link

Describe what this PR does / why we need it

I fixed a bug, please see the issue #299

Does this pull request fix one issue?

please see the issue #299

Describe how you did it

I added a new way of logging so that the program can display the real error on the production environment.
image

I was able to reproduce the error locally using the following code
image

Describe how to verify it

public static void main(String[] args) {
        String content = "package com.taobao.csp.monkeyking.script.java.source;\n" +
                "import java.util.Map;\n" +
                "public class CornApplication {\n" +
                "    public Object run(Map<String, Object> params) {\n" +
                "        return \"agents\";" +
                "}\n" +
                "}";
        Script script = new Script("1", null, null, content, null);
        JavaCodeScriptEngine engine = new JavaCodeScriptEngine();
        Object compile = engine.compile(script, CompileFailedTest.class.getClassLoader(), null);
    }

@binbin0325 binbin0325 self-requested a review February 11, 2023 01:50
@tiny-x tiny-x added this to the v1.7.2 milestone May 11, 2023
@tiny-x tiny-x added the type/enhancement New feature or request label May 11, 2023
@tiny-x tiny-x merged commit 15b1a34 into chaosblade-io:master May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants