commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1166646 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math: MathException.java MathRuntimeException.java exception/MathThrowable.java
Date Thu, 08 Sep 2011 12:08:16 GMT
Author: erans
Date: Thu Sep  8 12:08:16 2011
New Revision: 1166646

URL: http://svn.apache.org/viewvc?rev=1166646&view=rev
Log:
MATH-566
Removed "MathThrowable".

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathException.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathRuntimeException.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathThrowable.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathException.java?rev=1166646&r1=1166645&r2=1166646&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathException.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathException.java Thu
Sep  8 12:08:16 2011
@@ -22,7 +22,6 @@ import java.text.MessageFormat;
 import java.util.Locale;
 import java.util.Set;
 
-import org.apache.commons.math.exception.MathThrowable;
 import org.apache.commons.math.exception.util.Localizable;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 
@@ -36,7 +35,7 @@ import org.apache.commons.math.exception
 *
 * @version $Id$
 */
-public class MathException extends Exception implements MathThrowable {
+public class MathException extends Exception {
 
     /** Serializable version identifier. */
     private static final long serialVersionUID = 7428019509644517071L;
@@ -105,23 +104,45 @@ public class MathException extends Excep
       this.arguments = (arguments == null) ? new Object[0] : arguments.clone();
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Sets a message.
+     *
+     * @param pat Message pattern.
+     * @param args Values for replacing the placeholders in the message
+     * pattern.
+     */
     public void addMessage(Localizable pat,
                            Object ... args) {
         throw new UnsupportedOperationException(DEPRECATION_MESSAGE);
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Sets the context (key, value) pair.
+     * Keys are assumed to be unique within an instance. If the same key is
+     * assigned a new value, the previous one will be lost.
+     *
+     * @param key Context key (not null).
+     * @param value Context value.
+     */
     public void setContext(String key, Object value) {
         throw new UnsupportedOperationException(DEPRECATION_MESSAGE);
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Gets the value associated to the given context key.
+     *
+     * @param key Context key.
+     * @return the context value or {@code null} if the key does not exist.
+     */
     public Object getContext(String key) {
         throw new UnsupportedOperationException(DEPRECATION_MESSAGE);
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Gets all the keys stored in the exception
+     *
+     * @return the set of keys.
+     */
     public Set<String> getContextKeys() {
         throw new UnsupportedOperationException(DEPRECATION_MESSAGE);
     }
@@ -140,13 +161,21 @@ public class MathException extends Excep
         return "";
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Gets the message in a conventional US locale.
+     *
+     * @return localized message
+     */
     @Override
     public String getMessage() {
         return getMessage(Locale.US);
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Gets the message in the system default locale.
+     *
+     * @return localized message
+     */
     @Override
     public String getLocalizedMessage() {
         return getMessage(Locale.getDefault());

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathRuntimeException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathRuntimeException.java?rev=1166646&r1=1166645&r2=1166646&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathRuntimeException.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/MathRuntimeException.java
Thu Sep  8 12:08:16 2011
@@ -27,7 +27,6 @@ import java.util.Locale;
 import java.util.NoSuchElementException;
 import java.util.Set;
 
-import org.apache.commons.math.exception.MathThrowable;
 import org.apache.commons.math.exception.util.Localizable;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 
@@ -37,7 +36,7 @@ import org.apache.commons.math.exception
 * @version $Id$
 * @since 2.0
 */
-public class MathRuntimeException extends RuntimeException implements MathThrowable {
+public class MathRuntimeException extends RuntimeException {
 
     /** Serializable version identifier. */
     private static final long serialVersionUID = 9058794795027570002L;
@@ -98,23 +97,45 @@ public class MathRuntimeException extend
         this.arguments = (arguments == null) ? new Object[0] : arguments.clone();
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Sets a message.
+     *
+     * @param pat Message pattern.
+     * @param args Values for replacing the placeholders in the message
+     * pattern.
+     */
     public void addMessage(Localizable pat,
                            Object ... args) {
         throw new UnsupportedOperationException(DEPRECATION_MESSAGE);
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Sets the context (key, value) pair.
+     * Keys are assumed to be unique within an instance. If the same key is
+     * assigned a new value, the previous one will be lost.
+     *
+     * @param key Context key (not null).
+     * @param value Context value.
+     */
     public void setContext(String key, Object value) {
         throw new UnsupportedOperationException(DEPRECATION_MESSAGE);
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Gets the value associated to the given context key.
+     *
+     * @param key Context key.
+     * @return the context value or {@code null} if the key does not exist.
+     */
     public Object getContext(String key) {
         throw new UnsupportedOperationException(DEPRECATION_MESSAGE);
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Gets all the keys stored in the exception
+     *
+     * @return the set of keys.
+     */
     public Set<String> getContextKeys() {
         throw new UnsupportedOperationException(DEPRECATION_MESSAGE);
     }
@@ -145,13 +166,21 @@ public class MathRuntimeException extend
         return "";
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Gets the message in a conventional US locale.
+     *
+     * @return localized message
+     */
     @Override
     public String getMessage() {
         return getMessage(Locale.US);
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Gets the message in the system default locale.
+     *
+     * @return localized message
+     */
     @Override
     public String getLocalizedMessage() {
         return getMessage(Locale.getDefault());



Mime
View raw message