NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi Mathias- Mathias Stümpert wrote: > > Hi all, > > I think I found a small bug in the setFont() method of AxisScale. The > method asks if the specified font is null but nevertheless throws a > NullPointerException by calling getSize() on the null-font. Here?s the > mentioned piece of code: > > if ((labelFont == null && oldFont != null) || > !labelFont.equals(oldFont)) > { > labelSize = labelFont.getSize(); > try { > scalarMap.makeScale(); // update the display > } > catch (VisADException ve) {;} > } > > I found that because I wanted to set the font to the original font which > is null. Would be great if you could fix this. Yes, this is a bug. Don't know what I was thinking. The comparison should be: if (labelFont != null && !labelFont.equals(oldFont)) I'll update the repository and the fix will be in the next release. Don ************************************************************* Don Murray UCAR Unidata Program dmurray@xxxxxxxxxxxxxxxx P.O. Box 3000 (303) 497-8628 Boulder, CO 80307 http://www.unidata.ucar.edu/staff/donm *************************************************************
visad
archives: