You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by Kurt Roy <kr...@prospricing.com> on 2007/07/30 22:50:58 UTC

Getting deprecatrion warnings when compiling generated xmlbean classes.

Hello,

 

When compiling generated XmlBeans classes, we always get deprecation
warnings such as the following:

 

[javacwithoverlap]
C:\prosrm\build\tmp\src\com\prosrm\ui\web\datainterface\xmlbeans\impl\Dr
illdownXmlBeanImpl.java:146: warning: [deprecation]
set(java.lang.String) in org.apache.xmlbeans.SimpleValue has been
deprecated

[javacwithoverlap]     public static class DimLevelImpl extends
org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements
com.prosrm.ui.web.datainterface

.xmlbeans.DrilldownXmlBean.DimLevel

[javacwithoverlap]                   ^

[javacwithoverlap]
C:\prosrm\build\tmp\src\com\prosrm\ui\web\datainterface\xmlbeans\impl\Dr
illdownXmlBeanImpl.java:146: warning: [deprecation] objectValue() in

org.apache.xmlbeans.SimpleValue has been deprecated

[javacwithoverlap]     public static class DimLevelImpl extends
org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements
com.prosrm.ui.web.datainterface

.xmlbeans.DrilldownXmlBean.DimLevel

[javacwithoverlap]                   ^

 

 

It seems that most if not all deprecation warnings are generated from
internal xmlbeans class org.apache.xmlbeans.SimpleValue. 

 

We tried with XmlBeans 2.2.0 and setting source generation to java 1.5
(defaults to 1.4). We also tried XmlBeans 2.3.0.

 

Is there any way (besides turning off deprecation warnings on javac) to
make these go away? 

 

Here is the xsd fragment:

 

  <xsd:complexType name="parameters" mixed="false">

    <xsd:annotation>

      <xsd:documentation>Data Communication
parameters.</xsd:documentation>

    </xsd:annotation>

    <xsd:sequence>

      . . .

      <xsd:element name="drilldown" type="comm:drilldown" minOccurs="0"
maxOccurs="1"/>

 

. . .

 

  <xsd:complexType name="drilldown" mixed="false">

    <xsd:annotation>

      <xsd:documentation>Data Communication drill down
parameters.</xsd:documentation>

    </xsd:annotation>

    <xsd:sequence>

      <xsd:element name="dimLevel" minOccurs="1" maxOccurs="unbounded">

        <xsd:complexType>

          <xsd:attribute name="column" form="unqualified"
type="xsd:string" use="required"/>

          <xsd:attribute name="value" form="unqualified"
type="xsd:string" use="required"/>

        </xsd:complexType>

      </xsd:element>

    </xsd:sequence>

  </xsd:complexType>

 

Thanks,

Kurt Roy | PROS | Software Architect, Software Development
phone: +1 713-335-8007 | email: kroy@prospricing.com 

Save the Date for the 14th Annual PROS Summit * April 20-23, 2008 at the
Hilton Americas Hotel in Houston, Texas * www.prospricing.com
<http://www.prospricing.com/> 

 



The information contained in this email may be confidential and/or legally privileged. It has been sent for the sole use of the intended recipient(s). If the reader of this message is not an intended recipient, you are hereby notified that any unauthorized review, use, disclosure, dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please contact the sender by reply email and destroy all copies of the original message. Thank you



RE: Getting deprecatrion warnings when compiling generated xmlbean classes.

Posted by Radu Preotiuc-Pietro <ra...@bea.com>.
I have looked at this a little bit and here are my findings:

SimpleValue.java declares methods like "objectValue()" which have been
deprecated and replaced with "getObjectValue()", but XmlObjectBase
(which implements SimpleValue) does not have @deprecated on the
implementation for these methods. Now, the JDK1.4 compiler doesn't mind,
but the JDK 1.5 one gives deprecation warnings, even for classes that
extend XmlObjectBase without overriding any of the deprecated methods.
That seems a little surprising to me, but this is what happens.

So the fix is to change XmlObjectBase and mark all those methods as
deprecated. This is something that I could do, but not right away. So if
you would take a stab at making this change in your "local" copy of
XmlBeans, Kurt, that will help us confirm that this is the right fix for
you.

