logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Steppe <kste...@pacbell.net>
Subject Re: Log4J encapsulation is poor
Date Fri, 04 Jan 2002 20:20:55 GMT
In my opinion Java lacks the best access modifier for OO code -- access for the
class and its descendants but no one else.  Protected is close, with package
being a possible choice too.  Public access doesn't restrict me and rarely
causes problems even though it's theoretically bad, however not being able to
properly extend a class because something is private is a real problem that
requires a lot more work to get around even if it's theoretically better.  You
wouldn't believe the number of times I've wanted to strangle javasoft for making
a class un-extendable through careless use of private.

My question then becomes -- are protected or public variables causing you a
problem?  Why?  Are the engineers at Tivre modifying them directly, and if so
can't you just tell them to stop it?  Package access matters only if you're
working within the Log4J scope in which case you're developing Log4J as opposed
to just using it, so that shouldn't be an issue.


Christopher Randall wrote:

> I just have a question/comment about the Log4J code. It seems like there
> is a vast amount of exposure to instance variables in the code that I
> don't quite understand. I see a lot of public, package-access, and
> protected instance variables. Why does Log4J expose these data members?
> Was this done for a specific purpose, or were the original authors just
> lazy coders? If there is a purpose, can someone please explain it to me?
> Thanks,
> Chris
> --
> To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

View raw message