xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adelme...@apache.org
Subject svn commit: r674273 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Area.java
Date Sun, 06 Jul 2008 08:46:51 GMT
Author: adelmelle
Date: Sun Jul  6 01:46:50 2008
New Revision: 674273

URL: http://svn.apache.org/viewvc?rev=674273&view=rev
Log:
Simplified implementation of Area.getTraitAsBoolean()

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Area.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Area.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Area.java?rev=674273&r1=674272&r2=674273&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Area.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Area.java Sun Jul  6 01:46:50 2008
@@ -415,17 +415,11 @@
     
     /**
      * Get a boolean trait from this area.
-     * 
      * @param oTraitCode the trait key
      * @return the trait value
      */
     public boolean getTraitAsBoolean(Object oTraitCode) {
-        final Object obj = getTrait(oTraitCode);
-        if (obj instanceof Boolean) {
-            return ((Boolean)obj).booleanValue();
-        } else {
-            return false;
-        }
+        return Boolean.TRUE.equals(getTrait(oTraitCode));
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message