I've found a discussion regarding the "null parameter waring" problem on sun's forum.
http://forum.java.sun.com/thread.jspa?threadID=592301&tstart=75 This is the warning: >[javac] cast to java.lang.Object for a varargs call >[javac] cast to java.lang.Object[] for a on-varargs call and to suppress this >warning The problem is that some of the reflection methods called (getConstructor(), invoke(), newInstance(),...) changed in 1.5 to take varargs and the cast of null is need as reported in the warning (to Object[]). Regards, Emir ----- Original Message ----- From: Martin Gainty <[EMAIL PROTECTED]> Date: Monday, May 2, 2005 0:50 am Subject: Re: [castor-user] Help on example > Hello- > My apologies for the interrupting with a question which is of a > puerile and > basic nature but.. > I am experiencing some difficulty compiling these classes > apparently the ant javac compiler doesnt understand null? > Any recommendations to get > ant compile.examples > to successfully compile ??? > > Thanks/Vielen Danke > > compile.jdo: > [javac] Compiling 33 source files to > C:\Castor\castor-0.9.6\src\castor-0.9.6 > \build\classes > [javac] > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\main\org\exolab\castor\p > ersist\ClassMolder.java:1102: compareTo(java.math.BigDecimal) in > java.math.BigDe > cimal cannot be applied to (java.lang.Object) > [javac] if ( (o1 instanceof java.math.BigDecimal) && > ((java.math.Big > Decimal) o1).compareTo(o2) == 0) { > [javac] ^ > [javac] > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\main\org\exolab\castor\p > ersist\FieldMolder.java:267: warning: non-varargs call of varargs > methodwith in > exact argument type for last parameter; > [javac] cast to java.lang.Object for a varargs call > [javac] cast to java.lang.Object[] for a non-varargs call and to > suppress th > is warning > [javac] object = rf._getSequence[ i > ].invoke(object > , null ); > [javac] > ^ > [javac] > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\main\org\exolab\castor\p > ersist\FieldMolder.java:274: warning: non-varargs call of varargs > methodwith in > exact argument type for last parameter; > [javac] cast to java.lang.Object for a varargs call > [javac] cast to java.lang.Object[] for a non-varargs call and to > suppress th > is warning > [javac] ( rf._hasMethod != null && ! ( > (Boolean)rf. > _hasMethod.invoke( object, null ) ).booleanValue() ) ) > [javac] > ^ > [javac] > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\main\org\exolab\castor\p > ersist\FieldMolder.java:277: warning: non-varargs call of varargs > methodwith in > exact argument type for last parameter; > [javac] cast to java.lang.Object for a varargs call > [javac] cast to java.lang.Object[] for a non-varargs call and to > suppress th > is warning > [javac] return rf._getMethod.invoke( > object, null ); > [javac] > ^ > [javac] > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\main\org\exolab\castor\p > ersist\FieldMolder.java:331: warning: non-varargs call of varargs > methodwith in > exact argument type for last parameter; > [javac] cast to java.lang.Object for a varargs call > [javac] cast to java.lang.Object[] for a non-varargs call and to > suppress th > is warning > [javac] object = rf._getSequence[ i > ].invoke(object > , null ); > [javac] > ^ > [javac] > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\main\org\exolab\castor\p > ersist\FieldMolder.java:345: warning: non-varargs call of varargs > methodwith in > exact argument type for last parameter; > [javac] cast to java.lang.Object for a varargs call > [javac] cast to java.lang.Object[] for a non-varargs call and to > suppress th > is warning > [javac] rf._deleteMethod.invoke( > object, null ); > [javac] > ^ > [javac] > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\main\org\exolab\castor\p > ersist\FieldMolder.java:581: warning: non-varargs call of varargs > methodwith in > exact argument type for last parameter; > [javac] cast to java.lang.Class for a varargs call > [javac] cast to java.lang.Class[] for a non-varargs call and > to suppress > thi > s warning > [javac] method = > javaClass.getMethod(method > Name, null ); > [javac] > ^ > [javac] > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\main\org\exolab\castor\p > ersist\FieldMolder.java:590: warning: non-varargs call of varargs > methodwith in > exact argument type for last parameter; > [javac] cast to java.lang.Class for a varargs call > [javac] cast to java.lang.Class[] for a non-varargs call and > to suppress > thi > s warning > [javac] method = javaClass.getMethod( > methodName > , null ); > [javac] > ^ > [javac] > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\main\org\exolab\castor\p > ersist\FieldMolder.java:746: warning: non-varargs call of varargs > methodwith in > exact argument type for last parameter; > [javac] cast to java.lang.Class for a varargs call > [javac] cast to java.lang.Class[] for a non-varargs call and > to suppress > thi > s warning > [javac] > _defaultReflectService._createMethod = > javaClass > getMethod( fieldMap.getCreateMethod(), null ); > [javac] > ^ > [javac] > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\main\org\exolab\castor\p > ersist\FieldMolder.java:756: warning: non-varargs call of varargs > methodwith in > exact argument type for last parameter; > [javac] cast to java.lang.Class for a varargs call > [javac] cast to java.lang.Class[] for a non-varargs call and > to suppress > thi > s warning > [javac] method = javaClass.getMethod( > METHOD_CREATE_PREF > IX + capitalize( fieldMap.getName() ), null ); > [javac] > ^ > [javac] > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\main\org\exolab\castor\p > ersist\FieldMolder.java:769: warning: non-varargs call of varargs > methodwith in > exact argument type for last parameter; > [javac] cast to java.lang.Class for a varargs call > [javac] cast to java.lang.Class[] for a non-varargs call and > to suppress > thi > s warning > [javac] hasMethod = javaClass.getMethod( > METHOD_HAS_PREF > IX + capitalize( fieldMap.getName() ), null ); > [javac] > ^ > [javac] > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\main\org\exolab\castor\p > ersist\FieldMolder.java:777: warning: non-varargs call of varargs > methodwith in > exact argument type for last parameter; > [javac] cast to java.lang.Class for a varargs call > [javac] cast to java.lang.Class[] for a non-varargs call and > to suppress > thi > s warning > [javac] deleteMethod = > javaClass.getMethod(METHOD_D > ELETE_PREFIX + capitalize( fieldMap.getName() ), null ); > [javac] > ^ > [javac] Note: Some input files use unchecked or unsafe operations. > [javac] Note: Recompile with -Xlint:unchecked for details. > [javac] 1 error > [javac] 11 warnings > > BUILD FAILED > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\build.xml:177: The > followingerror o > ccurred while executing this line: > C:\Castor\castor-0.9.6\src\castor-0.9.6\src\build.xml:198: Compile > failed;see t > he compiler error output for details. > > Total time: 3 seconds > > ----- Original Message ----- > From: "Werner Guttmann" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Saturday, April 30, 2005 3:04 PM > Subject: Re: [castor-user] Help on example > > > > Martin, > > > > the sources for these files is to be found at > src/examples/myapp. If you > used Ant with the build file provided by the source > > distribution, there's a target that automates building the samples. > > > > Regards > > Werner > > > > On Sat, 30 Apr 2005 13:30:29 -0400, Martin Gainty wrote: > > > > >Guten Tag/Good Day to all > > > > > >I am attempting to compile the JDO example but cannot locate > Category or > > >ProductDetail or Computer classes > > > > > >I am new to Castor and just setting up the environment for the > first time > > > > > >Many Thanks/Vielen Danke > > > > > >Martin Gainty > > >001-617-852-7822 > > >______________________________________________ > > >Disclaimer and confidentiality note > > >Everything in this e-mail and any attachments relating to the > official> >business of Sender and is proprietary to Sender. It is > confidential,legally > > >privileged and protected by law. Sender does not own and > endorse any > other > > >content. > > >(mobile) 617-852-7822 > > >(http)www.laconiadatasystems.com > > > > > > > > > > > > > > > > > >

