harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r502543 - in /harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common: javax/swing/text/DefaultCaret.java org/apache/harmony/x/swing/internal/nls/messages.properties
Date Fri, 02 Feb 2007 09:04:23 GMT
Author: apetrenko
Date: Fri Feb  2 01:04:23 2007
New Revision: 502543

URL: http://svn.apache.org/viewvc?view=rev&rev=502543
Log:
Additional patch for HARMONY-1750 "[classlib][swing]javax.swing.text.DefaultCaret.install(null)
does not throw unspecified NPE"
Exception message has been internationalized

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/internal/nls/messages.properties

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java?view=diff&rev=502543&r1=502542&r2=502543
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultCaret.java
Fri Feb  2 01:04:23 2007
@@ -57,6 +57,7 @@
 import org.apache.harmony.awt.text.TextUtils;
 import org.apache.harmony.x.swing.StringConstants;
 
+import org.apache.harmony.x.swing.internal.nls.Messages;
 
 public class DefaultCaret extends Rectangle implements Caret, FocusListener,
         MouseListener, MouseMotionListener {
@@ -678,7 +679,7 @@
      */
     public void install(final JTextComponent c) {
         if (c == null) { // Fix for HARMONY-1750, for compatiblity with RI
-            throw new NullPointerException("component is null");
+            throw new NullPointerException(Messages.getString("swing.05"));
         }
         if (!setComponent(c)) {
             return;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/internal/nls/messages.properties?view=diff&rev=502543&r1=502542&r2=502543
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/internal/nls/messages.properties
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/internal/nls/messages.properties
Fri Feb  2 01:04:23 2007
@@ -20,4 +20,5 @@
 swing.02=Invalid verticalScrollBarPolicy
 swing.03=Invalid horizontalScrollBarPolicy
 swing.04=ComboBox is null
+swing.05=Component is null
 



Mime
View raw message