CVSROOT: /sources/classpath Module name: classpath Changes by: David Gilbert <trebligd> 06/06/09 15:00:57
Modified files: . : ChangeLog java/awt/image : BufferedImage.java Log message: 2006-06-09 David Gilbert <[EMAIL PROTECTED]> * java/awt/image/BufferedImage.java (BufferedImage(int, int, int)): Added API docs, (getProperty(String)): Return correct value for undefined properties, (getPropertyNames()): Added comments and removed FIXME. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.7737&r2=1.7738 http://cvs.savannah.gnu.org/viewcvs/classpath/java/awt/image/BufferedImage.java?cvsroot=classpath&r1=1.14&r2=1.15 Patches: Index: ChangeLog =================================================================== RCS file: /sources/classpath/classpath/ChangeLog,v retrieving revision 1.7737 retrieving revision 1.7738 diff -u -b -r1.7737 -r1.7738 --- ChangeLog 9 Jun 2006 14:53:33 -0000 1.7737 +++ ChangeLog 9 Jun 2006 15:00:56 -0000 1.7738 @@ -1,3 +1,10 @@ +2006-06-09 David Gilbert <[EMAIL PROTECTED]> + + * java/awt/image/BufferedImage.java + (BufferedImage(int, int, int)): Added API docs, + (getProperty(String)): Return correct value for undefined properties, + (getPropertyNames()): Added comments and removed FIXME. + 2006-06-09 Thomas Fitzsimmons <[EMAIL PROTECTED]> * native/plugin/gcjwebplugin.cc (PLUGIN_ERROR_THREE): New macro. Index: java/awt/image/BufferedImage.java =================================================================== RCS file: /sources/classpath/classpath/java/awt/image/BufferedImage.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -b -r1.14 -r1.15 --- java/awt/image/BufferedImage.java 6 Jun 2006 07:53:41 -0000 1.14 +++ java/awt/image/BufferedImage.java 9 Jun 2006 15:00:57 -0000 1.15 @@ -1,5 +1,5 @@ /* BufferedImage.java -- - Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation + Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, Free Software Foundation This file is part of GNU Classpath. @@ -99,6 +99,13 @@ Vector observers; + /** + * Creates a new buffered image. + * + * @param w the width. + * @param h the height. + * @param type the image type (see the constants defined by this class). + */ public BufferedImage(int w, int h, int type) { ColorModel cm = null; @@ -363,11 +370,28 @@ return 1; } + /** + * Returns the value of the specified property, or + * [EMAIL PROTECTED] Image#UndefinedProperty} if the property is not defined. + * + * @param string the property key (<code>null</code> not permitted). + * + * @return The property value. + * + * @throws NullPointerException if <code>string</code> is <code>null</code>. + */ public Object getProperty(String string) { - if (properties == null) - return null; - return properties.get(string); + if (string == null) + throw new NullPointerException("The property name cannot be null."); + Object result = Image.UndefinedProperty; + if (properties != null) + { + Object v = properties.get(string); + if (v != null) + result = v; + } + return result; } public Object getProperty(String string, ImageObserver imageobserver) @@ -375,10 +399,15 @@ return getProperty(string); } - + /** + * Returns <code>null</code> always. + * + * @return <code>null</code> always. + */ public String[] getPropertyNames() { - // FIXME: implement + // This method should always return null, see: + // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4640609 return null; }