You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Rolf Schumacher (JIRA)" <xm...@xml.apache.org> on 2005/03/13 13:01:52 UTC
[jira] Commented: (XMLBEANS-127) jdk1.5 compliance
[ http://issues.apache.org/jira/browse/XMLBEANS-127?page=comments#action_60717 ]
Rolf Schumacher commented on XMLBEANS-127:
------------------------------------------
Hi, Jacob, thanks for your annotation. Unfortunately, it's not as convenient as I hoped for.
I did as you recommended: attributed my ant target based on "org.apache.xmlbeans.impl.tool.XMLBean" with javasource="1.5" in order generate my schema based xmlBeans sources.
Usually I do compile with "-Xlint:unchecked" in order to get maximum quality at source code level.
It's not a problem to avoid the massive warnings attack from javac: I have to separate the schema induced xmlBeans sources from my project and have to compile them apart without -Xlint:unchecked.
It's just inconvenient and I thought /javasource="1.5"/ is supposed to fulfil that gap. But it didn't. And from what you've admitted it seems not be a fault in my thinking.
I can live with my workaround.
Rolf
> jdk1.5 compliance
> -----------------
>
> Key: XMLBEANS-127
> URL: http://issues.apache.org/jira/browse/XMLBEANS-127
> Project: XMLBeans
> Type: Improvement
> Components: Compiler
> Versions: Version 2
> Environment: linux
> Reporter: Rolf Schumacher
> Priority: Minor
>
> I would recommend to generate Array access slightly different from what it is now:
> 1 /**
> 2 * Gets array of all "MyElement" elements
> 3 */
> 4 public mypackage.x2004.mySchema.MyElementDocument.MyElement[] getMyElementArray()
> 5 {
> 6 synchronized (monitor())
> 7 {
> 8 check_orphaned();
> 9 java.util.List<mypackage.x2004.mySchema.MyElementDocument.MyElement> targetList =
> new java.util.ArrayList<mypackage.x2004.mySchema.MyElementDocument.MyElement>();
> 10 get_store().find_all_element_users(MYELEMENT$0, targetList);
> 11 mypackage.x2004.mySchema.MyElementDocument.MyElement[] result =
> new mypackage.x2004.mySchema.MyElementDocument.MyElement[targetList.size()];
> 12 targetList.toArray(result);
> 13 return result;
> 14 }
> 15 }
> as opposed to
> 9 java.util.List targetList = new java.util.ArrayList();
> Rolf
--
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