THausherr commented on PR #107:
URL: https://github.com/apache/pdfbox/pull/107#issuecomment-1179741986

   > > existing code is better IMHO. And whoever wrote this, intended to use an 
array instead of a list.
   > 
   > You are converting an array to a list in the getXRefRanges method. You use 
more memory and time to do this. I just removed the redundant operation. You 
are used to using lists. Only on this occasion you say that the existing code 
is better.
   
   getXRefRanges() starts with a list when it calls `new ArrayList<>()`. The 
current code converts this to an array at the end with `return list.toArray(new 
Long[list.size()]);` and loses the list.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to