]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Removed unnecessary cast as per Finn's suggestion.
authorJeremias Maerki <jeremias@apache.org>
Thu, 6 Jan 2005 13:18:43 +0000 (13:18 +0000)
committerJeremias Maerki <jeremias@apache.org>
Thu, 6 Jan 2005 13:18:43 +0000 (13:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198238 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java

index 46cb225f7cde079be1e01fba2e6978badc362ee2..83c4f46a45778e93d8972d45c3eee844a89b60cc 100644 (file)
@@ -45,18 +45,17 @@ public class BoxPropShorthandParser extends GenericShorthandParser {
                                                PropertyMaker maker,
                                                PropertyList propertyList)
                 throws PropertyException {
-        ListProperty listProperty = (ListProperty)property;
         String name = FOPropertyMapping.getPropertyName(propId);
         Property p = null;
-        int count = listProperty.getList().size();
+        int count = property.getList().size();
         if (name.indexOf("-top") >= 0) {
-            p = getElement(listProperty, 0);
+            p = getElement(property, 0);
         } else if (name.indexOf("-right") >= 0) {
-            p = getElement(listProperty, count > 1 ? 1 : 0);
+            p = getElement(property, count > 1 ? 1 : 0);
         } else if (name.indexOf("-bottom") >= 0) {
-            p = getElement(listProperty, count > 2 ? 2 : 0);
+            p = getElement(property, count > 2 ? 2 : 0);
         } else if (name.indexOf("-left") >= 0) {
-            p = getElement(listProperty, count > 3 ? 3 : (count > 1 ? 1 : 0));
+            p = getElement(property, count > 3 ? 3 : (count > 1 ? 1 : 0));
         }
         // if p not null, try to convert it to a value of the correct type
         if (p != null) {