-
1. Re: Inconsistency with primitive wrappers and prop-editors
sebersole Aug 5, 2005 1:03 PM (in response to sebersole)of course trimmed.size() should be timmed.length() ;)
-
2. Re: Inconsistency with primitive wrappers and prop-editors
starksm64 Aug 5, 2005 1:52 PM (in response to sebersole)If we are going to go in this direction we should have a consistent ability to represent null for all types. Arguably, one has to deal with nulls unless primatives are used.
My concern is that there is a layer where a property editor is being used to convert a string to an invocation payload value where the signature actually is a primative type. The wrapper is only being used because its required by the reflection/invocation layer.
The general way we treat such evolutionary changes is to allow for the new behavior to be disable via system properties, with the default behavior being the new, more useful one. -
3. Re: Inconsistency with primitive wrappers and prop-editors
sebersole Aug 6, 2005 8:16 AM (in response to sebersole)So then should I revert back to exposing everything as String in the
HibernateMBean?
If you point me in the right direction, I'll take a look at this as it irks me that this is such unintuative behavior.... -
4. Re: Inconsistency with primitive wrappers and prop-editors
adrian.brock Aug 6, 2005 1:35 PM (in response to sebersole)See: http://jira.jboss.com/jira/browse/JBAS-2084
Can you give it a try to make sure it solves your problem.
I only did it for the primitive types with a system property to disable it, although
I can't see why it would break existing code?
I'm loath to add it to the other editors until the PropertyEditor usage is better defined.
Another example is the microcontainer where there is a difference between null and the empty
string.<property name="aString"/> <!-- the empty string --> <property name="aString"></property> <!-- the empty string --> <property name="aString"><value/></property> <!-- the empty string --> <property name="aString"><value></value></property> <!-- the empty string --> <property name="aString"><null/></property> <!-- a null string -->
-
5. Re: Inconsistency with primitive wrappers and prop-editors
adrian.brock Aug 6, 2005 1:58 PM (in response to sebersole)And of course a string that contains the characters 'n' 'u' 'l' 'l'
<property name="aString">null</property> <!-- new String("null"); -->
-
6. Re: Inconsistency with primitive wrappers and prop-editors
sebersole Aug 7, 2005 12:00 AM (in response to sebersole)Ah dude, I was willing to do the work ;)
I was just refering to pointing me in the direction of the "layer" that might be problematic so that I could verify that the changes would not screw it.
Anyway, thanks. I'll test it out. -
7. Re: Inconsistency with primitive wrappers and prop-editors
adrian.brock Aug 8, 2005 9:36 AM (in response to sebersole)"steve.ebersole@jboss.com" wrote:
Ah dude, I was willing to do the work ;)
I was just refering to pointing me in the direction of the "layer" that might be problematic so that I could verify that the changes would not screw it.
Anyway, thanks. I'll test it out.
Sometimes (when the approach is agreed) it is easier to JFDI than explain it :-) -
8. Re: Inconsistency with primitive wrappers and prop-editors
sebersole Aug 10, 2005 10:58 PM (in response to sebersole)I modified the inspectMBean.jsp used in the jmx-console to also handle null boolean values for the java.lang.Boolean wrapper. The changes you made seem to be working :)
So two things:
1) There was some discussion on the dev list as to what the label should be for this particular (null) radio box. I went with 'Null' as that was the only option expressed in that discussion.
2) Currently I just duplicated the lookup of the 'org.jboss.util.property.disablenull' property in the JSP since it is not exposed from PropertyEditors. Is that OK? Or should I expose it from PropertyEditors? -
9. Re: Inconsistency with primitive wrappers and prop-editors
starksm64 Aug 11, 2005 12:10 AM (in response to sebersole)1) fine.
2) I would expose it from the PropertyEditors class.