Thanks,
Radu

On Tue, 2007-07-31 at 15:57 -0500, Kurt Roy wrote:
> Hello,
> 
>  
> 
> Please let me clarify – 
> 
>  
> 
> The deprecation warnings are coming from the generated XmlBeans
> classes when they are compiled – not from our application code that
> uses the generated classes.
> 
>  
> 
> We have been using XmlBeans for about 6 mos now. People are hapy with
> it,  and are really starting to use it in many of our applications.
> Unfortunately, because of this, we are generating more than 10,000
> warnings nightly because of this. We always compile with the option to
> display warnings, and fix anything that generates them as part of our
> continuous integration program. 
> 
>  
> 
> Is there any way to stop this short of turning off deprecation
> warnings on the compile? Our Architecture team is vehemently opposed
> to this solution. 
> 
>  
> 
> In fact, we are open to the possibility of allocating resources to fix
> this problem in XmlBeans if it is indeed a problem.
> 
>  
> 
> Thanks for your time and support.
> 
> Kurt Roy | PROS | Software Architect, Software Development
> phone: +1 713-335-8007 | email: kroy@prospricing.com 
> 
> Save the Date for the 14th Annual PROS Summit• April 20-23, 2008 at
> the Hilton Americas Hotel in Houston, Texas • www.prospricing.com
> 
>                                    
> ______________________________________________________________________
> From: Radu Preotiuc-Pietro [mailto:radup@bea.com] 
> Sent: Monday, July 30, 2007 4:45 PM
> To: dev@xmlbeans.apache.org
> Subject: RE: Getting deprecatrion warnings when compiling generated
> xmlbean classes.
> 
> 
>  
> 
> It is because in SimpleValue.java we have replaced all the methods of
> the form "intValue()" with "getValueAsInt()", but we have not removed
> the old values so that code that is using those doesn't need to
> change. I am thinking maybe someday we will remove those, but in the
> meantime I reccomend turning the deprecation warnings off...
> 
>  
> 
> Radu
> 
>          
>         
>                                        
>         ______________________________________________________________
>         From: Kurt Roy [mailto:kroy@prospricing.com] 
>         Sent: Monday, July 30, 2007 1:51 PM
>         To: dev@xmlbeans.apache.org
>         Subject: Getting deprecatrion warnings when compiling
>         generated xmlbean classes.
>         
>         Hello,
>         
>          
>         
>         When compiling generated XmlBeans classes, we always get
>         deprecation warnings such as the following:
>         
>          
>         
>         [javacwithoverlap] C:\prosrm\build\tmp\src\com\prosrm\ui\web
>         \datainterface\xmlbeans\impl\DrilldownXmlBeanImpl.java:146:
>         warning: [deprecation] set(java.lang.String) in
>         org.apache.xmlbeans.SimpleValue has been deprecated
>         
>         [javacwithoverlap]     public static class DimLevelImpl
>         extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl
>         implements com.prosrm.ui.web.datainterface
>         
>         .xmlbeans.DrilldownXmlBean.DimLevel
>         
>         [javacwithoverlap]                   ^
>         
>         [javacwithoverlap] C:\prosrm\build\tmp\src\com\prosrm\ui\web
>         \datainterface\xmlbeans\impl\DrilldownXmlBeanImpl.java:146:
>         warning: [deprecation] objectValue() in
>         
>         org.apache.xmlbeans.SimpleValue has been deprecated
>         
>         [javacwithoverlap]     public static class DimLevelImpl
>         extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl
>         implements com.prosrm.ui.web.datainterface
>         
>         .xmlbeans.DrilldownXmlBean.DimLevel
>         
>         [javacwithoverlap]                   ^
>         
>          
>         
>          
>         
>         It seems that most if not all deprecation warnings are
>         generated from internal xmlbeans class
>         org.apache.xmlbeans.SimpleValue. 
>         
>          
>         
>         We tried with XmlBeans 2.2.0 and setting source generation to
>         java 1.5 (defaults to 1.4). We also tried XmlBeans 2.3.0.
>         
>          
>         
>         Is there any way (besides turning off deprecation warnings on
>         javac) to make these go away? 
>         
>          
>         
>         Here is the xsd fragment:
>         
>          
>         
>           <xsd:complexType name="parameters" mixed="false">
>         
>             <xsd:annotation>
>         
>               <xsd:documentation>Data Communication
>         parameters.</xsd:documentation>
>         
>             </xsd:annotation>
>         
>             <xsd:sequence>
>         
>               . . .
>         
>               <xsd:element name="drilldown" type="comm:drilldown"
>         minOccurs="0" maxOccurs="1"/>
>         
>          
>         
>         . . .
>         
>          
>         
>           <xsd:complexType name="drilldown" mixed="false">
>         
>             <xsd:annotation>
>         
>               <xsd:documentation>Data Communication drill down
>         parameters.</xsd:documentation>
>         
>             </xsd:annotation>
>         
>             <xsd:sequence>
>         
>               <xsd:element name="dimLevel" minOccurs="1"
>         maxOccurs="unbounded">
>         
>                 <xsd:complexType>
>         
>                   <xsd:attribute name="column" form="unqualified"
>         type="xsd:string" use="required"/>
>         
>                   <xsd:attribute name="value" form="unqualified"
>         type="xsd:string" use="required"/>
>         
>                 </xsd:complexType>
>         
>               </xsd:element>
>         
>             </xsd:sequence>
>         
>           </xsd:complexType>
>         
>          
>         
>         Thanks,
>         
>         Kurt Roy | PROS | Software Architect, Software Development
>         phone: +1 713-335-8007 | email: kroy@prospricing.com 
>         
>         Save the Date for the 14th Annual PROS Summit• April 20-23,
>         2008 at the Hilton Americas Hotel in Houston, Texas •
>         www.prospricing.com
>         
>          
>         
>                                        
>         ______________________________________________________________
>         The information contained in this email may be confidential
>         and/or legally privileged. It has been sent for the sole use
>         of the intended recipient(s). If the reader of this message is
>         not an intended recipient, you are hereby notified that any
>         unauthorized review, use, disclosure, dissemination,
>         distribution, or copying of this communication, or any of its
>         contents, is strictly prohibited. If you have received this
>         communication in error, please contact the sender by reply
>         email and destroy all copies of the original message. Thank
>         you
>         
>         
> 
> Notice: This email message, together with any attachments, may contain
> information of BEA Systems, Inc., its subsidiaries and affiliated
> entities, that may be confidential, proprietary, copyrighted and/or
> legally privileged, and is intended solely for the use of the
> individual or entity named in this message. If you are not the
> intended recipient, and have received this message in error, please
> immediately return this by email and then delete it.

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

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


RE: Getting deprecatrion warnings when compiling generated xmlbean classes.

Posted by Kurt Roy <kr...@prospricing.com>.
Hello,

 

Please let me clarify - 

 

The deprecation warnings are coming from the generated XmlBeans classes
when they are compiled - not from our application code that uses the
generated classes.

 

We have been using XmlBeans for about 6 mos now. People are hapy with
it,  and are really starting to use it in many of our applications.
Unfortunately, because of this, we are generating more than 10,000
warnings nightly because of this. We always compile with the option to
display warnings, and fix anything that generates them as part of our
continuous integration program. 

 

Is there any way to stop this short of turning off deprecation warnings
on the compile? Our Architecture team is vehemently opposed to this
solution. 

 

In fact, we are open to the possibility of allocating resources to fix
this problem in XmlBeans if it is indeed a problem.

 

Thanks for your time and support.

Kurt Roy | PROS | Software Architect, Software Development
phone: +1 713-335-8007 | email: kroy@prospricing.com 

Save the Date for the 14th Annual PROS Summit * April 20-23, 2008 at the
Hilton Americas Hotel in Houston, Texas * www.prospricing.com
<http://www.prospricing.com/> 

________________________________

From: Radu Preotiuc-Pietro [mailto:radup@bea.com] 
Sent: Monday, July 30, 2007 4:45 PM
To: dev@xmlbeans.apache.org
Subject: RE: Getting deprecatrion warnings when compiling generated
xmlbean classes.

 

It is because in SimpleValue.java we have replaced all the methods of
the form "intValue()" with "getValueAsInt()", but we have not removed
the old values so that code that is using those doesn't need to change.
I am thinking maybe someday we will remove those, but in the meantime I
reccomend turning the deprecation warnings off...

 

Radu

	 

	
________________________________


	From: Kurt Roy [mailto:kroy@prospricing.com] 
	Sent: Monday, July 30, 2007 1:51 PM
	To: dev@xmlbeans.apache.org
	Subject: Getting deprecatrion warnings when compiling generated
xmlbean classes.

	Hello,

	 

	When compiling generated XmlBeans classes, we always get
deprecation warnings such as the following:

	 

	[javacwithoverlap]
C:\prosrm\build\tmp\src\com\prosrm\ui\web\datainterface\xmlbeans\impl\Dr
illdownXmlBeanImpl.java:146: warning: [deprecation]
set(java.lang.String) in org.apache.xmlbeans.SimpleValue has been
deprecated

	[javacwithoverlap]     public static class DimLevelImpl extends
org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements
com.prosrm.ui.web.datainterface

	.xmlbeans.DrilldownXmlBean.DimLevel

	[javacwithoverlap]                   ^

	[javacwithoverlap]
C:\prosrm\build\tmp\src\com\prosrm\ui\web\datainterface\xmlbeans\impl\Dr
illdownXmlBeanImpl.java:146: warning: [deprecation] objectValue() in

	org.apache.xmlbeans.SimpleValue has been deprecated

	[javacwithoverlap]     public static class DimLevelImpl extends
org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements
com.prosrm.ui.web.datainterface

	.xmlbeans.DrilldownXmlBean.DimLevel

	[javacwithoverlap]                   ^

	 

	 

	It seems that most if not all deprecation warnings are generated
from internal xmlbeans class org.apache.xmlbeans.SimpleValue. 

	 

	We tried with XmlBeans 2.2.0 and setting source generation to
java 1.5 (defaults to 1.4). We also tried XmlBeans 2.3.0.

	 

	Is there any way (besides turning off deprecation warnings on
javac) to make these go away? 

	 

	Here is the xsd fragment:

	 

	  <xsd:complexType name="parameters" mixed="false">

	    <xsd:annotation>

	      <xsd:documentation>Data Communication
parameters.</xsd:documentation>

	    </xsd:annotation>

	    <xsd:sequence>

	      . . .

	      <xsd:element name="drilldown" type="comm:drilldown"
minOccurs="0" maxOccurs="1"/>

	 

	. . .

	 

	  <xsd:complexType name="drilldown" mixed="false">

	    <xsd:annotation>

	      <xsd:documentation>Data Communication drill down
parameters.</xsd:documentation>

	    </xsd:annotation>

	    <xsd:sequence>

	      <xsd:element name="dimLevel" minOccurs="1"
maxOccurs="unbounded">

	        <xsd:complexType>

	          <xsd:attribute name="column" form="unqualified"
type="xsd:string" use="required"/>

	          <xsd:attribute name="value" form="unqualified"
type="xsd:string" use="required"/>

	        </xsd:complexType>

	      </xsd:element>

	    </xsd:sequence>

	  </xsd:complexType>

	 

	Thanks,

	Kurt Roy | PROS | Software Architect, Software Development
	phone: +1 713-335-8007 | email: kroy@prospricing.com 

	Save the Date for the 14th Annual PROS Summit * April 20-23,
2008 at the Hilton Americas Hotel in Houston, Texas *
www.prospricing.com <http://www.prospricing.com/> 

	 

	
________________________________


	The information contained in this email may be confidential
and/or legally privileged. It has been sent for the sole use of the
intended recipient(s). If the reader of this message is not an intended
recipient, you are hereby notified that any unauthorized review, use,
disclosure, dissemination, distribution, or copying of this
communication, or any of its contents, is strictly prohibited. If you
have received this communication in error, please contact the sender by
reply email and destroy all copies of the original message. Thank you


Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

RE: Getting deprecatrion warnings when compiling generated xmlbean classes.

