[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deprecated warnings



very strange; i suspect its not a java 6 vs java 7 problem, but an old jar file somehow in the classpath on your laptop ????

On 10/21/2013 6:38 PM, Schmunk, Robert B. (GISS-611.0)[TRINNOVIM, LLC] wrote:

John,

Something else odd came up over the weekend, and this time I need to ask 
whether the latest netcdfAll-4.3.jar download on the NJ website was compiled 
using Java 6 or Java 7?

I am still using Java 6 on my desktop, but the latest Java 7 when I use my 
laptop.

Using the laptop on Saturday, I downloaded the latest netcdfAll-4.3. After making some 
minor change to Panoply, I started a new compile and suddenly started seeing a bunch of 
"cannot find symbol" errors for the methods getShortName() and getFullName() in 
ucar.nc2.Dimension.

This problem does not happen when using the desktop machine with Java 6. Since 
I can compile Panoply and link to netcdfAll-4.3 with this set-up, I'd assume 
that netcdfAll-4.3 was built using Java 6.

Again, this compilation problem seems really bizarre. I would think if there 
was any issue related to the Java version to build netcdfAll-4.3, the machine 
using the older Java would be more likely to croak on it.

rbs



On Oct 18, 2013, at 16:23, Robert Schmunk wrote:




It's compiler output when I am building Panoply and linking to the latest 
netcdfAll-4.3.jar. For example,

compile:
    [mkdir] Created dir: /Users/rschmunk/Devo/java/Panoply/classes
    [javac] Compiling 294 source files to 
/Users/rschmunk/Devo/java/Panoply/classes
    [javac] 
/Users/rschmunk/Devo/java/Panoply/src/gov/nasa/giss/netcdf/NcArray.java:178: 
warning: [deprecation] getDataType() in ucar.nc2.Variable has been deprecated
    [javac]         DataType dt     = varDS_.getDataType ( );
    [javac]                                 ^
    [javac] 
/Users/rschmunk/Devo/java/Panoply/src/gov/nasa/giss/netcdf/NcVariable.java:298: 
warning: [deprecation] getDataType() in ucar.nc2.Variable has been deprecated
    [javac]         DataType dt = varDS_.getDataType ( );

and a bunch more because I manage to call getDataType() 13 times. In the above 
examples, varDS_ is  simply a ucar.nc2.dataset.VariableDS.

I was seeing similar deprecation notices about the use of getName(), but there 
the API made it plain that the method was indeed deprecated and what the 
recommended alternative was.

Having looked at the ucar.nc2.Variable source, it makes no sense that I am 
seeing this warning. Hence my tossing it your way to see if you had ever seen 
it before.

rbs







--
Robert B. Schmunk
Webmaster / Senior Systems Programmer
NASA Goddard Institute for Space Studies
2880 Broadway, New York, NY 10025