Skip to content
  • Eric Bruneton's avatar
    Change the API and/or use defensive copy to prevent the user from modifying... · 4561c26f
    Eric Bruneton authored
    Change the API and/or use defensive copy to prevent the user from modifying internal data structures. This requires one backward incompatible change, namely the removal of the ClassReader.b field. I think this is acceptable, as this should normally be rarely used. The changes to ConstantDynamic are not backward incompatible, because this API was experimental up to now. The (unrelated) change of TypePath to a final class is also not an issue, because its unique constructor was package private. There is an inevitable performance impact, especially on ClassReader, but only when using the constructors using a byte array (the stream constructors don't use defensive copy).
    4561c26f