[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] Commented: (XMLBEANS-131) XmlBeans ant task throws ArrayIndexOutOfBoundsException
From:       "Roshan Punnoose (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2005-03-24 15:24:27
Message-ID: 1719354658.1111677867286.JavaMail.jira () ajax ! apache ! org
[Download RAW message or body]

     [ http://issues.apache.org/jira/browse/XMLBEANS-131?page=comments#action_61492 ]
     
Roshan Punnoose commented on XMLBEANS-131:
------------------------------------------

Actually, after looking at the code again I found out the real problem. The function \
I had was overloading another function, and XMLbeans seemed to only take into account \
the number of parameters in the first function.

Interface Code:

public Foo createFoo(String identifier);
	
public Foo createFoo(String identifier, String href);

Handler Code:

public static Foo createFoo(XmlObject xo, String identifier){
		return null;
	}
public static Foo createFoo(XmlObject xo, String identifier, String href){
		return null;
	}

In the generation of the source, I get an ArrayIndexOutofBoundsException: 2. Which \
probably means that XMLBeans is only counting the number of parameters in the first \
function with one parameter, and not the second function with 2 parameters.

> XmlBeans ant task throws ArrayIndexOutOfBoundsException
> -------------------------------------------------------
> 
> Key: XMLBEANS-131
> URL: http://issues.apache.org/jira/browse/XMLBEANS-131
> Project: XMLBeans
> Type: Bug
> Components: Binding
> Versions: Version 2 Beta 1
> Environment: Windows XP
> jdk 1.4.06
> ant 1.6
> Reporter: Roshan Punnoose

> 
> I am using the XMLBeans 2.0 beta. Specifically I am using the Extensions capability \
> that is built in with this version. If I have a function with more than 2 \
> parameters, for example: public EventRef createEventRef(String identifier, String \
> href, String temp); in my interface and handler, the xmlbeans ant task to generate \
>                 a jar file will throw this error:
> java.lang.ArrayIndexOutOfBoundsException: 2
> If I take the String temp out:
> public EventRef createEventRef(String identifier, String href);
> it works perfectly.
> Thank You.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic