You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/01/06 12:09:03 UTC

cvs commit: xml-fop/src/java/org/apache/fop/fo/properties BoxPropShorthandParser.java

jeremias    2005/01/06 03:09:03

  Modified:    src/java/org/apache/fop/fo/properties
                        BoxPropShorthandParser.java
  Log:
  convertValueForProperty didn't have the right signature and therefore didn't override the superclass implementation.
  
  Revision  Changes    Path
  1.3       +5 -5      xml-fop/src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java
  
  Index: BoxPropShorthandParser.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BoxPropShorthandParser.java	28 Oct 2004 10:00:24 -0000	1.2
  +++ BoxPropShorthandParser.java	6 Jan 2005 11:09:03 -0000	1.3
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 1999-2004 The Apache Software Foundation.
  + * Copyright 1999-2005 The Apache Software Foundation.
    * 
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -41,11 +41,11 @@
        * int, ListProperty, PropertyMaker, PropertyList)
        */
       protected Property convertValueForProperty(int propId,
  -                                               ListProperty listProperty,
  +                                               Property property,
                                                  PropertyMaker maker,
                                                  PropertyList propertyList)
  -        throws PropertyException
  -    {
  +                throws PropertyException {
  +        ListProperty listProperty = (ListProperty)property;
           String name = FOPropertyMapping.getPropertyName(propId);
           Property p = null;
           int count = listProperty.getList().size();
  
  
  

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


Re: cvs commit: xml-fop/src/java/org/apache/fop/fo/properties BoxPropShorthandParser.java

Posted by Jeremias Maerki <de...@greenmail.ch>.
Sorry. Still learning. Thanks for paying attention. Fixed.

On 06.01.2005 13:33:08 Finn Bock wrote:
> jeremias@apache.org wrote:
> 
> >   Log:
> >   convertValueForProperty didn't have the right signature and
> >   therefore didn't override the superclass implementation.
> 
> That was sloppy of me. Thanks for finding and fixing it.
> 
> >   +        ListProperty listProperty = (ListProperty)property;
> 
> That is a no-no. Properties should not be casted but only be coerced 
> using the getXXX methods.
> 
> And the getList() method is already defined on Property so no cast is 
> needed.
> 
> Using casts will prevent us from adding property proxies, which i 
> suspect will be needed.



Jeremias Maerki


Re: cvs commit: xml-fop/src/java/org/apache/fop/fo/properties BoxPropShorthandParser.java

Posted by Glen Mazza <gr...@yahoo.com>.
--- Finn Bock <bc...@worldonline.dk> wrote:
>
> 
> Using casts will prevent us from adding property
> proxies, which i 
> suspect will be needed.
> 

<head-scratch/> What's a "property proxy"?  Can you 
elaborate on that--give a simple scenario of it?

Thanks,
Glen



Re: cvs commit: xml-fop/src/java/org/apache/fop/fo/properties BoxPropShorthandParser.java

Posted by Finn Bock <bc...@worldonline.dk>.
jeremias@apache.org wrote:

>   Log:
>   convertValueForProperty didn't have the right signature and
>   therefore didn't override the superclass implementation.

That was sloppy of me. Thanks for finding and fixing it.

>   +        ListProperty listProperty = (ListProperty)property;

That is a no-no. Properties should not be casted but only be coerced 
using the getXXX methods.

And the getList() method is already defined on Property so no cast is 
needed.

Using casts will prevent us from adding property proxies, which i 
suspect will be needed.

regards,
finn