Author: ggregory
Date: Mon May 12 14:49:06 2014
New Revision: 1593984

URL: http://svn.apache.org/r1593984
Log:
Rename ivar "isExcact" to exact, isExact() to getExcat(). This will make the 
JSON and XML IO simpler. Also using get/set APIs in general is simpler IMO that 
dealing with the "boolean exception".

Modified:
    
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/StackTracePackageElement.java

Modified: 
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/StackTracePackageElement.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/StackTracePackageElement.java?rev=1593984&r1=1593983&r2=1593984&view=diff
==============================================================================
--- 
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/StackTracePackageElement.java
 (original)
+++ 
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/StackTracePackageElement.java
 Mon May 12 14:49:06 2014
@@ -25,14 +25,15 @@ public class StackTracePackageElement im
 
     private static final long serialVersionUID = -2171069569241280505L;
 
+    private final boolean exact;
+
     private final String location;
 
     private final String version;
 
-    private final boolean isExact;
-
     /**
      * Constructor that takes the location, version, and exact match flag.
+     * 
      * @param location The location of the Class.
      * @param version The version of the component.
      * @param exact if true this is an exact package element.
@@ -40,11 +41,21 @@ public class StackTracePackageElement im
     public StackTracePackageElement(final String location, final String 
version, final boolean exact) {
         this.location = location;
         this.version = version;
-        this.isExact = exact;
+        this.exact = exact;
+    }
+
+    /**
+     * Returns the indicator of whether this is an exact match.
+     * 
+     * @return true if the location was determined exactly.
+     */
+    public boolean getExact() {
+        return exact;
     }
 
     /**
      * Returns the location of the element.
+     * 
      * @return The location of the element.
      */
     public String getLocation() {
@@ -53,23 +64,16 @@ public class StackTracePackageElement im
 
     /**
      * Returns the version of the element.
+     * 
      * @return the version of the element.
      */
     public String getVersion() {
         return version;
     }
 
-    /**
-     * Returns the indicator of whether this is an exact match.
-     * @return true if the location was determined exactly.
-     */
-    public boolean isExact() {
-        return isExact;
-    }
-
     @Override
     public String toString() {
-        final String exact = isExact ? "" : "~";
-        return exact + '[' + location + ':' + version + ']';
+        final String exactStr = exact ? "" : "~";
+        return exactStr + '[' + location + ':' + version + ']';
     }
 }


Reply via email to