BufferedImage documentation inconsistent with implementation

Martin Desruisseaux martin.desruisseaux at geomatys.com
Tue Apr 18 09:34:30 UTC 2023


Thanks, I opened a pull request with proposed wording:

https://github.com/openjdk/jdk/pull/13506

Note that it contains one specification change. As said in my previous 
email, the specification is inconsistent with the implementation 
regarding the exception type. I presumed that we want to keep the 
current implementation behavior.

I do not have the power to create new issue on 
https://bugs.openjdk.org/. How can we proceed for that step?

     Thanks,

         Martin


Le 13/04/2023 à 23:38, Philip Race a écrit :

> A BufferedImage is a single always writable Tile.
>
> The method that is most questionable is releaseWritableTile(int, int) 
> being a no-op.
> It doesn't even throw an AAIOB if you pass in something other than (0,0)
> It probably should have a clause
>
> "This method is a no-op and immediately returns without checking the 
> passed values
> since a BufferedImage has only a single tile which is always writable."
>
> The observer methods could also benefit from doc that observers will 
> never be added or
> removed (no-op methods) since there will never any events to dispatch.
> So there's no point in adding real support for listeners.
>
> I think the doc on isTileWritable is well-intentioned but not well-worded.
>
> -phil




More information about the client-libs-dev mailing list