Closed glassfishrobot closed 14 years ago
Reported by goonie
kohsuke said: This behavior is governed by the spec, and unfortunately it's just too late for the spec to change now.
In terms of the user experience, thanks to auto-boxing, I don't think this will be a real issue for people. Is the problem that you are using Introspector and it's missing the property?
goonie said: In this specific case, the object mapper "Dozer" misses the getter and needs to be configured with exception rules for each Boolean property.
Each framework or application that deals with JavaBeans (POJOs) will fail. A very common case will be implementations of the javax.persistence API, like Hibernate.
What's an early access good for, if there cannot be changes any more? This is a rather un-intrusive change, you could even allow for backwards compatibility if you fear that already existing implementations will fail.
I don't understand your argument of auto-boxing. Method invocations are not auto-boxed (by Java5). Could you explain?
kohsuke said: Yes, early accesses are to solicit feedback, and we've been doing just that for the past year or more. But it's also true that we have to stop accepting feedback and ship at some point, or otherwise we can never ship anything. And unfortunately, that time is now.
I don't know if you've seen this or not, but we just released the release candidate of the RI, and the spec has already or is shortly going to go for the final vote in JCP. So the kind of fixes we can make at this point for 2.0 is fairly limited, and this is clearly not one of them, since this is very much an intrusive change — any change that makes a difference in the generate signature is an intrusive change.
I re-opened issue for 2.0.1 as an RFE to see if there's anything we can do. But the thing is, since the spec decides the signature that we generate, we can't really just "fix" this in the RI. There's a backward compatibility aspect, too — if we change the generated signature, it causes a trouble to a lot of people.
But perhaps you (or someone) might be able to write a plugin to fix this, or we might be able to have a vendor-extension customization.
The reason I mentioned auto-boxing is that you can write:
boolean b = foo.isBar();
even if isBar returns Boolean.
kohsuke said: Linking related topics: http://forums.java.net/jive/thread.jspa?threadID=15779
gturner@java.net said: FYI for anyone stumbling upon this bug, here's a work-around. Pass your Schema through the following XSLT before XJC:
<xsl:stylesheet xmlns="...target namespace here..." xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan" version="1.0" exclude-result-prefixes="xalan">
snajper said: This is already fixed for 2.2 (so that we don't break compatibility for 2.1.x line).
snajper said: reopening to close with correct status
snajper said: We are not allowed to deliver the fix to 2.2 because of compatibility reasons.
snajper said:
snajper said: Added -enableIntrospection switch to XJC.
snajper said: Re-closing with proper status.
Issue-Links: duplicates JAX_WS-922
Was assigned to jaxb-issues
This issue was imported from java.net JIRA JAXB-131
Marked as fixed on Thursday, April 15th 2010, 12:12:16 am
I'm not sure about the subcomponent; please re-assign if possible.
JAXB 2.0 (used by XFire JAXB binding) generates getters for Boolean (wrapper type) with "is", rather than "get".
AFAIK the JavaBeans spec only defines "is" for boolean, not Boolean.
Environment
Operating System: All Platform: All
Affected Versions
[2.0 EA1]