This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Illegal Package-Private Accesses in 3.4


On Tuesday, Aug 12, 2003, at 05:35 Pacific/Auckland, Mark Wielaard wrote:
Me too.  I know that Java encourages the usage of package private, but
the idea of putting all this stuff on java.lang is rather horrible.
I'd rather use native methods and friend where it's necessary to do
some cross-cutting.  That would ensure that only java.lang.VMThrowable
would be able to call StackTrace methods, not all of java.lang.  Much
cleaner, better modularity.

I don't agree with you here though. I like the fact that in principle
package local classes can be used to shield the user from the
implementation details. Public classes define the API, the package local
classes work together to provide the implementation.

Having a separate package for implementation classes works equally well to achieve this - if not better, and its a cleaner design for us. I really doubt any application developer is going to make the mistake of thinking gnu.gcj.runtime etc contain classes they should be concerned with!


I agree with you that we should be careful about exposing classes that could be a security risk, however.

Regards

Bryce.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]