DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-18 13:16 --- David, your guess may be right. If the Introspector does not respect the method signatures and merely relies upon the method name then there is a chance for name collision between the two methods. My developer insists that including indexed getters and setters for the themes form is required by Struts. She says that it is a little known technique that isn't documented but has been recommended in the mailing lists. I'm going to write a test to verify whether or not she is correct. If she's wrong, then let's close this bug as invalid. If not, we may have a tricky problem on our hands. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-18 13:24 --- While I'm working on the test I previously mentioned, I want to point out the definition of an IndexedPropertyDescriptor as put forward in the Java API: An IndexedPropertyDescriptor describes a property that acts like an array and has an indexed read and/or indexed write method to access specific elements of the array. An indexed property may also provide simple non-indexed read and write methods. If these are present, they read and write arrays of the type returned by the indexed read method. I take this to mean that it is perfectly acceptable to have: public ArrayList getThemes() public Theme getThemes(int index) in the same class, the first being a simple non-indexed read and the second the indexed version. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-18 16:02 --- Last night I wrote a utility class to print Instrospector output for a named class. I didn't have time to write a report on my findings. I'll probably do that tonight (after I add some more information to the output). In short, what I saw was, for a class with accessors/setters like in MaintainThemesForm, when I ran it with JDK 1.3.1, it thought themes was an indexed property, and in 1.4.1, it thought it was a non-indexed property. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-18 16:57 --- Created an attachment (id=3880) Simplified test that narrows focus to a simple javabean and the Introspector -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-18 17:02 --- David, After working with my developer on the issue, we have determined that we do indeed need Indexed Property functionality in order to handle the kinds of situations we're coding for in our Struts app. I also created a very simple example of what I now believe is the JDK bug at the root of all this. The example found in IntrospectorTest.jar defines a simple bean with accessor/mutator method conforming to the Indexed Property defined in the JavaBeans 1.01 specification. When you run this example, you'll see something a little different. 1.3.1 and 1.4.1 both recognize the IndexedPropertyDescriptor for the simpleBeans property, but 1.4.1 fails to find the simple read/write methods. I've logged a bug with Sun and hope to hear something back from them soon. As I see it, unless they've officially changed the behavior for the Introspector, this bug lies in their court. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-18 18:12 --- Came across this entry in the Sun Java Bug Database: http://developer.java.sun.com/developer/bugParade/bugs/4641009.html It sounds like it may just be the cause of our problem... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-18 22:13 --- Perhaps I wasn't clear on what I discovered and concluded (partially because I won't be able to write my conclusion until I get home tonight). Let me put it this way: Getting the list of property descriptors for a bean will get one, and only one, property descriptor for each property. A property cannot be both an indexed property and a non-indexed property. If you need both indexed and non-indexed access to an instance variable of a bean, then you'll have to front that instance variable with two different properties with different names. In short, this is not a bug in the JDK, it's a bug in your code. I don't know whether this situation is described in the javabeans specification, but it should be. (Anyone else have an opinion here?) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-18 23:10 --- It is documented in the JavaBeans spec. They are very clear about the fact you CAN have it both ways and in some cases would definitely want to. Why would this work under 1.3.1 and not 1.4.1? Additionally, if you examine my latest sample you'd see that with 1.4.1 you get an IndexedPropertyDescriptor that describes not only indexed write and read methods, but regular write and read methods. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-18 23:24 --- Can you provide a reference in the JavaBeans spec for where this scenario is allowed? I agree with David that what you are doing is specifically *not* allowed. If you have an indexed property, you may also have a single-valued *array* property, but that's all. See section 7.2, Indexed Properties. Your code is using an ArrayList, not an array. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2002-11-19 00:09 --- Martin, thanks for clarifying. Given the past behavior of the Introspector (pre JDK 1.4.1) I took the behavior to include the ArrayList as a possible indexed attribute type. I was further lead to believe this due to the fact that the IndexedPropertyType displayed to me by the IndexedPropertyDescriptor was ArrayList, leading me to believe that everything was kosher. Unfortunately, it looks like the 1.4.1 release does a better job of enforcing the spec but ultimately ties the hands of the developers. ArrayLists are much nicer than simple arrays[]. I kicked this bug report over to invalid. We'll just throttle back to JDK 1.3.1 until we can retrofit our code to cope with the changes in 1.4.1. thanks. jk -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-18 01:45 --- Ok, I haven't fully verified this, but I noticed one thing about the MaintainThemesForm that bothers me. Following this is the signature of the class. public final class MaintainThemesForm extends ActionForm { public ArrayList getThemes(); public Theme getThemes(int i) throws Exception; public void setThemes(ArrayList argThemes); public String getProjectName(); public void setProjectName(String argProjectName); } Notice that there are TWO accessors for the themes property. One will result in an IndexedPropertyDescriptor, and the other will not. I would guess that the move from 1.4.0 to 1.4.1 changed the order of the returned list of PropertyDescriptors. In 1.4.0, it must have ended up with the indexed one first, and in 1.4.1, it was reversed. Nevertheless, I conclude the sample is in error, not beanutils. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-15 18:25 --- Created an attachment (id=3864) source code for problem example -- To unsubscribe, e-mail: mailto:struts-dev-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-dev-help;jakarta.apache.org
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-15 19:06 --- In the PropertyUtils have you tried to change the code to if (IndexedPropertyDescriptor.isInstance(descriptor) ) { (I believe this is right syntax) and see if the problem still exists in 1.4.1 ? -- To unsubscribe, e-mail: mailto:struts-dev-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-dev-help;jakarta.apache.org
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-15 19:40 --- IndexedPropertyDescriptor.isInstance(descriptor) doesn't exist as a method on a class. The existing code in PropertyUtils: (descriptor instanceof IndexPropertyDescriptor) is correct Java syntax. Beyond that, I've debugged into this very block (line 468 of PropertyUtils) and interrogated the descriptors array. All its elements are of type PropertyDescriptor. -- To unsubscribe, e-mail: mailto:struts-dev-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-dev-help;jakarta.apache.org
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-15 19:47 --- isInstance() is a method on the Class class, so I believe the syntax would be: if (descriptor.isInstance(IndexedPropertyDescriptor.class) ) { which isn't quite the same thing, semantically, as using instanceof. -- To unsubscribe, e-mail: mailto:struts-dev-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-dev-help;jakarta.apache.org
DO NOT REPLY [Bug 14603] - Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14603 Switching to JDK 1.4.1 causes IndexOutOfBoundsException on Indexable ActionForm Attributes --- Additional Comments From [EMAIL PROTECTED] 2002-11-15 21:49 --- He did setup a standalone test case and it worked, both uner 1.1 1.4.1 That detail was in his original message on struts-user. -- To unsubscribe, e-mail: mailto:struts-dev-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-dev-help;jakarta.apache.org