sdeboy 2004/01/22 22:39:55 Modified: src/java/org/apache/log4j/spi LocationInfo.java Log: Corrected bug that prevented locationinfo from correctly returning it's fields in some cases (socketappender->socketreceiver) Revision Changes Path 1.17 +4 -16 logging-log4j/src/java/org/apache/log4j/spi/LocationInfo.java Index: LocationInfo.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/spi/LocationInfo.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- LocationInfo.java 9 Dec 2003 21:28:28 -0000 1.16 +++ LocationInfo.java 23 Jan 2004 06:39:55 -0000 1.17 @@ -112,11 +112,9 @@ <code>fully.qualified.classname.of.caller.methodName(Filename.java:line)</code> */ public String fullInfo; - private boolean locationInfoAvailable; public LocationInfo( String fileName, String className, String methodName, String lineNumber) { - locationInfoAvailable = true; this.fileName = fileName; this.className = className; this.methodName = methodName; @@ -205,8 +203,6 @@ // everything between is the requested stack item this.fullInfo = s.substring(ibegin, iend); - - locationInfoAvailable = true; } public boolean equals(Object o) { @@ -220,14 +216,6 @@ LocationInfo r = (LocationInfo) o; - if(locationInfoAvailable != r.locationInfoAvailable) { - return false; - } - - if(locationInfoAvailable != false) { - return true; - } - if(lineNumber == null) { if(r.lineNumber != null) { return false; @@ -270,7 +258,7 @@ */ public String getClassName() { if ( - (!locationInfoAvailable) || ((className == null) && (fullInfo == null))) { + (className == null) && (fullInfo == null)) { return NA; } @@ -315,7 +303,7 @@ <p>This information is not always available. */ public String getFileName() { - if ((!locationInfoAvailable) || ((fileName == null) && (fullInfo == null))) { + if ((fileName == null) && (fullInfo == null)) { return NA; } @@ -340,7 +328,7 @@ */ public String getLineNumber() { if ( - (!locationInfoAvailable) || ((lineNumber == null) && (fullInfo == null))) { + (lineNumber == null) && (fullInfo == null)) { return NA; } @@ -363,7 +351,7 @@ */ public String getMethodName() { if ( - (!locationInfoAvailable) || ((methodName == null) && (fullInfo == null))) { + (methodName == null) && (fullInfo == null)) { return NA; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]