You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Maruan Sahyoun <sa...@fileaffairs.de> on 2019/12/23 14:54:14 UTC

[DISCUSS] Move static functions from COSArrayList

I'd like to remove some of the static functions which work on/return a COSArray from COSArrayList and move these to COSArray.

For 2.x I'd deprecate them. In 3.0 I'd remove them.

Sample of currently used code

 public static COSArray convertStringListToCOSNameCOSArray( List<String> strings )
    {
        COSArray retval = new COSArray();
        for (String string : strings)
        {
            retval.add(COSName.getPDFName(string));
        }
        return retval;
    }

As one can see - there is no relation to COSArrayList

Method naming could propably also be simplified a bit such as COSArray.withCOSNames

WDYT?

BR
Maruan


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: [DISCUSS] Move static functions from COSArrayList

Posted by Andreas Lehmkuehler <an...@lehmi.de>.
Am 25.12.19 um 12:57 schrieb Andreas Lehmkuehler:
> Am 23.12.19 um 15:54 schrieb Maruan Sahyoun:
>> I'd like to remove some of the static functions which work on/return a 
>> COSArray from COSArrayList and move these to COSArray.
>>
>> For 2.x I'd deprecate them. In 3.0 I'd remove them.
>>
>> Sample of currently used code
>>
>>   public static COSArray convertStringListToCOSNameCOSArray( List<String> 
>> strings )
>>      {
>>          COSArray retval = new COSArray();
>>          for (String string : strings)
>>          {
>>              retval.add(COSName.getPDFName(string));
>>          }
>>          return retval;
>>      }
>>
>> As one can see - there is no relation to COSArrayList
>>
>> Method naming could propably also be simplified a bit such as 
>> COSArray.withCOSNames
>>
>> WDYT?
> We have to simplify as much as possible/reasonable. Saying that, I'm pro moving 
> and renaming that methods
In the context of PDFBOX-4954 I moved those methods as proposed but didn't 
remember that we discussed to rename them as well. I've just caught up on the 
renaming.

Andreas

> 
> Andreas
> 
>>
>> BR
>> Maruan
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: [DISCUSS] Move static functions from COSArrayList

Posted by Andreas Lehmkuehler <an...@lehmi.de>.
Am 23.12.19 um 15:54 schrieb Maruan Sahyoun:
> I'd like to remove some of the static functions which work on/return a COSArray from COSArrayList and move these to COSArray.
> 
> For 2.x I'd deprecate them. In 3.0 I'd remove them.
> 
> Sample of currently used code
> 
>   public static COSArray convertStringListToCOSNameCOSArray( List<String> strings )
>      {
>          COSArray retval = new COSArray();
>          for (String string : strings)
>          {
>              retval.add(COSName.getPDFName(string));
>          }
>          return retval;
>      }
> 
> As one can see - there is no relation to COSArrayList
> 
> Method naming could propably also be simplified a bit such as COSArray.withCOSNames
> 
> WDYT?
We have to simplify as much as possible/reasonable. Saying that, I'm pro moving 
and renaming that methods

Andreas

> 
> BR
> Maruan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org