Skip to content

[Bug]: Playground not allowing asserts #40

@danthe1st

Description

@danthe1st

What happened?

When trying to use asserts, the Playground fails with

Your snippet is trying to perform an unauthorized operation!

Code:

assert "Hello".equals("Hello")

or alternatively

boolean a(){
  return true;
}
assert a();

or even

assert false;

Image

OS

Linux

What browsers are you seeing the problem on?

Firefox

Contact Details (optional)

No response

Additional information

I guess this is because of the call to Class#desiredAssertionStatus since method calls in java.lang.Class are not allowed. I think it would make sense to allow that specific method.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions