why I can not create new object in Btrace unsafe mode?

280 Views Asked by At

In Btrace UserGuide(https://kenai.com/projects/btrace/pages/UserGuide ) it refers 'BTrace Restrictions' , and also refers in unsafe mode no ‘BTrace Restrictions’

BTrace Restrictions can not create new objects. can not create new arrays. can not throw exceptions. ... ...

Supported Arguments unsafe - do not check for btrace restrictions violations (true/false)

in my btrace shell, I already set -Dcom.sun.btrace.unsafe=true,but even can't create new object, why?

1

There are 1 best solutions below

1
On BEST ANSWER

You need to mark the script itself for unsafe execution by using @BTrace(unsafe=true)