If a java method is called which is overloaded then in certain cases it can happen that more than one compatible is found. Both methods get the same match-value. But actually they are distinguishable.
The example is JAI.create(...)
Called from Python:
JAI.create("filestore", image, 'image.png', 'PNG')
If image is a RenderedImage everything works, but if it is a BufferedImage jpy can't decide which method to call.
This create-method exist in two flavours (actually but only two are of interest).
JAI.create(String, RenderedImage, Object, Object)--> match-value 100, 90,10,10 for BufferedImageJAI.create(String, Object, Object, Object) --> match-value 100, 90,10,10 for BufferedImage
Here the first method should be used because RenderedImage come first in the hierarchy.
If the image is cast to a RenderedImage first then it works.
If a java method is called which is overloaded then in certain cases it can happen that more than one compatible is found. Both methods get the same match-value. But actually they are distinguishable.
The example is
JAI.create(...)
Called from Python:JAI.create("filestore", image, 'image.png', 'PNG')
If image is aRenderedImage
everything works, but if it is aBufferedImage
jpy can't decide which method to call. This create-method exist in two flavours (actually but only two are of interest).JAI.create(String, RenderedImage, Object, Object)
--> match-value 100, 90,10,10 forBufferedImage
JAI.create(String, Object, Object, Object)
--> match-value 100, 90,10,10 forBufferedImage
Here the first method should be used becauseRenderedImage
come first in the hierarchy.If the image is cast to a
RenderedImage
first then it works.