Author: rwhitcomb
Date: Fri Apr 30 21:54:42 2021
New Revision: 1889344

URL: http://svn.apache.org/viewvc?rev=1889344&view=rev
Log:
Tweak some error messages and comments.

Modified:
    pivot/trunk/core/src/org/apache/pivot/json/JSONSerializer.java
    pivot/trunk/core/src/org/apache/pivot/util/ExceptionUtils.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/Insets.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/Window.java

Modified: pivot/trunk/core/src/org/apache/pivot/json/JSONSerializer.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/json/JSONSerializer.java?rev=1889344&r1=1889343&r2=1889344&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/json/JSONSerializer.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/json/JSONSerializer.java Fri Apr 30 
21:54:42 2021
@@ -372,7 +372,6 @@ public class JSONSerializer implements S
                                 unicodeBuilder.append((char) c);
                                 c = reader.read();
                             }
-                            
                         } else {
                             unicodeBuilder.append((char) c);
                             while (unicodeBuilder.length() < 4) {

Modified: pivot/trunk/core/src/org/apache/pivot/util/ExceptionUtils.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/ExceptionUtils.java?rev=1889344&r1=1889343&r2=1889344&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/ExceptionUtils.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/ExceptionUtils.java Fri Apr 30 
21:54:42 2021
@@ -67,9 +67,10 @@ public final class ExceptionUtils {
      *
      * @param    ex    The exception to report.
      * @param    buf   The buffer used to build the content.
+     * @return         The input buffer.
      */
-    public static void toString(final Throwable ex, final StringBuilder buf) {
-        toString(ex, buf, false, false, false);
+    public static StringBuilder toString(final Throwable ex, final 
StringBuilder buf) {
+        return toString(ex, buf, false, false, false);
     }
 
     /**
@@ -115,8 +116,9 @@ public final class ExceptionUtils {
      *                       the chained exceptions.
      * @param    convertTabs Convert any tab characters to single spaces (for 
use in controls
      *                       that don't deal with tabs correctly; some do).
+     * @return               The input buffer.
      */
-    public static void toString(
+    public static StringBuilder toString(
         final Throwable ex,
         final StringBuilder buf,
         final boolean useToString,
@@ -144,8 +146,9 @@ public final class ExceptionUtils {
                         || (next instanceof FileNotFoundException)
                         || (next instanceof NoSuchFileException)
                         || (next instanceof UnsupportedOperationException)
-                        || (next instanceof NumberFormatException)) {
-                    msg = String.format("%1$s \"%2$s\"", name, msg);
+                        || (next instanceof NumberFormatException)
+                        || (next instanceof IndexOutOfBoundsException)) {
+                    msg = String.format("%1$s '%2$s'", name, msg);
                 }
             }
             buf.append(msg);
@@ -163,6 +166,8 @@ public final class ExceptionUtils {
                 buf.setCharAt(ix++, ' ');
             }
         }
+
+        return buf;
     }
 
 }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Insets.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Insets.java?rev=1889344&r1=1889343&r2=1889344&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Insets.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Insets.java Fri Apr 30 21:54:42 
2021
@@ -335,7 +335,7 @@ public final class Insets implements Ser
                     throw new IllegalArgumentException(ex);
                 }
             } else {
-                throw new IllegalArgumentException("Unknown format for Insets: 
" + value);
+                throw new IllegalArgumentException("Invalid format for Insets: 
'" + value + "'");
             }
         }
 

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Window.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Window.java?rev=1889344&r1=1889343&r2=1889344&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Window.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Window.java Fri Apr 30 21:54:42 
2021
@@ -393,7 +393,7 @@ public class Window extends Container {
      *
      * @param window The window which could be an owned descendant of this 
window.
      * @return {@code true} if this window is an owning ancestor of the given
-     * window; {@code false}, otherwise.
+     * window; {@code false} otherwise.
      */
     public boolean isOwner(Window window) {
         Utils.checkNull(window, "window");
@@ -410,7 +410,7 @@ public class Window extends Container {
     /**
      * Returns this window's open state.
      *
-     * @return {@code true} if the window is open; {@code false}, otherwise.
+     * @return {@code true} if the window is open; {@code false} otherwise.
      */
     public boolean isOpen() {
         return (getParent() != null);
@@ -419,7 +419,7 @@ public class Window extends Container {
     /**
      * Returns this window's opening state.
      *
-     * @return {@code true} if the window is opening; {@code false},
+     * @return {@code true} if the window is opening; {@code false}
      * otherwise.
      */
     public boolean isOpening() {
@@ -513,7 +513,7 @@ public class Window extends Container {
     /**
      * Returns this window's closed state.
      *
-     * @return {@code true} if the window is closed; {@code false}, otherwise.
+     * @return {@code true} if the window is closed; {@code false} otherwise.
      */
     public boolean isClosed() {
         return !isOpen();
@@ -522,7 +522,7 @@ public class Window extends Container {
     /**
      * Returns this window's closing state.
      *
-     * @return {@code true} if the window is closing; {@code false},
+     * @return {@code true} if the window is closing; {@code false}
      * otherwise.
      */
     public boolean isClosing() {
@@ -689,7 +689,7 @@ public class Window extends Container {
     /**
      * Requests that this window become the active window.
      *
-     * @return {@code true} if the window became active; {@code false},
+     * @return {@code true} if the window became active; {@code false}
      * otherwise.
      */
     public boolean requestActive() {


Reply via email to