valerybokov commented on pull request #107: URL: https://github.com/apache/pdfbox/pull/107#issuecomment-841778448
COSArrayList. When you add the first element, you refresh the parentDict field (set to "array"). When you clear the COSArrayList instance, you do the same (set to null). I can't understand why you don't do the same for removeAll, remove, retainAll for the empty collection case (need to check "array.isEmpty ()")? Maybe it cannot be empty. I mean, without refreshing the parentDict field for these cases. What if only first item will be removed (need to refresh a value from parentDict)? Second question is why should COSArray.removeAll method not work like COSArrayList.removeAll? I mean the first part of the COSArrayList.removeAll method where the items are removed from the COSArray. You are converting COSArray elements using the getObject method, why don't you use this code in COSArray.removeAll? -- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