Posted by Radu Preotiuc-Pietro <ra...@bea.com>.
It is because in SimpleValue.java we have replaced all the methods of
the form "intValue()" with "getValueAsInt()", but we have not removed
the old values so that code that is using those doesn't need to change.
I am thinking maybe someday we will remove those, but in the meantime I
reccomend turning the deprecation warnings off...
 
Radu


________________________________

	From: Kurt Roy [mailto:kroy@prospricing.com] 
	Sent: Monday, July 30, 2007 1:51 PM
	To: dev@xmlbeans.apache.org
	Subject: Getting deprecatrion warnings when compiling generated
xmlbean classes.
	
	

	Hello,

	 

	When compiling generated XmlBeans classes, we always get
deprecation warnings such as the following:

	 

	[javacwithoverlap]
C:\prosrm\build\tmp\src\com\prosrm\ui\web\datainterface\xmlbeans\impl\Dr
illdownXmlBeanImpl.java:146: warning: [deprecation]
set(java.lang.String) in org.apache.xmlbeans.SimpleValue has been
deprecated

	[javacwithoverlap]     public static class DimLevelImpl extends
org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements
com.prosrm.ui.web.datainterface

	.xmlbeans.DrilldownXmlBean.DimLevel

	[javacwithoverlap]                   ^

	[javacwithoverlap]
C:\prosrm\build\tmp\src\com\prosrm\ui\web\datainterface\xmlbeans\impl\Dr
illdownXmlBeanImpl.java:146: warning: [deprecation] objectValue() in

	org.apache.xmlbeans.SimpleValue has been deprecated

	[javacwithoverlap]     public static class DimLevelImpl extends
org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements
com.prosrm.ui.web.datainterface

	.xmlbeans.DrilldownXmlBean.DimLevel

	[javacwithoverlap]                   ^

	 

	 

	It seems that most if not all deprecation warnings are generated
from internal xmlbeans class org.apache.xmlbeans.SimpleValue. 

	 

	We tried with XmlBeans 2.2.0 and setting source generation to
java 1.5 (defaults to 1.4). We also tried XmlBeans 2.3.0.

	 

	Is there any way (besides turning off deprecation warnings on
javac) to make these go away? 

	 

	Here is the xsd fragment:

	 

	  <xsd:complexType name="parameters" mixed="false">

	    <xsd:annotation>

	      <xsd:documentation>Data Communication
parameters.</xsd:documentation>

	    </xsd:annotation>

	    <xsd:sequence>

	      . . .

	      <xsd:element name="drilldown" type="comm:drilldown"
minOccurs="0" maxOccurs="1"/>

	 

	. . .

	 

	  <xsd:complexType name="drilldown" mixed="false">

	    <xsd:annotation>

	      <xsd:documentation>Data Communication drill down
parameters.</xsd:documentation>

	    </xsd:annotation>

	    <xsd:sequence>

	      <xsd:element name="dimLevel" minOccurs="1"
maxOccurs="unbounded">

	        <xsd:complexType>

	          <xsd:attribute name="column" form="unqualified"
type="xsd:string" use="required"/>

	          <xsd:attribute name="value" form="unqualified"
type="xsd:string" use="required"/>

	        </xsd:complexType>

	      </xsd:element>

	    </xsd:sequence>

	  </xsd:complexType>

	 

	Thanks,

	Kurt Roy | PROS | Software Architect, Software Development
	phone: +1 713-335-8007 | email: kroy@prospricing.com 

	Save the Date for the 14th Annual PROS Summit * April 20-23,
2008 at the Hilton Americas Hotel in Houston, Texas *
www.prospricing.com <http://www.prospricing.com/> 

	 

	
________________________________

	The information contained in this email may be confidential
and/or legally privileged. It has been sent for the sole use of the
intended recipient(s). If the reader of this message is not an intended
recipient, you are hereby notified that any unauthorized review, use,
disclosure, dissemination, distribution, or copying of this
communication, or any of its contents, is strictly prohibited. If you
have received this communication in error, please contact the sender by
reply email and destroy all copies of the original message. Thank you
	
	

	


Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.