On 3 September 2016 at 17:38, Benedikt Ritter <benerit...@gmail.com> wrote: > sebb <seb...@gmail.com> schrieb am Sa., 3. Sep. 2016 um 15:29 Uhr: > >> On 3 September 2016 at 13:14, Benedikt Ritter <brit...@apache.org> wrote: >> > Hi Damjan, >> > >> > nice you're back. I think there is only one thing left before 1.0 can ne >> > released and that is the findbugs violations. They are mainly about >> > exposure of internal state because the public API accepts byte arrays as >> > input parameter. An easy way to fix this would be to copy the arrays. >> But I >> > think that would be very bad for Performance... >> >> On the other hand, if the existing API is kept, it's not going to be >> possible to easily change the design without breaking compatibility. >> >> The more internal state is exposed, the harder it is to change code in >> the future. >> And the harder it is to fully test the code. >> >> I've not looked at the code recently, but would it be possible to wrap >> the byte array in an object, and only provide access via methods? >> > > Could you elaborate some more how that would like? If users have to create > the wrapper object they would still have the reference to the byte array > passed to the wrapper.
Yes, they would have the reference to the byte array, unless it was copied by the wrapper. But even if it was not copied, at least the array would not be exposed elsewhere in the code. This makes it much easier to debug. > >> >> It would be fairly easy to replace individual entry reads and writes >> with getters and setters, but that might be too expensive for some >> operations. >> Depending on how many other such operations there are it might be >> possible to provide other methods for them. >> >> > Regards, >> > Benedikt >> > >> > Damjan Jovanovic <dam...@apache.org> schrieb am Sa., 3. Sep. 2016 um >> 11:42: >> > >> >> Hi >> >> >> >> I am back to contributing to Commons Imaging. >> >> >> >> Will start with some cleanups, like try-with-resources instead of >> >> IoUtils.closeQuietly(). >> >> >> >> Java and Maven are a heaven send after working in C++ and make with >> Apache >> >> OpenOffice. >> >> >> >> Regards >> >> Damjan >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org >> For additional commands, e-mail: dev-h...@commons.apache.org >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org