+1 Thanks Marco
Il giorno 13/mar/2011, alle ore 11.31, Jacques Le Roux ha scritto: > Hi Marco, > > My idea is to use <compilerarg value="-Xlint"/> (thanks for the miss), so > I'd say I don't care about Eclipse, if some want to fix them, perfect, else > simply forget about those warnings > > I will wait to commit that we remove most, if not all, of the warning > messages in order to not > > Jacques > > From: <risali...@gmail.com> >> Hi Jacques, >> >> I have removed some redundant cast warming but if you set all the warning on >> eclipse to warning where they are ignore you will get many others. >> >> So we have to decide if we would like to remove all the warning or simply >> the ones intercepted by the build. >> >> In your patch was missing this one: >> >> Index: macros.xml >> =================================================================== >> --- macros.xml (revision 1081059) >> +++ macros.xml (working copy) >> @@ -73,9 +73,7 @@ >> >> <presetdef name="javac16"> >> <default-javac compiler="javac1.6" target="1.6" source="1.6" >> encoding="UTF-8" sourcepathref="src-path" includeantruntime="false"> >> - <!-- >> - <compilerarg value="-Xlint:unchecked"/> >> - --> >> + <compilerarg value="-Xlint"/> >> </default-javac> >> </presetdef> >> >> I could say that I could fix some of them when I will get the time but I did >> not know when :-) >> >> Thanks >> Marco >> >> >> Il giorno 13/mar/2011, alle ore 01.38, Jacques Le Roux ha scritto: >> >>> Sorry wrong patch (no webui component by default, I test it from >>> OFBIZ-3877) >>> >>> Here is the right patch >>> >>> Index: applications/order/build.xml >>> =================================================================== >>> --- applications/order/build.xml (revision 1081022) >>> +++ applications/order/build.xml (working copy) >>> @@ -59,6 +59,7 @@ >>> <javac16> >>> <!-- exclude the payment processor packages; comment if you have >>> libs --> >>> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> >>> + <compilerarg value="-Xlint"/> >>> </javac16> >>> </target> >>> >>> Index: common.xml >>> =================================================================== >>> --- common.xml (revision 1081022) >>> +++ common.xml (working copy) >>> @@ -90,7 +90,9 @@ >>> <!-- ================================================================== >>> --> >>> >>> <target name="classes" depends="prepare"> >>> - <javac16/> >>> + <javac16> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: framework/base/build.xml >>> =================================================================== >>> --- framework/base/build.xml (revision 1081022) >>> +++ framework/base/build.xml (working copy) >>> @@ -87,7 +87,9 @@ >>> </target> >>> >>> <target name="classes" depends="prepare,gen-src"> >>> - <javac16/> >>> + <javac16> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: framework/bi/build.xml >>> =================================================================== >>> --- framework/bi/build.xml (revision 1081022) >>> +++ framework/bi/build.xml (working copy) >>> @@ -46,6 +46,8 @@ >>> <!-- ================================================================== >>> --> >>> >>> <target name="classes" depends="prepare"> >>> - <javac16 classpathref="local.class.path"/> >>> + <javac16 classpathref="local.class.path"> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> </project> >>> Index: framework/sql/build.xml >>> =================================================================== >>> --- framework/sql/build.xml (revision 1081022) >>> +++ framework/sql/build.xml (working copy) >>> @@ -61,7 +61,9 @@ >>> </target> >>> >>> <target name="classes" depends="prepare,gen-src"> >>> - <javac16/> >>> + <javac16> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: framework/start/build.xml >>> =================================================================== >>> --- framework/start/build.xml (revision 1081022) >>> +++ framework/start/build.xml (working copy) >>> @@ -34,7 +34,10 @@ >>> >>> <target name="classes" depends="prepare"> >>> <!-- compile start --> >>> - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> >>> + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> + >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: specialpurpose/shark/build.xml >>> =================================================================== >>> --- specialpurpose/shark/build.xml (revision 1081022) >>> +++ specialpurpose/shark/build.xml (working copy) >>> @@ -55,6 +55,7 @@ >>> <target name="classes" depends="prepare"> >>> <javac16> >>> <src path="${src.dir}"/> >>> + <compilerarg value="-Xlint"/> >>> </javac16> >>> </target> >>> >>> >>> BTW there are some interseting things, like wrong libs names: >>> >>> [javac16] warning: [path] bad path element >>> "D:\workspace\ofbizDev\framework\base\lib\commons-io-1.3.1.jar": no such >>> file or directory >>> [javac16] warning: [path] bad path element >>> "D:\workspace\ofbizDev\framework\base\lib\commons-logging-1.0.4.jar": no >>> such file or directory >>> [javac16] warning: [path] bad path element >>> "D:\workspace\ofbizDev\framework\base\lib\fop-hyph.jar": no such file or >>> directory >>> [javac16] warning: [path] bad path element >>> "D:\workspace\ofbizDev\framework\base\lib\serializer-2.7.0.jar": no such >>> file or directory >>> [javac16] warning: [path] bad path element >>> "D:\workspace\ofbizDev\framework\base\lib\servlet-2.2.jar": no such file or >>> directory >>> [javac16] warning: [path] bad path element >>> "D:\workspace\ofbizDev\framework\base\lib\xalan-2.7.0.jar": no such file or >>> directory >>> [javac16] warning: [path] bad path element >>> "D:\workspace\ofbizDev\framework\base\lib\xercesImpl-2.7.1.jar": no such >>> file or directory >>> [javac16] warning: [path] bad path element >>> "D:\workspace\ofbizDev\framework\base\lib\xml-apis-1.3.04.jar": no such >>> file or directory >>> [javac16] warning: [path] bad path element >>> "D:\workspace\ofbizDev\framework\base\lib\activation.jar": no such file or >>> directory >>> [javac16] warning: [path] bad path element >>> "D:\workspace\ofbizDev\framework\base\lib\xml-apis.jar": no such file or >>> directory >>> [javac16] warning: [path] bad path element >>> "D:\workspace\ofbizDev\framework\base\lib\xercesImpl.jar": no such file or >>> directory >>> [javac16] warning: [path] bad path element >>> "D:\workspace\ofbizDev\framework\base\lib\serializer.jar": no such file or >>> directory >>> >>> Jacques >>> >>> >>> From: "Jacques Le Roux" <jacques.le.r...@les7arts.com> >>>> Hi Marco, >>>> >>>> I have tried the following patch locally and I get a lot of warnings. >>>> >>>> Index: applications/order/build.xml >>>> =================================================================== >>>> --- applications/order/build.xml (revision 1081008) >>>> +++ applications/order/build.xml (working copy) >>>> @@ -59,6 +59,7 @@ >>>> <javac16> >>>> <!-- exclude the payment processor packages; comment if you have >>>> libs --> >>>> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> >>>> + <compilerarg value="-Xlint"/> >>>> </javac16> >>>> </target> >>>> >>>> Index: common.xml >>>> =================================================================== >>>> --- common.xml (revision 1081008) >>>> +++ common.xml (working copy) >>>> @@ -90,7 +90,9 @@ >>>> <!-- ================================================================== >>>> --> >>>> >>>> <target name="classes" depends="prepare"> >>>> - <javac16/> >>>> + <javac16> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> </target> >>>> >>>> <target name="jar" depends="classes"> >>>> Index: framework/base/build.xml >>>> =================================================================== >>>> --- framework/base/build.xml (revision 1081008) >>>> +++ framework/base/build.xml (working copy) >>>> @@ -87,7 +87,9 @@ >>>> </target> >>>> >>>> <target name="classes" depends="prepare,gen-src"> >>>> - <javac16/> >>>> + <javac16> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> </target> >>>> >>>> <target name="jar" depends="classes"> >>>> Index: framework/bi/build.xml >>>> =================================================================== >>>> --- framework/bi/build.xml (revision 1081008) >>>> +++ framework/bi/build.xml (working copy) >>>> @@ -46,6 +46,8 @@ >>>> <!-- ================================================================== >>>> --> >>>> >>>> <target name="classes" depends="prepare"> >>>> - <javac16 classpathref="local.class.path"/> >>>> + <javac16 classpathref="local.class.path"> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> </target> >>>> </project> >>>> Index: framework/sql/build.xml >>>> =================================================================== >>>> --- framework/sql/build.xml (revision 1081008) >>>> +++ framework/sql/build.xml (working copy) >>>> @@ -61,7 +61,9 @@ >>>> </target> >>>> >>>> <target name="classes" depends="prepare,gen-src"> >>>> - <javac16/> >>>> + <javac16> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> </target> >>>> >>>> <target name="jar" depends="classes"> >>>> Index: framework/start/build.xml >>>> =================================================================== >>>> --- framework/start/build.xml (revision 1081008) >>>> +++ framework/start/build.xml (working copy) >>>> @@ -34,7 +34,10 @@ >>>> >>>> <target name="classes" depends="prepare"> >>>> <!-- compile start --> >>>> - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> >>>> + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> + >>>> </target> >>>> >>>> <target name="jar" depends="classes"> >>>> Index: specialpurpose/build.xml >>>> =================================================================== >>>> --- specialpurpose/build.xml (revision 1081008) >>>> +++ specialpurpose/build.xml (working copy) >>>> @@ -33,6 +33,7 @@ >>>> projectmgr/build.xml, >>>> ldap/build.xml, >>>> crowd/build.xml, >>>> + webui/build.xml, >>>> googlecheckout/build.xml"/> >>>> <!-- For the Web POS add "webpos/build.xml" to the list above --> >>>> <!-- For the old OFBiz Workflow Engine add "workflow/build.xml" to the >>>> list above --> >>>> Index: specialpurpose/shark/build.xml >>>> =================================================================== >>>> --- specialpurpose/shark/build.xml (revision 1081008) >>>> +++ specialpurpose/shark/build.xml (working copy) >>>> @@ -55,6 +55,7 @@ >>>> <target name="classes" depends="prepare"> >>>> <javac16> >>>> <src path="${src.dir}"/> >>>> + <compilerarg value="-Xlint"/> >>>> </javac16> >>>> </target> >>>> >>>> I wanted to commit it, but now I prefer to share this experience and >>>> discuss about it >>>> >>>> BTW I'm not quire sure about your question below >>>> >>>> Thanks >>>> >>>> Jacques >>>> >>>> >>>> From: <risali...@gmail.com> >>>>> Hi dev, >>>>> >>>>> I'm near to complete big work of cleaning of all OFBiz classes from >>>>> warning of during compiling java classes. >>>>> >>>>> Actually with the default configuration of Eclipse only 1 warning is >>>>> still active: >>>>> >>>>> The resource is a duplicate of >>>>> applications/securityext/src/META-INF/services/org.ofbiz.security.authz.da.DynamicAccessHandler >>>>> and was not copied to the output folder >>>>> /ofbiz/framework/security/src/META-INF/services >>>>> org.ofbiz.security.authz.da.DynamicAccessHandler >>>>> >>>>> Someone knows if it's necessary and how to fix it ? >>>>> >>>>> Thanks in advance >>>>> Marco >>>>> >>>> >>>> >>> >>> >> > >