Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 19999 invoked from network); 15 Nov 2010 22:40:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Nov 2010 22:40:45 -0000 Received: (qmail 72660 invoked by uid 500); 15 Nov 2010 22:41:16 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 72607 invoked by uid 500); 15 Nov 2010 22:41:16 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 72599 invoked by uid 99); 15 Nov 2010 22:41:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Nov 2010 22:41:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Nov 2010 22:41:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id EB12523889E0; Mon, 15 Nov 2010 22:39:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1035476 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/ main/java/org/apache/commons/math/distribution/ main/java/org/apache/commons/math/exception/ test/java/org/apache/commons/math/ Date: Mon, 15 Nov 2010 22:39:56 -0000 To: commits@commons.apache.org From: luc@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101115223956.EB12523889E0@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: luc Date: Mon Nov 15 22:39:56 2010 New Revision: 1035476 URL: http://svn.apache.org/viewvc?rev=1035476&view=rev Log: added back some features from old exception scheme (accessors for patterns and arguments) to the new scheme this should ease transition for existing user code Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathThrowable.java (with props) 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/distribution/AbstractContinuousDistribution.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalStateException.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUnsupportedOperationException.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUserException.java commons/proper/math/trunk/src/test/java/org/apache/commons/math/ConvergenceExceptionTest.java commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathConfigurationExceptionTest.java commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathExceptionTest.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=1035476&r1=1035475&r2=1035476&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 Mon Nov 15 22:39:56 2010 @@ -21,6 +21,7 @@ import java.io.PrintWriter; import java.text.MessageFormat; import java.util.Locale; +import org.apache.commons.math.exception.MathThrowable; import org.apache.commons.math.exception.util.DummyLocalizable; import org.apache.commons.math.exception.util.Localizable; import org.apache.commons.math.exception.util.LocalizedFormats; @@ -35,7 +36,7 @@ import org.apache.commons.math.exception * * @version $Revision$ $Date$ */ -public class MathException extends Exception { +public class MathException extends Exception implements MathThrowable { /** Serializable version identifier. */ private static final long serialVersionUID = 7428019509644517071L; @@ -134,27 +135,24 @@ public class MathException extends Excep * * @return the pattern used to build the message of this throwable * @since 1.2 - * @deprecated as of 2.2 replaced by {@link #getLocalizablePattern()} + * @deprecated as of 2.2 replaced by {@link #getSpecificPattern()} and {@link #getGeneralPattern()} */ @Deprecated public String getPattern() { return pattern.getSourceString(); } - /** Gets the localizable pattern used to build the message of this throwable. - * - * @return the localizable pattern used to build the message of this throwable - * @since 2.2 - */ - public Localizable getLocalizablePattern() { + /** {@inheritDoc} */ + public Localizable getSpecificPattern() { + return null; + } + + /** {@inheritDoc} */ + public Localizable getGeneralPattern() { return pattern; } - /** Gets the arguments used to build the message of this throwable. - * - * @return the arguments used to build the message of this throwable - * @since 1.2 - */ + /** {@inheritDoc} */ public Object[] getArguments() { return arguments.clone(); } 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=1035476&r1=1035475&r2=1035476&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 Mon Nov 15 22:39:56 2010 @@ -26,6 +26,7 @@ import java.util.ConcurrentModificationE import java.util.Locale; import java.util.NoSuchElementException; +import org.apache.commons.math.exception.MathThrowable; import org.apache.commons.math.exception.util.DummyLocalizable; import org.apache.commons.math.exception.util.Localizable; import org.apache.commons.math.exception.util.LocalizedFormats; @@ -36,7 +37,7 @@ import org.apache.commons.math.exception * @version $Revision$ $Date$ * @since 2.0 */ -public class MathRuntimeException extends RuntimeException { +public class MathRuntimeException extends RuntimeException implements MathThrowable { /** Serializable version identifier. */ private static final long serialVersionUID = 9058794795027570002L; @@ -139,26 +140,24 @@ public class MathRuntimeException extend /** Gets the pattern used to build the message of this throwable. * * @return the pattern used to build the message of this throwable - * @deprecated as of 2.2 replaced by {@link #getLocalizablePattern()} + * @deprecated as of 2.2 replaced by {@link #getSpecificPattern()} and {@link #getGeneralPattern()} */ @Deprecated public String getPattern() { return pattern.getSourceString(); } - /** Gets the localizable pattern used to build the message of this throwable. - * - * @return the localizable pattern used to build the message of this throwable - * @since 2.2 - */ - public Localizable getLocalizablePattern() { + /** {@inheritDoc} */ + public Localizable getSpecificPattern() { + return null; + } + + /** {@inheritDoc} */ + public Localizable getGeneralPattern() { return pattern; } - /** Gets the arguments used to build the message of this throwable. - * - * @return the arguments used to build the message of this throwable - */ + /** {@inheritDoc} */ public Object[] getArguments() { return arguments.clone(); } Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java?rev=1035476&r1=1035475&r2=1035476&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java Mon Nov 15 22:39:56 2010 @@ -19,14 +19,14 @@ package org.apache.commons.math.distribu import java.io.Serializable; import org.apache.commons.math.ConvergenceException; -import org.apache.commons.math.exception.FunctionEvaluationException; import org.apache.commons.math.MathException; import org.apache.commons.math.analysis.UnivariateRealFunction; import org.apache.commons.math.analysis.solvers.BrentSolver; import org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils; -import org.apache.commons.math.exception.util.LocalizedFormats; -import org.apache.commons.math.exception.OutOfRangeException; +import org.apache.commons.math.exception.MathUserException; import org.apache.commons.math.exception.NotStrictlyPositiveException; +import org.apache.commons.math.exception.OutOfRangeException; +import org.apache.commons.math.exception.util.LocalizedFormats; import org.apache.commons.math.random.RandomDataImpl; import org.apache.commons.math.util.FastMath; @@ -82,17 +82,17 @@ public abstract class AbstractContinuous // subclasses can override if there is a better method. UnivariateRealFunction rootFindingFunction = new UnivariateRealFunction() { - public double value(double x) throws FunctionEvaluationException { + public double value(double x) throws MathUserException { double ret = Double.NaN; try { ret = cumulativeProbability(x) - p; } catch (MathException ex) { - throw new FunctionEvaluationException(ex, x, ex.getLocalizablePattern(), - ex.getArguments()); + throw new MathUserException(ex, + ex.getSpecificPattern(), ex.getGeneralPattern(), + ex.getArguments()); } if (Double.isNaN(ret)) { - throw new FunctionEvaluationException(x, - LocalizedFormats.CUMULATIVE_PROBABILITY_RETURNED_NAN, x, p); + throw new MathUserException(LocalizedFormats.CUMULATIVE_PROBABILITY_RETURNED_NAN, x, p); } return ret; } Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java?rev=1035476&r1=1035475&r2=1035476&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java Mon Nov 15 22:39:56 2010 @@ -18,7 +18,6 @@ package org.apache.commons.math.distribu import java.io.Serializable; -import org.apache.commons.math.exception.FunctionEvaluationException; import org.apache.commons.math.MathException; import org.apache.commons.math.exception.NotStrictlyPositiveException; import org.apache.commons.math.exception.NumberIsTooSmallException; @@ -254,28 +253,19 @@ public abstract class AbstractIntegerDis /** * Computes the cumulative probability function and checks for NaN * values returned. - * Throws MathException if the value is NaN. Wraps and rethrows any - * MathException encountered evaluating the cumulative probability - * function in a FunctionEvaluationException. - * Throws FunctionEvaluationException of the cumulative probability - * function returns NaN. + * Throws MathException if the value is NaN. Rethrows any MathException encountered + * evaluating the cumulative probability function. Throws + * MathException of the cumulative probability function returns NaN. * * @param argument Input value. * @return the cumulative probability. - * @throws FunctionEvaluationException if a MathException occurs - * computing the cumulative probability. */ private double checkedCumulativeProbability(int argument) - throws FunctionEvaluationException { + throws MathException { double result = Double.NaN; - try { result = cumulativeProbability(argument); - } catch (MathException ex) { - throw new FunctionEvaluationException(ex, argument, ex.getLocalizablePattern(), ex.getArguments()); - } if (Double.isNaN(result)) { - throw new FunctionEvaluationException(argument, - LocalizedFormats.DISCRETE_CUMULATIVE_PROBABILITY_RETURNED_NAN, argument); + throw new MathException(LocalizedFormats.DISCRETE_CUMULATIVE_PROBABILITY_RETURNED_NAN, argument); } return result; } Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java?rev=1035476&r1=1035475&r2=1035476&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java Mon Nov 15 22:39:56 2010 @@ -32,7 +32,7 @@ import org.apache.commons.math.exception * @since 2.2 * @version $Revision$ $Date$ */ -public class MathIllegalArgumentException extends IllegalArgumentException { +public class MathIllegalArgumentException extends IllegalArgumentException implements MathThrowable { /** Serializable version Id. */ private static final long serialVersionUID = -6024911025449780478L; @@ -72,6 +72,21 @@ public class MathIllegalArgumentExceptio this(null, general, args); } + /** {@inheritDoc} */ + public Localizable getSpecificPattern() { + return specific; + } + + /** {@inheritDoc} */ + public Localizable getGeneralPattern() { + return general; + } + + /** {@inheritDoc} */ + public Object[] getArguments() { + return arguments.clone(); + } + /** * Get the message in a specified locale. * Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalStateException.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalStateException.java?rev=1035476&r1=1035475&r2=1035476&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalStateException.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalStateException.java Mon Nov 15 22:39:56 2010 @@ -29,7 +29,7 @@ import org.apache.commons.math.exception * @since 2.2 * @version $Revision$ $Date$ */ -public class MathIllegalStateException extends IllegalStateException { +public class MathIllegalStateException extends IllegalStateException implements MathThrowable { /** Serializable version Id. */ private static final long serialVersionUID = -6024911025449780478L; @@ -69,6 +69,21 @@ public class MathIllegalStateException e this(null, general, args); } + /** {@inheritDoc} */ + public Localizable getSpecificPattern() { + return specific; + } + + /** {@inheritDoc} */ + public Localizable getGeneralPattern() { + return general; + } + + /** {@inheritDoc} */ + public Object[] getArguments() { + return arguments.clone(); + } + /** * Get the message in a specified locale. * @@ -91,4 +106,5 @@ public class MathIllegalStateException e public String getLocalizedMessage() { return getMessage(Locale.getDefault()); } + } Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathThrowable.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathThrowable.java?rev=1035476&view=auto ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathThrowable.java (added) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathThrowable.java Mon Nov 15 22:39:56 2010 @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.math.exception; + +import java.util.Locale; + +import org.apache.commons.math.exception.util.Localizable; + +/** +* Interface for commons-math throwables. +* +* @version $Revision$ $Date$ +* @since 2.2 +*/ +public interface MathThrowable { + + /** Gets the localizable pattern used to build the specific part of the message of this throwable. + * @return localizable pattern used to build the specific part of the message of this throwable + */ + Localizable getSpecificPattern(); + + /** Gets the localizable pattern used to build the general part of the message of this throwable. + * @return localizable pattern used to build the general part of the message of this throwable + */ + Localizable getGeneralPattern(); + + /** Gets the arguments used to build the message of this throwable. + * @return the arguments used to build the message of this throwable + */ + Object[] getArguments(); + + /** Gets the message in a specified locale. + * @param locale Locale in which the message should be translated + * @return localized message + */ + String getMessage(final Locale locale); + + /** Gets the message in a conventional US locale. + * @return localized message + */ + String getMessage(); + + /** Gets the message in the system default locale. + * @return localized message + */ + String getLocalizedMessage(); + +} Propchange: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathThrowable.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathThrowable.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUnsupportedOperationException.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUnsupportedOperationException.java?rev=1035476&r1=1035475&r2=1035476&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUnsupportedOperationException.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUnsupportedOperationException.java Mon Nov 15 22:39:56 2010 @@ -32,7 +32,7 @@ import org.apache.commons.math.exception * @since 2.2 * @version $Revision$ $Date$ */ -public class MathUnsupportedOperationException extends UnsupportedOperationException { +public class MathUnsupportedOperationException extends UnsupportedOperationException implements MathThrowable { /** Serializable version Id. */ private static final long serialVersionUID = -6024911025449780478L; @@ -63,6 +63,21 @@ public class MathUnsupportedOperationExc arguments = ArgUtils.flatten(args); } + /** {@inheritDoc} */ + public Localizable getSpecificPattern() { + return specific; + } + + /** {@inheritDoc} */ + public Localizable getGeneralPattern() { + return LocalizedFormats.UNSUPPORTED_OPERATION; + } + + /** {@inheritDoc} */ + public Object[] getArguments() { + return arguments.clone(); + } + /** * Get the message in a specified locale. * Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUserException.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUserException.java?rev=1035476&r1=1035475&r2=1035476&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUserException.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathUserException.java Mon Nov 15 22:39:56 2010 @@ -32,7 +32,7 @@ import org.apache.commons.math.exception * @since 2.2 * @version $Revision$ $Date$ */ -public class MathUserException extends RuntimeException { +public class MathUserException extends RuntimeException implements MathThrowable { /** Serializable version Id. */ private static final long serialVersionUID = -6024911025449780478L; /** @@ -116,6 +116,21 @@ public class MathUserException extends R this.arguments = ArgUtils.flatten(arguments); } + /** {@inheritDoc} */ + public Localizable getSpecificPattern() { + return specific; + } + + /** {@inheritDoc} */ + public Localizable getGeneralPattern() { + return general; + } + + /** {@inheritDoc} */ + public Object[] getArguments() { + return arguments.clone(); + } + /** * Get the message in a specified locale. * Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ConvergenceExceptionTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ConvergenceExceptionTest.java?rev=1035476&r1=1035475&r2=1035476&view=diff ============================================================================== --- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ConvergenceExceptionTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ConvergenceExceptionTest.java Mon Nov 15 22:39:56 2010 @@ -41,7 +41,7 @@ public class ConvergenceExceptionTest ex Object[] arguments = { Integer.valueOf(6), Integer.valueOf(4) }; ConvergenceException ex = new ConvergenceException(pattern, arguments); assertNull(ex.getCause()); - assertEquals(pattern, ex.getLocalizablePattern()); + assertEquals(pattern, ex.getGeneralPattern()); assertEquals(arguments.length, ex.getArguments().length); for (int i = 0; i < arguments.length; ++i) { assertEquals(arguments[i], ex.getArguments()[i]); @@ -64,7 +64,7 @@ public class ConvergenceExceptionTest ex Exception cause = new Exception(inMsg); ConvergenceException ex = new ConvergenceException(cause, pattern, arguments); assertEquals(cause, ex.getCause()); - assertEquals(pattern, ex.getLocalizablePattern()); + assertEquals(pattern, ex.getGeneralPattern()); assertEquals(arguments.length, ex.getArguments().length); for (int i = 0; i < arguments.length; ++i) { assertEquals(arguments[i], ex.getArguments()[i]); Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathConfigurationExceptionTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathConfigurationExceptionTest.java?rev=1035476&r1=1035475&r2=1035476&view=diff ============================================================================== --- commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathConfigurationExceptionTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathConfigurationExceptionTest.java Mon Nov 15 22:39:56 2010 @@ -40,7 +40,7 @@ public class MathConfigurationExceptionT Object[] arguments = { Integer.valueOf(6), Integer.valueOf(4) }; MathConfigurationException ex = new MathConfigurationException(pattern, arguments); assertNull(ex.getCause()); - assertEquals(pattern, ex.getLocalizablePattern()); + assertEquals(pattern, ex.getGeneralPattern()); assertEquals(arguments.length, ex.getArguments().length); for (int i = 0; i < arguments.length; ++i) { assertEquals(arguments[i], ex.getArguments()[i]); @@ -63,7 +63,7 @@ public class MathConfigurationExceptionT Exception cause = new Exception(inMsg); MathConfigurationException ex = new MathConfigurationException(cause, pattern, arguments); assertEquals(cause, ex.getCause()); - assertEquals(pattern, ex.getLocalizablePattern()); + assertEquals(pattern, ex.getGeneralPattern()); assertEquals(arguments.length, ex.getArguments().length); for (int i = 0; i < arguments.length; ++i) { assertEquals(arguments[i], ex.getArguments()[i]); Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathExceptionTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathExceptionTest.java?rev=1035476&r1=1035475&r2=1035476&view=diff ============================================================================== --- commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathExceptionTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathExceptionTest.java Mon Nov 15 22:39:56 2010 @@ -45,7 +45,7 @@ public class MathExceptionTest extends T Object[] arguments = { Integer.valueOf(6), Integer.valueOf(4) }; MathException ex = new MathException(pattern, arguments); assertNull(ex.getCause()); - assertEquals(pattern, ex.getLocalizablePattern()); + assertEquals(pattern, ex.getGeneralPattern()); assertEquals(arguments.length, ex.getArguments().length); for (int i = 0; i < arguments.length; ++i) { assertEquals(arguments[i], ex.getArguments()[i]); @@ -68,7 +68,7 @@ public class MathExceptionTest extends T Exception cause = new Exception(inMsg); MathException ex = new MathException(cause, pattern, arguments); assertEquals(cause, ex.getCause()); - assertEquals(pattern, ex.getLocalizablePattern()); + assertEquals(pattern, ex.getGeneralPattern()); assertEquals(arguments.length, ex.getArguments().length); for (int i = 0; i < arguments.length; ++i) { assertEquals(arguments[i], ex.getArguments()[i]);