You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ce...@apache.org on 2003/05/08 13:46:08 UTC

cvs commit: jakarta-log4j-sandbox/src/java/org/apache/log4j/spi LocationInfo.java

ceki        2003/05/08 04:46:08

  Modified:    src/java/org/apache/log4j/spi LocationInfo.java
  Log:
  
  - Renamed the variable fullInfoAvailable to locationInfoAvailable to
  better reflect the use of the variabe.
  
  - More importantly, in the public LocationInfo(Throwable t, String
  fqnOfCallingClass) method moved the spot where the
  locationInfoAvailable (formerlyfullInfoAvailable) to the end of the
  method which is its correct place.
  
  Revision  Changes    Path
  1.2       +8 -8      jakarta-log4j-sandbox/src/java/org/apache/log4j/spi/LocationInfo.java
  
  Index: LocationInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/spi/LocationInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocationInfo.java	28 Apr 2003 05:44:33 -0000	1.1
  +++ LocationInfo.java	8 May 2003 11:46:08 -0000	1.2
  @@ -112,11 +112,11 @@
        <code>fully.qualified.classname.of.caller.methodName(Filename.java:line)</code>
       */
     public String fullInfo;
  -  private boolean fullInfoAvailable;
  +  private boolean locationInfoAvailable;
   
     public LocationInfo(
       String fileName, String className, String methodName, String lineNumber) {
  -    fullInfoAvailable = true;
  +    locationInfoAvailable = true;
       this.fileName = fileName;
       this.className = className;
       this.methodName = methodName;
  @@ -147,8 +147,6 @@
         return;
       }
   
  -    fullInfoAvailable = true;
  -
       String s;
   
       // Protect against multiple access to sw.
  @@ -207,6 +205,8 @@
   
       // everything between is the requested stack item
       this.fullInfo = s.substring(ibegin, iend);
  +    
  +    locationInfoAvailable = true;
     }
   
     /**
  @@ -214,7 +214,7 @@
        logging request.
     */
     public String getClassName() {
  -    if (!fullInfoAvailable) {
  +    if (!locationInfoAvailable) {
         return NA;
       }
   
  @@ -259,7 +259,7 @@
        <p>This information is not always available.
     */
     public String getFileName() {
  -    if (!fullInfoAvailable) {
  +    if (!locationInfoAvailable) {
         return NA;
       }
   
  @@ -283,7 +283,7 @@
        <p>This information is not always available.
     */
     public String getLineNumber() {
  -    if (!fullInfoAvailable) {
  +    if (!locationInfoAvailable) {
         return NA;
       }
   
  @@ -305,7 +305,7 @@
        Returns the method name of the caller.
     */
     public String getMethodName() {
  -    if (!fullInfoAvailable) {
  +    if (!locationInfoAvailable) {
         return NA;
       }
   
  
  
  

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