Re: Outside access to protected members

From: Craig Miskell (cmiskel..lbatross.co.nz)
Date: Wed Nov 06 2002 - 18:35:57 EST

  • Next message: Craig Miskell: "Oracle 8"

    Ooo, that's nasty. Should be used *very* sparingly, if at all.

    Wonder why they did that? It's quite a nasty thing to do even allow.

    Craig

    On Thu, 2002-11-07 at 11:53, Andrus Adamchik wrote:
    > I am not intimately familiar with Java SecurityManager. So today I
    > discovered one thing that is totally new for me - you can actually
    > read/write a value of a protected field of an object located in another
    > package, using reflection:
    >
    > http://java.sun.com/j2se/1.3/docs/api/java/lang/reflect/ReflectPermission.ht
    > ml
    >
    > This opens new ways of implementing a DataObject. Of course using this would
    > break encapsulation, but TopLink for instance uses it all over the place.
    >
    > Interesting...
    >
    > Andrus
    >



    This archive was generated by hypermail 2.0.0 : Wed Nov 06 2002 - 18:35:55 EST