From b7d8801c368778e370ef98832a1c6201e8197207 Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Mon, 16 Mar 2015 21:26:05 +0100 Subject: [PATCH] Add missing @Override tags, add final for member variables where applicable. --- .../commons/math4/exception/MathArithmeticException.java | 1 + .../commons/math4/exception/MathIllegalArgumentException.java | 1 + .../commons/math4/exception/MathIllegalStateException.java | 1 + .../apache/commons/math4/exception/MathRuntimeException.java | 1 + .../math4/exception/MathUnsupportedOperationException.java | 1 + .../apache/commons/math4/exception/NullArgumentException.java | 3 ++- .../apache/commons/math4/exception/util/DummyLocalizable.java | 2 ++ .../apache/commons/math4/exception/util/LocalizedFormats.java | 2 ++ 8 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/commons/math4/exception/MathArithmeticException.java b/src/main/java/org/apache/commons/math4/exception/MathArithmeticException.java index d753ad51c..7425bc502 100644 --- a/src/main/java/org/apache/commons/math4/exception/MathArithmeticException.java +++ b/src/main/java/org/apache/commons/math4/exception/MathArithmeticException.java @@ -58,6 +58,7 @@ public class MathArithmeticException extends ArithmeticException } /** {@inheritDoc} */ + @Override public ExceptionContext getContext() { return context; } diff --git a/src/main/java/org/apache/commons/math4/exception/MathIllegalArgumentException.java b/src/main/java/org/apache/commons/math4/exception/MathIllegalArgumentException.java index e97503182..efb7482d9 100644 --- a/src/main/java/org/apache/commons/math4/exception/MathIllegalArgumentException.java +++ b/src/main/java/org/apache/commons/math4/exception/MathIllegalArgumentException.java @@ -46,6 +46,7 @@ public class MathIllegalArgumentException extends IllegalArgumentException } /** {@inheritDoc} */ + @Override public ExceptionContext getContext() { return context; } diff --git a/src/main/java/org/apache/commons/math4/exception/MathIllegalStateException.java b/src/main/java/org/apache/commons/math4/exception/MathIllegalStateException.java index d353848de..76bb28020 100644 --- a/src/main/java/org/apache/commons/math4/exception/MathIllegalStateException.java +++ b/src/main/java/org/apache/commons/math4/exception/MathIllegalStateException.java @@ -70,6 +70,7 @@ public class MathIllegalStateException extends IllegalStateException } /** {@inheritDoc} */ + @Override public ExceptionContext getContext() { return context; } diff --git a/src/main/java/org/apache/commons/math4/exception/MathRuntimeException.java b/src/main/java/org/apache/commons/math4/exception/MathRuntimeException.java index 4dafc2c46..56fff8e59 100644 --- a/src/main/java/org/apache/commons/math4/exception/MathRuntimeException.java +++ b/src/main/java/org/apache/commons/math4/exception/MathRuntimeException.java @@ -47,6 +47,7 @@ public class MathRuntimeException extends RuntimeException } /** {@inheritDoc} */ + @Override public ExceptionContext getContext() { return context; } diff --git a/src/main/java/org/apache/commons/math4/exception/MathUnsupportedOperationException.java b/src/main/java/org/apache/commons/math4/exception/MathUnsupportedOperationException.java index bf32e31d1..ad45b602c 100644 --- a/src/main/java/org/apache/commons/math4/exception/MathUnsupportedOperationException.java +++ b/src/main/java/org/apache/commons/math4/exception/MathUnsupportedOperationException.java @@ -54,6 +54,7 @@ public class MathUnsupportedOperationException extends UnsupportedOperationExcep } /** {@inheritDoc} */ + @Override public ExceptionContext getContext() { return context; } diff --git a/src/main/java/org/apache/commons/math4/exception/NullArgumentException.java b/src/main/java/org/apache/commons/math4/exception/NullArgumentException.java index 5577042a7..06a3f8022 100644 --- a/src/main/java/org/apache/commons/math4/exception/NullArgumentException.java +++ b/src/main/java/org/apache/commons/math4/exception/NullArgumentException.java @@ -59,11 +59,12 @@ public class NullArgumentException extends NullPointerException context = new ExceptionContext(this); context.addMessage(pattern, arguments); } - + /** * {@inheritDoc} * @since 4.0 */ + @Override public ExceptionContext getContext() { return context; } diff --git a/src/main/java/org/apache/commons/math4/exception/util/DummyLocalizable.java b/src/main/java/org/apache/commons/math4/exception/util/DummyLocalizable.java index 97aa51b9a..16c67f519 100644 --- a/src/main/java/org/apache/commons/math4/exception/util/DummyLocalizable.java +++ b/src/main/java/org/apache/commons/math4/exception/util/DummyLocalizable.java @@ -39,11 +39,13 @@ public class DummyLocalizable implements Localizable { } /** {@inheritDoc} */ + @Override public String getSourceString() { return source; } /** {@inheritDoc} */ + @Override public String getLocalizedString(Locale locale) { return source; } diff --git a/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java b/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java index 6d300abed..547bfe3f3 100644 --- a/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java +++ b/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java @@ -379,11 +379,13 @@ public enum LocalizedFormats implements Localizable { } /** {@inheritDoc} */ + @Override public String getSourceString() { return sourceFormat; } /** {@inheritDoc} */ + @Override public String getLocalizedString(final Locale locale) { try { final String path = LocalizedFormats.class.getName().replaceAll("\\.", "/");