On 10/1/05, Henning P. Schmiedehausen <[EMAIL PROTECTED]> wrote: > I was trying to wrap my brain around the current log code, following a > possible null pointer dereference in LogManager and found a twisted > little maze of code... > > Nathan, as this is your baby, do you object to some of the following > changes: > > - Nuke the public C'tor for Log(). Do we want anyone walk around and > create new Log instances? Add a LogManager.getLog() method which returns > a Log object.
hmm. i'm actually not a big fan of this. it doesn't really solve the problem. because then there are two getLog() methods (one in LogManager and one in RuntimeServices/Instance). "anyone" might just as easily get an unofficial Log instance from LogManager.getLog() as creating it themselves, with the potential extra problem that they'd think it was legit because the LogManager gave it to them. if they create a new one themselves, then they at least shouldn't have any expectation that it would do anything. so -1 is my vote on this. > - Make LogManager.createLogChute() private. This should _only_ be called > from LogManager.updateLog() +1 i should have done that. i just forgot. > - Make HoldingLogChute() package private. Even better, make it a private > static inner class of LogManager. We never ever want users to use that > directly. It is a vehicle intended for pre-init logging. interesting. i hadn't thought of making it package private because i was just re-implementing the PrimordialLogSystem. but it makes good sense. +1 as for making it a static inner class of LogManager... -1 (because that makes less sense given my -1 above) > - rename HoldingLogChute() to PreInitLogChute() -0 (i slightly prefer names that speak to function over those that refer to time of use, but it's not a big deal to me) > - rename LogChuteSystem() to LogSystemLogChute() :-) +0 (this is a deprecated hack class. what do i care? ;-) ) > Some bike shed painting here, I admit. :) > Best regards > Henning > > > -- > Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH > [EMAIL PROTECTED] +49 9131 50 654 0 http://www.intermeta.de/ > > RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire > Linux, Java, perl, Solaris -- Consulting, Training, Development > > 4 - 8 - 15 - 16 - 23 - 42 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
