-
Bug
-
Resolution: Fixed
-
P2
-
1.2.2, 1.3.0
-
None
-
beta
-
generic
-
generic
RenderingHints.Key() keeps it's own list of used Identity values, but
gives users no way of figuring out which values are used and which aren't
other than to try to construct one and catch the exception.
This is particularly serious when working with applets. JAI creates
4 or 5 RnederingHint.Keys when it's loaded. If the JAI class gets loaded twice (which happens if a user hits the reload button), JAI tries to register the hints a second time. This throws an ExceptioninInitializerError which prevents the JAI class from being loaded (effectively killing any applet using JAI). Ideally, we could query the RenderingHints.Key
class to find out if the JAI hints were already registered and access them if
they were, but the table is private so we can't get at it. As it is we
may have to either generate random Identity values which is ugly because the hint identities will vary in different runs (and between a server and a client without some sort of negotiation).
What we need is:
RenderingHints.Key.isIdentityUsed() and
RenderingHints.Key.getKeyByIdentity()
Alternatively, a null RenderingHints() constructor would allow us to create
a RenderingHintsJAI class that managed its own ID's. In any event,
we need this addressed in order to ever get JAI running in an applet.
gives users no way of figuring out which values are used and which aren't
other than to try to construct one and catch the exception.
This is particularly serious when working with applets. JAI creates
4 or 5 RnederingHint.Keys when it's loaded. If the JAI class gets loaded twice (which happens if a user hits the reload button), JAI tries to register the hints a second time. This throws an ExceptioninInitializerError which prevents the JAI class from being loaded (effectively killing any applet using JAI). Ideally, we could query the RenderingHints.Key
class to find out if the JAI hints were already registered and access them if
they were, but the table is private so we can't get at it. As it is we
may have to either generate random Identity values which is ugly because the hint identities will vary in different runs (and between a server and a client without some sort of negotiation).
What we need is:
RenderingHints.Key.isIdentityUsed() and
RenderingHints.Key.getKeyByIdentity()
Alternatively, a null RenderingHints() constructor would allow us to create
a RenderingHintsJAI class that managed its own ID's. In any event,
we need this addressed in order to ever get JAI running in an applet.
- duplicates
-
JDK-4819857 Exception is thrown due to RenderingKey already registered with JRE 1.3.x
-
- Closed
-