[logback-dev] svn commit: r1900 - logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi

noreply.ceki at qos.ch noreply.ceki at qos.ch
Wed Oct 29 12:05:04 CET 2008


Author: ceki
Date: Wed Oct 29 12:05:04 2008
New Revision: 1900

Modified:
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/PackagingDataCalculator.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/StackTraceElementProxy.java

Log:
related to LBCLASSIC-72

In StackTracementElement proxy, the setPackageInfo method was renamed as 
setClassPackagingData for consistency. 

The steAsString field marked as transient to save a few byte during serialization
(we can reconstruct this field from 'ste')

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/PackagingDataCalculator.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/PackagingDataCalculator.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/PackagingDataCalculator.java	Wed Oct 29 12:05:04 2008
@@ -91,11 +91,11 @@
           firsExactClassLoader = callerClass.getClassLoader();
         }
         ClassPackagingData pi = calculateByExactType(callerClass);
-        step.setPackageInfo(pi);
+        step.setClassPackagingData(pi);
       } else {
         missfireCount++;
         ClassPackagingData pi = computeBySTEP(step, lastExactClassLoader);
-        step.setPackageInfo(pi);
+        step.setClassPackagingData(pi);
       }
     }
     populateUncommonFrames(commonFrames, stepArray, firsExactClassLoader);
@@ -139,7 +139,7 @@
     for (int i = 0; i < uncommonFrames; i++) {
       StackTraceElementProxy step = stepArray[i];
       ClassPackagingData pi = computeBySTEP(step, firstExactClassLoader);
-      step.setPackageInfo(pi);
+      step.setClassPackagingData(pi);
     }
   }
 

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/StackTraceElementProxy.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/StackTraceElementProxy.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/StackTraceElementProxy.java	Wed Oct 29 12:05:04 2008
@@ -7,7 +7,9 @@
   private static final long serialVersionUID = -4832130320500439038L;
 
   final StackTraceElement ste;
-  private String steAsString;
+  // save a byte or two during serialization, as we can
+  // reconstruct this field from 'ste'
+  transient private String steAsString;
   private ClassPackagingData cpd;
 
   StackTraceElementProxy(StackTraceElement ste) {
@@ -29,7 +31,7 @@
     return ste;
   }
   
-  void setPackageInfo(ClassPackagingData cpd) {
+  void setClassPackagingData(ClassPackagingData cpd) {
     this.cpd = cpd;
   }
 


More information about the logback-dev mailing list