Skip to content

engine.properties does not prevent non-string values #458

Description

@botic

The following code can lead to an out-of-sync Java system properties with engine.properties:

const engine = require("ringo/engine");
engine.properties.foo = "bar";
engine.properties.foo === java.lang.System.getProperty("foo"); // true
engine.properties.foo = {};
engine.properties.foo === java.lang.System.getProperty("foo"); // false
java.lang.System.getProperty("foo") === null; // true
typeof engine.properties.foo === "object"; // true
java.lang.System.clearProperty("foo"); // throws a java.lang.ClassCastException!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions