logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <Paul.Sm...@lawlex.com.au>
Subject RE: cvs commit: logging-log4j/src/java/org/apache/log4j/pattern C lassNamePatternConverter.java LineLocationPatternConverter.java FullLocat ionPatternConverter.java FileLocationPatternConverter.java MethodLocation PatternConverter.java
Date Tue, 11 May 2004 22:09:08 GMT
> 
>    private void readObject(ObjectInputStream ois)
>           throws java.io.IOException, ClassNotFoundException {
>      ois.defaultReadObject();
>      readLevel(ois);
> 
>      // Make sure that location info instance is set.
>      if (locationInfo == null) {
>        locationInfo = LocationInfo.NA_LOCATION_INFO;   <--- 
> this is noteworthy
>      }
>    }

Would it be simpler to make this the default value for a newly constructed
LoggingEvent then, rather than rely on the readObject method, and EVERY
Receiver impl to have to think about this?  I don't like null values, so
making the declaration of the locationInfo property self initialise to
LocationInfo.NA_LOCATION_INFO makes more sense, unless I am misinterpretting
something.

cheers,

Paul Smith

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message