You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2020/04/04 15:41:25 UTC
[juneau] branch master updated: Rename FormattedXExceptions to
BasicXExceptions.
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new de9d2ed Rename FormattedXExceptions to BasicXExceptions.
de9d2ed is described below
commit de9d2edd8431d43de0cc21ab06f5f677c73da963
Author: JamesBognar <ja...@apache.org>
AuthorDate: Sat Apr 4 11:41:05 2020 -0400
Rename FormattedXExceptions to BasicXExceptions.
---
.../java/org/apache/juneau/xml/XmlIgnoreCommentsTest.java | 8 ++++----
.../java/org/apache/juneau/dto/swagger/HeaderInfo.java | 4 ++--
.../src/main/java/org/apache/juneau/dto/swagger/Items.java | 2 +-
.../java/org/apache/juneau/dto/swagger/ParameterInfo.java | 6 +++---
.../java/org/apache/juneau/dto/swagger/SecurityScheme.java | 2 +-
.../java/org/apache/juneau/jena/RdfSerializerSession.java | 2 +-
.../{FormattedException.java => BasicException.java} | 8 ++++----
...ntException.java => BasicIllegalArgumentException.java} | 10 +++++-----
...tedRuntimeException.java => BasicRuntimeException.java} | 6 +++---
.../src/main/java/org/apache/juneau/BeanContext.java | 10 +++++-----
.../src/main/java/org/apache/juneau/BeanPropertyMeta.java | 2 +-
.../java/org/apache/juneau/BeanRecursionException.java | 2 +-
.../main/java/org/apache/juneau/BeanRuntimeException.java | 2 +-
.../java/org/apache/juneau/ClassMetaRuntimeException.java | 2 +-
.../src/main/java/org/apache/juneau/ConfigException.java | 2 +-
.../java/org/apache/juneau/ContextRuntimeException.java | 2 +-
.../main/java/org/apache/juneau/ExecutableException.java | 2 +-
.../org/apache/juneau/InvalidDataConversionException.java | 2 +-
.../juneau/annotation/InvalidAnnotationException.java | 2 +-
.../src/main/java/org/apache/juneau/collections/Args.java | 2 +-
.../main/java/org/apache/juneau/internal/ClassUtils.java | 6 +++---
.../java/org/apache/juneau/internal/CollectionUtils.java | 2 +-
.../main/java/org/apache/juneau/internal/FileUtils.java | 10 +++++-----
.../src/main/java/org/apache/juneau/internal/IOUtils.java | 4 ++--
.../main/java/org/apache/juneau/internal/SimpleMap.java | 2 +-
.../java/org/apache/juneau/internal/ThrowableUtils.java | 6 +++---
.../main/java/org/apache/juneau/parser/ParseException.java | 2 +-
.../java/org/apache/juneau/pojotools/PatternException.java | 2 +-
.../org/apache/juneau/pojotools/TimeMatcherFactory.java | 2 +-
.../src/main/java/org/apache/juneau/reflect/ClassInfo.java | 10 +++++-----
.../org/apache/juneau/serializer/SerializeException.java | 2 +-
.../java/org/apache/juneau/svl/VarResolverException.java | 2 +-
.../src/main/java/org/apache/juneau/utils/PojoQuery.java | 6 +++---
.../java/org/apache/juneau/utils/PojoRestException.java | 2 +-
.../src/main/java/org/apache/juneau/utils/SearchArgs.java | 2 +-
.../src/main/java/org/apache/juneau/xml/Namespace.java | 6 +++---
.../main/java/org/apache/juneau/xml/XmlParserSession.java | 2 +-
.../juneau/xmlschema/XmlSchemaSerializerSession.java | 4 ++--
.../apache/juneau/examples/rest/ContentComboTestBase.java | 2 +-
.../juneau/microservice/jetty/BasicJettyServerFactory.java | 2 +-
.../juneau/microservice/jetty/JettyMicroservice.java | 6 +++---
.../microservice/jetty/JettyMicroserviceBuilder.java | 2 +-
.../main/java/org/apache/juneau/rest/client/RestCall.java | 2 +-
.../apache/juneau/rest/client/SerializedNameValuePair.java | 4 ++--
.../juneau/rest/client/remote/RemoteMetadataException.java | 2 +-
.../apache/juneau/rest/client2/ext/SerializedHeader.java | 4 ++--
.../juneau/rest/client2/ext/SerializedNameValuePair.java | 4 ++--
.../src/main/java/org/apache/juneau/rest/RestContext.java | 2 +-
.../java/org/apache/juneau/rest/RestContextBuilder.java | 2 +-
.../org/apache/juneau/rest/annotation/RestConfigApply.java | 14 +++++++-------
.../juneau/rest/annotation/RestResourceConfigApply.java | 8 ++++----
.../org/apache/juneau/rest/helper/BeanDescription.java | 2 +-
.../main/java/org/apache/juneau/rest/util/RestUtils.java | 2 +-
53 files changed, 104 insertions(+), 104 deletions(-)
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/XmlIgnoreCommentsTest.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/XmlIgnoreCommentsTest.java
index 6a7fc2e..45144d0 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/XmlIgnoreCommentsTest.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/XmlIgnoreCommentsTest.java
@@ -696,7 +696,7 @@ public class XmlIgnoreCommentsTest {
} catch (ComparisonFailure e) {
throw new ComparisonFailure(MessageFormat.format("Test ''{0}'' failed with comparison error", label), e.getExpected(), e.getActual());
} catch (Exception e) {
- throw new FormattedRuntimeException(e, "Test ''{0}'' failed with error ''{1}''", label, e.getMessage());
+ throw new BasicRuntimeException(e, "Test ''{0}'' failed with error ''{1}''", label, e.getMessage());
}
}
@@ -708,7 +708,7 @@ public class XmlIgnoreCommentsTest {
} catch (ComparisonFailure e) {
throw new ComparisonFailure(MessageFormat.format("Test ''{0}'' failed with comparison error", label), e.getExpected(), e.getActual());
} catch (Exception e) {
- throw new FormattedRuntimeException(e, "Test ''{0}'' failed with error ''{1}''", label, e.getMessage());
+ throw new BasicRuntimeException(e, "Test ''{0}'' failed with error ''{1}''", label, e.getMessage());
}
}
@@ -721,7 +721,7 @@ public class XmlIgnoreCommentsTest {
} catch (ComparisonFailure e) {
throw new ComparisonFailure(MessageFormat.format("Test ''{0}'' failed with comparison error", label), e.getExpected(), e.getActual());
} catch (Exception e) {
- throw new FormattedRuntimeException(e, "Test ''{0}'' failed with error ''{1}''", label, e.getMessage());
+ throw new BasicRuntimeException(e, "Test ''{0}'' failed with error ''{1}''", label, e.getMessage());
}
}
@@ -734,7 +734,7 @@ public class XmlIgnoreCommentsTest {
} catch (ComparisonFailure e) {
throw new ComparisonFailure(MessageFormat.format("Test ''{0}'' failed with comparison error", label), e.getExpected(), e.getActual());
} catch (Exception e) {
- throw new FormattedRuntimeException(e, "Test ''{0}'' failed with error ''{1}''", label, e.getMessage());
+ throw new BasicRuntimeException(e, "Test ''{0}'' failed with error ''{1}''", label, e.getMessage());
}
}
diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/HeaderInfo.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/HeaderInfo.java
index c87db1d..8d678cc 100644
--- a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/HeaderInfo.java
+++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/HeaderInfo.java
@@ -209,7 +209,7 @@ public class HeaderInfo extends SwaggerElement {
*/
public HeaderInfo setType(String value) {
if (isStrict() && ! contains(value, VALID_TYPES))
- throw new FormattedRuntimeException(
+ throw new BasicRuntimeException(
"Invalid value passed in to setType(String). Value=''{0}'', valid values={1}",
value, VALID_TYPES
);
@@ -360,7 +360,7 @@ public class HeaderInfo extends SwaggerElement {
*/
public HeaderInfo setCollectionFormat(String value) {
if (isStrict() && ! contains(value, VALID_COLLECTION_FORMATS))
- throw new FormattedRuntimeException(
+ throw new BasicRuntimeException(
"Invalid value passed in to setCollectionFormat(String). Value=''{0}'', valid values={1}",
value, VALID_COLLECTION_FORMATS
);
diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/Items.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/Items.java
index f19d296..1086dde 100644
--- a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/Items.java
+++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/Items.java
@@ -329,7 +329,7 @@ public class Items extends SwaggerElement {
*/
public Items setCollectionFormat(String value) {
if (isStrict() && ! contains(value, VALID_COLLECTION_FORMATS))
- throw new FormattedRuntimeException(
+ throw new BasicRuntimeException(
"Invalid value passed in to setCollectionFormat(String). Value=''{0}'', valid values={1}",
value, VALID_COLLECTION_FORMATS
);
diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/ParameterInfo.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/ParameterInfo.java
index e04b5ba..cd56128 100644
--- a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/ParameterInfo.java
+++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/ParameterInfo.java
@@ -354,7 +354,7 @@ public class ParameterInfo extends SwaggerElement {
*/
public ParameterInfo setIn(String value) {
if (isStrict() && ! contains(value, VALID_IN))
- throw new FormattedRuntimeException(
+ throw new BasicRuntimeException(
"Invalid value passed in to setIn(String). Value=''{0}'', valid values={1}",
value, VALID_IN
);
@@ -566,7 +566,7 @@ public class ParameterInfo extends SwaggerElement {
*/
public ParameterInfo setType(String value) {
if (isStrict() && ! contains(value, VALID_TYPES))
- throw new FormattedRuntimeException(
+ throw new BasicRuntimeException(
"Invalid value passed in to setType(String). Value=''{0}'', valid values={1}",
value, VALID_TYPES
);
@@ -782,7 +782,7 @@ public class ParameterInfo extends SwaggerElement {
*/
public ParameterInfo setCollectionFormat(String value) {
if (isStrict() && ! contains(value, VALID_COLLECTION_FORMATS))
- throw new FormattedRuntimeException(
+ throw new BasicRuntimeException(
"Invalid value passed in to setCollectionFormat(String). Value=''{0}'', valid values={1}",
value, VALID_COLLECTION_FORMATS
);
diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/SecurityScheme.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/SecurityScheme.java
index 2942fd2..7c45ff3 100644
--- a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/SecurityScheme.java
+++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/SecurityScheme.java
@@ -150,7 +150,7 @@ public class SecurityScheme extends SwaggerElement {
*/
public SecurityScheme setType(String value) {
if (isStrict() && ! contains(value, VALID_TYPES))
- throw new FormattedRuntimeException(
+ throw new BasicRuntimeException(
"Invalid value passed in to setType(String). Value=''{0}'', valid values={1}",
value, VALID_TYPES
);
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java
index bae1fc9..ca86dd0 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfSerializerSession.java
@@ -73,7 +73,7 @@ public final class RdfSerializerSession extends WriterSerializerSession {
// Only apply properties with this prefix!
String propPrefix = RdfCommon.LANG_PROP_MAP.get(ctx.getLanguage());
if (propPrefix == null)
- throw new FormattedRuntimeException("Unknown RDF language encountered: ''{0}''", ctx.getLanguage());
+ throw new BasicRuntimeException("Unknown RDF language encountered: ''{0}''", ctx.getLanguage());
// RDF/XML specific properties.
if (propPrefix.equals("rdfXml.")) {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/FormattedException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BasicException.java
similarity index 88%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/FormattedException.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BasicException.java
index 11096f1..2c6fb28 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/FormattedException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BasicException.java
@@ -19,7 +19,7 @@ import java.text.*;
/**
* Subclass of non-runtime exceptions that take in a message and zero or more arguments.
*/
-public class FormattedException extends Exception {
+public class BasicException extends Exception {
private static final long serialVersionUID = 1L;
@@ -29,7 +29,7 @@ public class FormattedException extends Exception {
* @param message The {@link MessageFormat}-style message.
* @param args Optional {@link MessageFormat}-style arguments.
*/
- public FormattedException(String message, Object...args) {
+ public BasicException(String message, Object...args) {
super(format(message, args));
}
@@ -40,7 +40,7 @@ public class FormattedException extends Exception {
* @param message The {@link MessageFormat}-style message.
* @param args Optional {@link MessageFormat}-style arguments.
*/
- public FormattedException(Throwable causedBy, String message, Object...args) {
+ public BasicException(Throwable causedBy, String message, Object...args) {
this(message, args);
initCause(causedBy);
}
@@ -50,7 +50,7 @@ public class FormattedException extends Exception {
*
* @param causedBy The cause of this exception.
*/
- public FormattedException(Throwable causedBy) {
+ public BasicException(Throwable causedBy) {
this(causedBy, causedBy.getLocalizedMessage());
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/FormattedIllegalArgumentException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BasicIllegalArgumentException.java
similarity index 80%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/FormattedIllegalArgumentException.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BasicIllegalArgumentException.java
index 21dcb94..7f976a3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/FormattedIllegalArgumentException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BasicIllegalArgumentException.java
@@ -21,7 +21,7 @@ import org.apache.juneau.reflect.*;
/**
* Subclass of illegal-argument exceptions that take in a message and zero or more arguments.
*/
-public class FormattedIllegalArgumentException extends IllegalArgumentException {
+public class BasicIllegalArgumentException extends IllegalArgumentException {
private static final long serialVersionUID = 1L;
@@ -31,7 +31,7 @@ public class FormattedIllegalArgumentException extends IllegalArgumentException
* @param message The {@link MessageFormat}-style message.
* @param args Optional {@link MessageFormat}-style arguments.
*/
- public FormattedIllegalArgumentException(String message, Object...args) {
+ public BasicIllegalArgumentException(String message, Object...args) {
super(format(message, args));
}
@@ -42,19 +42,19 @@ public class FormattedIllegalArgumentException extends IllegalArgumentException
* @param message The {@link MessageFormat}-style message.
* @param args Optional {@link MessageFormat}-style arguments.
*/
- public FormattedIllegalArgumentException(Throwable causedBy, String message, Object...args) {
+ public BasicIllegalArgumentException(Throwable causedBy, String message, Object...args) {
this(message, args);
initCause(causedBy);
}
/**
- * Throws a {@link FormattedIllegalArgumentException} if the specified method does not only contain args of the specified types.
+ * Throws a {@link BasicIllegalArgumentException} if the specified method does not only contain args of the specified types.
*
* @param m The method to check.
* @param args The allowed args.
*/
public static void assertArgsOnlyOfType(MethodInfo m, Class<?>...args) {
if (! m.argsOnlyOfType(args))
- throw new FormattedIllegalArgumentException("Invalid arguments passed to method {0}. Only arguments of type {1} are allowed.", m, args);
+ throw new BasicIllegalArgumentException("Invalid arguments passed to method {0}. Only arguments of type {1} are allowed.", m, args);
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/FormattedRuntimeException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BasicRuntimeException.java
similarity index 90%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/FormattedRuntimeException.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BasicRuntimeException.java
index 1facd7f..24d5e6a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/FormattedRuntimeException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BasicRuntimeException.java
@@ -19,7 +19,7 @@ import java.text.*;
/**
* Subclass of runtime exceptions that take in a message and zero or more arguments.
*/
-public class FormattedRuntimeException extends RuntimeException {
+public class BasicRuntimeException extends RuntimeException {
private static final long serialVersionUID = 1L;
@@ -29,7 +29,7 @@ public class FormattedRuntimeException extends RuntimeException {
* @param message The {@link MessageFormat}-style message.
* @param args Optional {@link MessageFormat}-style arguments.
*/
- public FormattedRuntimeException(String message, Object...args) {
+ public BasicRuntimeException(String message, Object...args) {
super(format(message, args));
}
@@ -40,7 +40,7 @@ public class FormattedRuntimeException extends RuntimeException {
* @param message The {@link MessageFormat}-style message.
* @param args Optional {@link MessageFormat}-style arguments.
*/
- public FormattedRuntimeException(Throwable cause, String message, Object...args) {
+ public BasicRuntimeException(Throwable cause, String message, Object...args) {
this(getMessage(cause, message, null), args);
initCause(cause);
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
index 3f49bc9..5198d2b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
@@ -2549,7 +2549,7 @@ public class BeanContext extends Context implements MetaProvider {
else if (ci.isChildOf(Surrogate.class))
lpf.addAll(SurrogateSwap.findPojoSwaps(ci.inner(), this));
else
- throw new FormattedRuntimeException("Invalid class {0} specified in BeanContext.pojoSwaps property. Must be a subclass of PojoSwap or Surrogate.", ci.inner());
+ throw new BasicRuntimeException("Invalid class {0} specified in BeanContext.pojoSwaps property. Must be a subclass of PojoSwap or Surrogate.", ci.inner());
} else if (o instanceof PojoSwap) {
lpf.add((PojoSwap)o);
}
@@ -3077,7 +3077,7 @@ public class BeanContext extends Context implements MetaProvider {
if (cm2.isMap()) {
Class<?>[] pParams = (px.params().length == 0 ? new Class[]{Object.class, Object.class} : px.params());
if (pParams.length != 2)
- throw new FormattedRuntimeException("Invalid number of parameters specified for Map (must be 2): {0}", pParams.length);
+ throw new BasicRuntimeException("Invalid number of parameters specified for Map (must be 2): {0}", pParams.length);
ClassMeta<?> keyType = resolveType(pParams[0], cm2.getKeyType(), cm.getKeyType());
ClassMeta<?> valueType = resolveType(pParams[1], cm2.getValueType(), cm.getValueType());
if (keyType.isObject() && valueType.isObject())
@@ -3088,7 +3088,7 @@ public class BeanContext extends Context implements MetaProvider {
if (cm2.isCollection() || cm2.isOptional()) {
Class<?>[] pParams = (px.params().length == 0 ? new Class[]{Object.class} : px.params());
if (pParams.length != 1)
- throw new FormattedRuntimeException("Invalid number of parameters specified for "+(cm2.isCollection() ? "Collection" : cm2.isOptional() ? "Optional" : "Array")+" (must be 1): {0}", pParams.length);
+ throw new BasicRuntimeException("Invalid number of parameters specified for "+(cm2.isCollection() ? "Collection" : cm2.isOptional() ? "Optional" : "Array")+" (must be 1): {0}", pParams.length);
ClassMeta<?> elementType = resolveType(pParams[0], cm2.getElementType(), cm.getElementType());
if (elementType.isObject())
return cm2;
@@ -3106,7 +3106,7 @@ public class BeanContext extends Context implements MetaProvider {
if (cm2.isMap()) {
Class<?>[] pParams = (p.params().length == 0 ? new Class[]{Object.class, Object.class} : p.params());
if (pParams.length != 2)
- throw new FormattedRuntimeException("Invalid number of parameters specified for Map (must be 2): {0}", pParams.length);
+ throw new BasicRuntimeException("Invalid number of parameters specified for Map (must be 2): {0}", pParams.length);
ClassMeta<?> keyType = resolveType(pParams[0], cm2.getKeyType(), cm.getKeyType());
ClassMeta<?> valueType = resolveType(pParams[1], cm2.getValueType(), cm.getValueType());
if (keyType.isObject() && valueType.isObject())
@@ -3117,7 +3117,7 @@ public class BeanContext extends Context implements MetaProvider {
if (cm2.isCollection() || cm2.isOptional()) {
Class<?>[] pParams = (p.params().length == 0 ? new Class[]{Object.class} : p.params());
if (pParams.length != 1)
- throw new FormattedRuntimeException("Invalid number of parameters specified for "+(cm2.isCollection() ? "Collection" : cm2.isOptional() ? "Optional" : "Array")+" (must be 1): {0}", pParams.length);
+ throw new BasicRuntimeException("Invalid number of parameters specified for "+(cm2.isCollection() ? "Collection" : cm2.isOptional() ? "Optional" : "Array")+" (must be 1): {0}", pParams.length);
ClassMeta<?> elementType = resolveType(pParams[0], cm2.getElementType(), cm.getElementType());
if (elementType.isObject())
return cm2;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
index 6fbdf3b..c252bb9 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
@@ -361,7 +361,7 @@ public final class BeanPropertyMeta {
}
if (ci.isChildOf(Surrogate.class))
throw new RuntimeException("TODO - Surrogate swaps not yet supported on bean properties.");
- throw new FormattedRuntimeException("Invalid class used in @Swap annotation. Must be a subclass of PojoSwap or Surrogate.", c);
+ throw new BasicRuntimeException("Invalid class used in @Swap annotation. Must be a subclass of PojoSwap or Surrogate.", c);
}
BeanPropertyMeta.Builder setGetter(Method getter) {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRecursionException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRecursionException.java
index 798feb0..2789218 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRecursionException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRecursionException.java
@@ -17,7 +17,7 @@ import java.text.*;
/**
* Exception that indicates that a recursion was detected while traversing a POJO model.
*/
-public class BeanRecursionException extends FormattedException {
+public class BeanRecursionException extends BasicException {
private static final long serialVersionUID = 1L;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRuntimeException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRuntimeException.java
index 7a426ce..ab1a243 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRuntimeException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRuntimeException.java
@@ -17,7 +17,7 @@ import java.text.*;
/**
* General bean runtime operation exception.
*/
-public final class BeanRuntimeException extends FormattedRuntimeException {
+public final class BeanRuntimeException extends BasicRuntimeException {
private static final long serialVersionUID = 1L;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMetaRuntimeException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMetaRuntimeException.java
index 754bb4a..cd3b8a3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMetaRuntimeException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMetaRuntimeException.java
@@ -17,7 +17,7 @@ import java.text.*;
/**
* General class metadata runtime operation exception.
*/
-public final class ClassMetaRuntimeException extends FormattedRuntimeException {
+public final class ClassMetaRuntimeException extends BasicRuntimeException {
private static final long serialVersionUID = 1L;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ConfigException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ConfigException.java
index 63b81c7..f6e52bb 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ConfigException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ConfigException.java
@@ -17,7 +17,7 @@ import java.text.*;
/**
* An exception that typically occurs when trying to perform an invalid operation on a configuration property.
*/
-public class ConfigException extends FormattedRuntimeException {
+public class ConfigException extends BasicRuntimeException {
private static final long serialVersionUID = 1L;
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ContextRuntimeException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ContextRuntimeException.java
index a98eefd..b4ac4f9 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ContextRuntimeException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ContextRuntimeException.java
@@ -17,7 +17,7 @@ import java.text.*;
/**
* General runtime operation exception that can occur in any of the context classes.
*/
-public final class ContextRuntimeException extends FormattedRuntimeException {
+public final class ContextRuntimeException extends BasicRuntimeException {
private static final long serialVersionUID = 1L;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ExecutableException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ExecutableException.java
index d06b085..764c382 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ExecutableException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ExecutableException.java
@@ -17,7 +17,7 @@ import java.text.MessageFormat;
/**
* General exception that occurs when trying to execute a constructor, method, or field using reflection.
*/
-public class ExecutableException extends FormattedException {
+public class ExecutableException extends BasicException {
private static final long serialVersionUID = 1L;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/InvalidDataConversionException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/InvalidDataConversionException.java
index f962368..5957339 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/InvalidDataConversionException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/InvalidDataConversionException.java
@@ -26,7 +26,7 @@ import org.apache.juneau.reflect.*;
* Exception that gets thrown if you try to perform an invalid conversion, such as when calling
* {@code OMap.getInt(...)} on a non-numeric <c>String</c>.
*/
-public final class InvalidDataConversionException extends FormattedRuntimeException {
+public final class InvalidDataConversionException extends BasicRuntimeException {
private static final long serialVersionUID = 1L;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/InvalidAnnotationException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/InvalidAnnotationException.java
index 6f8fbed..1f02c17 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/InvalidAnnotationException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/InvalidAnnotationException.java
@@ -21,7 +21,7 @@ import org.apache.juneau.reflect.*;
* Defines an invalid usage of an annotation.
*
*/
-public class InvalidAnnotationException extends FormattedRuntimeException {
+public class InvalidAnnotationException extends BasicRuntimeException {
private static final long serialVersionUID = 1L;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/Args.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/Args.java
index e8f7f5f..c899622 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/Args.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/Args.java
@@ -131,7 +131,7 @@ public final class Args extends OMap {
if (startsWith(s, '-')) {
key = s.substring(1);
if (key.matches("\\d*"))
- throw new FormattedRuntimeException("Invalid optional key name ''{0}''", key);
+ throw new BasicRuntimeException("Invalid optional key name ''{0}''", key);
if (! containsKey(key))
put(key, new OList());
} else {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/ClassUtils.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/ClassUtils.java
index f8ca790..1792849 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/ClassUtils.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/ClassUtils.java
@@ -151,14 +151,14 @@ public final class ClassUtils {
return con.<T>invoke(getMatchingArgs(con.getParamTypes(), args));
}
- throw new FormattedRuntimeException("Could not instantiate class {0}/{1}. Constructor not found.", c.getName(), c2);
+ throw new BasicRuntimeException("Could not instantiate class {0}/{1}. Constructor not found.", c.getName(), c2);
} catch (Exception e) {
- throw new FormattedRuntimeException(e, "Could not instantiate class {0}", c.getName());
+ throw new BasicRuntimeException(e, "Could not instantiate class {0}", c.getName());
}
} else if (ClassInfo.of(c).isParentOf(c2.getClass())) {
return (T)c2;
} else {
- throw new FormattedRuntimeException("Object of type {0} found but was expecting {1}.", c2.getClass(), c.getClass());
+ throw new BasicRuntimeException("Object of type {0} found but was expecting {1}.", c2.getClass(), c.getClass());
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/CollectionUtils.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/CollectionUtils.java
index b4ca229..81275a1 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/CollectionUtils.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/CollectionUtils.java
@@ -139,7 +139,7 @@ public final class CollectionUtils {
for (Map.Entry<Object,Object> e : ((Map<Object,Object>)o).entrySet())
m.put(toType(e.getKey(), keyType), toType(e.getValue(), valueType, valueTypeArgs));
} else {
- throw new FormattedRuntimeException("Invalid object type {0} passed to addToMap()", o.getClass().getName());
+ throw new BasicRuntimeException("Invalid object type {0} passed to addToMap()", o.getClass().getName());
}
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/FileUtils.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/FileUtils.java
index 4c0612a..76c2c2a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/FileUtils.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/FileUtils.java
@@ -37,13 +37,13 @@ public class FileUtils {
if (f.exists()) {
if (clean) {
if (! delete(f))
- throw new FormattedRuntimeException("Could not clean directory ''{0}''", f.getAbsolutePath());
+ throw new BasicRuntimeException("Could not clean directory ''{0}''", f.getAbsolutePath());
} else {
return f;
}
}
if (! f.mkdirs())
- throw new FormattedRuntimeException("Could not create directory ''{0}''", f.getAbsolutePath());
+ throw new BasicRuntimeException("Could not create directory ''{0}''", f.getAbsolutePath());
return f;
}
@@ -90,7 +90,7 @@ public class FileUtils {
return;
try {
if (! f.createNewFile())
- throw new FormattedRuntimeException("Could not create file ''{0}''", f.getAbsolutePath());
+ throw new BasicRuntimeException("Could not create file ''{0}''", f.getAbsolutePath());
} catch (IOException e) {
throw new RuntimeException(e);
}
@@ -110,13 +110,13 @@ public class FileUtils {
if (lm == l)
l++;
if (! f.setLastModified(l))
- throw new FormattedRuntimeException("Could not modify timestamp on file ''{0}''", f.getAbsolutePath());
+ throw new BasicRuntimeException("Could not modify timestamp on file ''{0}''", f.getAbsolutePath());
// Linux only gives 1s precision, so set the date 1s into the future.
if (lm == f.lastModified()) {
l += 1000;
if (! f.setLastModified(l))
- throw new FormattedRuntimeException("Could not modify timestamp on file ''{0}''", f.getAbsolutePath());
+ throw new BasicRuntimeException("Could not modify timestamp on file ''{0}''", f.getAbsolutePath());
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/IOUtils.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/IOUtils.java
index 63417ca..ade85fb 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/IOUtils.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/IOUtils.java
@@ -625,7 +625,7 @@ public final class IOUtils {
return new InputStreamReader((InputStream)o, "UTF-8");
if (o instanceof byte[])
return new InputStreamReader(new ByteArrayInputStream((byte[])o), "UTF-8");
- throw new FormattedIllegalArgumentException("Invalid object of type {0} passed to IOUtils.toReader(Object)", o.getClass());
+ throw new BasicIllegalArgumentException("Invalid object of type {0} passed to IOUtils.toReader(Object)", o.getClass());
}
/**
@@ -659,7 +659,7 @@ public final class IOUtils {
return new ByteArrayInputStream(((CharSequence)o).toString().getBytes(UTF8));
if (o instanceof Reader)
return new ByteArrayInputStream(IOUtils.read((Reader)o).getBytes(UTF8));
- throw new FormattedIllegalArgumentException("Invalid object of type {0} passed to IOUtils.toInputStream(Object)", o.getClass());
+ throw new BasicIllegalArgumentException("Invalid object of type {0} passed to IOUtils.toInputStream(Object)", o.getClass());
}
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/SimpleMap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/SimpleMap.java
index 746f1b8..ee09132 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/SimpleMap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/SimpleMap.java
@@ -91,7 +91,7 @@ public final class SimpleMap<K,V> extends AbstractMap<K,V> {
return v;
}
}
- throw new FormattedIllegalArgumentException("No key ''{0}'' defined in map", key);
+ throw new BasicIllegalArgumentException("No key ''{0}'' defined in map", key);
}
final class SimpleMapEntry implements Map.Entry<K,V> {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/ThrowableUtils.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/ThrowableUtils.java
index 7c2b01e..6cf147a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/ThrowableUtils.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/ThrowableUtils.java
@@ -31,7 +31,7 @@ public class ThrowableUtils {
*/
public static void assertNotNull(Object o, String msg, Object...args) throws IllegalArgumentException {
if (o == null)
- throw new FormattedIllegalArgumentException(msg, args);
+ throw new BasicIllegalArgumentException(msg, args);
}
/**
@@ -66,7 +66,7 @@ public class ThrowableUtils {
* @throws IllegalArgumentException Constructed exception.
*/
public static void illegalArg(String msg, Object...args) throws IllegalArgumentException {
- throw new FormattedIllegalArgumentException(msg, args);
+ throw new BasicIllegalArgumentException(msg, args);
}
/**
@@ -79,6 +79,6 @@ public class ThrowableUtils {
*/
public static void assertSameThread(long threadId, String msg, Object...args) throws IllegalStateException {
if (Thread.currentThread().getId() != threadId)
- throw new FormattedIllegalArgumentException(msg, args);
+ throw new BasicIllegalArgumentException(msg, args);
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParseException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParseException.java
index 72bb9a2..e98c581 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParseException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParseException.java
@@ -26,7 +26,7 @@ import org.apache.juneau.serializer.*;
/**
* Exception that indicates invalid syntax encountered during parsing.
*/
-public class ParseException extends FormattedException {
+public class ParseException extends BasicException {
private static final long serialVersionUID = 1L;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/pojotools/PatternException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/pojotools/PatternException.java
index e6bfb4e..f22c88b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/pojotools/PatternException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/pojotools/PatternException.java
@@ -17,7 +17,7 @@ import org.apache.juneau.*;
/**
* Indicates an invalid search pattern was specified.
*/
-public class PatternException extends FormattedRuntimeException {
+public class PatternException extends BasicRuntimeException {
private static final long serialVersionUID = 1L;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/pojotools/TimeMatcherFactory.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/pojotools/TimeMatcherFactory.java
index 9eb9263..10d6742 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/pojotools/TimeMatcherFactory.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/pojotools/TimeMatcherFactory.java
@@ -424,7 +424,7 @@ public class TimeMatcherFactory extends MatcherFactory {
}
}
- throw new FormattedRuntimeException("Invalid date encountered: ''{0}''", seg);
+ throw new BasicRuntimeException("Invalid date encountered: ''{0}''", seg);
}
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/reflect/ClassInfo.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/reflect/ClassInfo.java
index da29be1..07b9104 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/reflect/ClassInfo.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/reflect/ClassInfo.java
@@ -2251,7 +2251,7 @@ public final class ClassInfo {
*/
public Class<?> getParameterType(int index, Class<?> pt) {
if (pt == null)
- throw new FormattedIllegalArgumentException("Parameterized type cannot be null");
+ throw new BasicIllegalArgumentException("Parameterized type cannot be null");
// We need to make up a mapping of type names.
Map<Type,Type> typeMap = new HashMap<>();
@@ -2260,18 +2260,18 @@ public final class ClassInfo {
extractTypes(typeMap, cc);
cc = cc.getSuperclass();
if (cc == null)
- throw new FormattedIllegalArgumentException("Class ''{0}'' is not a subclass of parameterized type ''{1}''", c.getSimpleName(), pt.getSimpleName());
+ throw new BasicIllegalArgumentException("Class ''{0}'' is not a subclass of parameterized type ''{1}''", c.getSimpleName(), pt.getSimpleName());
}
Type gsc = cc.getGenericSuperclass();
if (! (gsc instanceof ParameterizedType))
- throw new FormattedIllegalArgumentException("Class ''{0}'' is not a parameterized type", pt.getSimpleName());
+ throw new BasicIllegalArgumentException("Class ''{0}'' is not a parameterized type", pt.getSimpleName());
ParameterizedType cpt = (ParameterizedType)gsc;
Type[] atArgs = cpt.getActualTypeArguments();
if (index >= atArgs.length)
- throw new FormattedIllegalArgumentException("Invalid type index. index={0}, argsLength={1}", index, atArgs.length);
+ throw new BasicIllegalArgumentException("Invalid type index. index={0}, argsLength={1}", index, atArgs.length);
Type actualType = cpt.getActualTypeArguments()[index];
if (typeMap.containsKey(actualType))
@@ -2307,7 +2307,7 @@ public final class ClassInfo {
} else if (actualType instanceof ParameterizedType) {
return (Class<?>)((ParameterizedType)actualType).getRawType();
}
- throw new FormattedIllegalArgumentException("Could not resolve variable ''{0}'' to a type.", actualType.getTypeName());
+ throw new BasicIllegalArgumentException("Could not resolve variable ''{0}'' to a type.", actualType.getTypeName());
}
private static boolean isInnerClass(GenericDeclaration od, GenericDeclaration id) {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializeException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializeException.java
index 9050d39..7e9ec35 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializeException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializeException.java
@@ -24,7 +24,7 @@ import org.apache.juneau.json.*;
/**
* General exception thrown whenever an error occurs during serialization.
*/
-public class SerializeException extends FormattedException {
+public class SerializeException extends BasicException {
private static final long serialVersionUID = 1L;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/VarResolverException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/VarResolverException.java
index f710b22..aa9e7da 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/VarResolverException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/VarResolverException.java
@@ -19,7 +19,7 @@ import org.apache.juneau.*;
/**
* Exception that occurs during a var resolver session.
*/
-public class VarResolverException extends FormattedRuntimeException {
+public class VarResolverException extends BasicRuntimeException {
private static final long serialVersionUID = 1L;
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/PojoQuery.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/PojoQuery.java
index 9b90b33..811b63e 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/PojoQuery.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/PojoQuery.java
@@ -226,7 +226,7 @@ public final class PojoQuery {
return null;
if (! type.isCollectionOrArray())
- throw new FormattedRuntimeException("Cannot call filterCollection() on class type ''{0}''", type);
+ throw new BasicRuntimeException("Cannot call filterCollection() on class type ''{0}''", type);
// Create a new OList
OList l = (OList)replaceWithMutables(input);
@@ -550,7 +550,7 @@ public final class PojoQuery {
// If a non-numeric value was passed in for a numeric value, just set the value to '0'.
// (I think this might resolve a workaround in custom queries).
if (! m.matches())
- throw new FormattedRuntimeException("Numeric value didn't match pattern: ''{0}''", token);
+ throw new BasicRuntimeException("Numeric value didn't match pattern: ''{0}''", token);
//m = numericPattern.matcher("0");
String arg1 = m.group(1);
@@ -871,7 +871,7 @@ public final class PojoQuery {
}
if (cal == null)
- throw new FormattedRuntimeException("Invalid date encountered: ''{0}''", seg);
+ throw new BasicRuntimeException("Invalid date encountered: ''{0}''", seg);
return cal;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/PojoRestException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/PojoRestException.java
index 76ff9eb..3110653 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/PojoRestException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/PojoRestException.java
@@ -37,7 +37,7 @@ import org.apache.juneau.*;
* - Attempting to overwrite the root object.
* </ul>
*/
-public final class PojoRestException extends FormattedRuntimeException {
+public final class PojoRestException extends BasicRuntimeException {
private static final long serialVersionUID = 1L;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/SearchArgs.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/SearchArgs.java
index 6a2c2ff..21f12ce 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/SearchArgs.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/SearchArgs.java
@@ -92,7 +92,7 @@ public class SearchArgs {
for (String s : StringUtils.split(searchTerms)) {
int i = StringUtils.indexOf(s, '=', '>', '<');
if (i == -1)
- throw new FormattedRuntimeException("Invalid search terms: ''{0}''", searchTerms);
+ throw new BasicRuntimeException("Invalid search terms: ''{0}''", searchTerms);
char c = s.charAt(i);
search(s.substring(0, i).trim(), s.substring(c == '=' ? i+1 : i).trim());
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/Namespace.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/Namespace.java
index 4c04540..fb264a3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/Namespace.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/Namespace.java
@@ -91,7 +91,7 @@ public final class Namespace {
return (Namespace)o;
if (o instanceof CharSequence)
return create(o.toString());
- throw new FormattedRuntimeException("Invalid object type passed to Namespace.create(Object): ''{0}''", o.getClass());
+ throw new BasicRuntimeException("Invalid object type passed to Namespace.create(Object): ''{0}''", o.getClass());
}
/**
@@ -140,12 +140,12 @@ public final class Namespace {
else if (o2 instanceof CharSequence)
n[i] = create(o2.toString());
else
- throw new FormattedRuntimeException("Invalid type passed to NamespaceFactory.createArray: ''{0}''", o);
+ throw new BasicRuntimeException("Invalid type passed to NamespaceFactory.createArray: ''{0}''", o);
}
return n;
}
- throw new FormattedRuntimeException("Invalid type passed to NamespaceFactory.createArray: ''{0}''", o);
+ throw new BasicRuntimeException("Invalid type passed to NamespaceFactory.createArray: ''{0}''", o);
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParserSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParserSession.java
index f09e42f..422c8b7 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParserSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParserSession.java
@@ -168,7 +168,7 @@ public class XmlParserSession extends ReaderParserSession {
private String getElementAsString(XmlReader r) {
int t = r.getEventType();
if (t > 2)
- throw new FormattedRuntimeException("Invalid event type on stream reader for elementToString() method: ''{0}''", XmlUtils.toReadableEvent(r));
+ throw new BasicRuntimeException("Invalid event type on stream reader for elementToString() method: ''{0}''", XmlUtils.toReadableEvent(r));
rsb.setLength(0);
rsb.append("<").append(t == 1 ? "" : "/").append(r.getLocalName());
if (t == 1)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializerSession.java
index 6f61cec..f4fb9f3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xmlschema/XmlSchemaSerializerSession.java
@@ -106,7 +106,7 @@ public class XmlSchemaSerializerSession extends XmlSerializerSession {
String schema = schemas.get(namespaceURI);
if (schema == null)
- throw new FormattedRuntimeException("No schema found for namespaceURI ''{0}''", namespaceURI);
+ throw new BasicRuntimeException("No schema found for namespaceURI ''{0}''", namespaceURI);
try {
DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
@@ -165,7 +165,7 @@ public class XmlSchemaSerializerSession extends XmlSerializerSession {
ns = defaultNs;
Schema s = get(ns);
if (s == null)
- throw new FormattedRuntimeException("No schema defined for namespace ''{0}''", ns);
+ throw new BasicRuntimeException("No schema defined for namespace ''{0}''", ns);
return s;
}
diff --git a/juneau-examples/juneau-examples-rest-jetty-ftest/src/test/java/org/apache/juneau/examples/rest/ContentComboTestBase.java b/juneau-examples/juneau-examples-rest-jetty-ftest/src/test/java/org/apache/juneau/examples/rest/ContentComboTestBase.java
index d1baac2..cd90eaa 100644
--- a/juneau-examples/juneau-examples-rest-jetty-ftest/src/test/java/org/apache/juneau/examples/rest/ContentComboTestBase.java
+++ b/juneau-examples/juneau-examples-rest-jetty-ftest/src/test/java/org/apache/juneau/examples/rest/ContentComboTestBase.java
@@ -53,7 +53,7 @@ public class ContentComboTestBase extends RestTestcase {
case "text/n-triple": return getClient(mt, NTripleSerializer.DEFAULT, NTripleParser.DEFAULT);
case "text/turtle": return getClient(mt, TurtleSerializer.DEFAULT, TurtleParser.DEFAULT);
case "text/n3": return getClient(mt, N3Serializer.DEFAULT, N3Parser.DEFAULT);
- default: throw new FormattedRuntimeException("Client for mediaType ''{0}'' not found", mt);
+ default: throw new BasicRuntimeException("Client for mediaType ''{0}'' not found", mt);
}
}
diff --git a/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/BasicJettyServerFactory.java b/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/BasicJettyServerFactory.java
index 5009fc9..d6cd6fc 100644
--- a/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/BasicJettyServerFactory.java
+++ b/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/BasicJettyServerFactory.java
@@ -26,7 +26,7 @@ public class BasicJettyServerFactory implements JettyServerFactory {
@Override
public Server create(String jettyXml) throws Exception {
if (jettyXml == null)
- throw new FormattedRuntimeException("jetty.xml file location was not specified in the configuration file (Jetty/config) or manifest file (Jetty-Config) or found on the file system or classpath.");
+ throw new BasicRuntimeException("jetty.xml file location was not specified in the configuration file (Jetty/config) or manifest file (Jetty-Config) or found on the file system or classpath.");
XmlConfiguration xmlConfiguration = new XmlConfiguration(new ByteArrayInputStream(jettyXml.getBytes()));
return (Server)xmlConfiguration.configure();
}
diff --git a/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyMicroservice.java b/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyMicroservice.java
index 19680d2..bdcc9f0 100644
--- a/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyMicroservice.java
+++ b/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyMicroservice.java
@@ -331,7 +331,7 @@ public class JettyMicroservice extends Microservice {
if (jettyXml == null)
jettyXml = IOUtils.loadSystemResourceAsString("jetty.xml", ".", "files");
if (jettyXml == null)
- throw new FormattedRuntimeException("jetty.xml file ''{0}'' was not found on the file system or classpath.", jettyConfig);
+ throw new BasicRuntimeException("jetty.xml file ''{0}'' was not found on the file system or classpath.", jettyConfig);
if (resolveVars)
jettyXml = vr.resolve(jettyXml);
@@ -351,7 +351,7 @@ public class JettyMicroservice extends Microservice {
RestServlet rs = (RestServlet)c.newInstance();
addServlet(rs, rs.getPath());
} else {
- throw new FormattedRuntimeException("Invalid servlet specified in Jetty/servlets. Must be a subclass of RestServlet.", s);
+ throw new BasicRuntimeException("Invalid servlet specified in Jetty/servlets. Must be a subclass of RestServlet.", s);
}
} catch (ClassNotFoundException e1) {
throw new ExecutableException(e1);
@@ -365,7 +365,7 @@ public class JettyMicroservice extends Microservice {
Servlet rs = (Servlet)c.newInstance();
addServlet(rs, e.getKey());
} else {
- throw new FormattedRuntimeException("Invalid servlet specified in Jetty/servletMap. Must be a subclass of Servlet.", e.getValue());
+ throw new BasicRuntimeException("Invalid servlet specified in Jetty/servletMap. Must be a subclass of Servlet.", e.getValue());
}
} catch (ClassNotFoundException e1) {
throw new ExecutableException(e1);
diff --git a/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyMicroserviceBuilder.java b/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyMicroserviceBuilder.java
index a1eb9e0..1b26ce7 100644
--- a/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyMicroserviceBuilder.java
+++ b/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyMicroserviceBuilder.java
@@ -116,7 +116,7 @@ public class JettyMicroserviceBuilder extends MicroserviceBuilder {
else if (jettyXml instanceof Reader)
this.jettyXml = IOUtils.read((Reader)jettyXml);
else
- throw new FormattedRuntimeException("Invalid object type passed to jettyXml(Object)", jettyXml == null ? null : jettyXml.getClass().getName());
+ throw new BasicRuntimeException("Invalid object type passed to jettyXml(Object)", jettyXml == null ? null : jettyXml.getClass().getName());
this.jettyXmlResolveVars = resolveVars;
return this;
}
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
index 58ad6bf..7a541ff 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCall.java
@@ -395,7 +395,7 @@ public final class RestCall extends BeanSession implements Closeable {
body(new StringEntity(value.toString()));
} catch (UnsupportedEncodingException e) {}
} else {
- throw new FormattedRuntimeException("Invalid name ''{0}'' passed to formData(name,value,skipIfEmpty) for data type ''{1}''", name, className(value));
+ throw new BasicRuntimeException("Invalid name ''{0}'' passed to formData(name,value,skipIfEmpty) for data type ''{1}''", name, className(value));
}
return this;
}
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SerializedNameValuePair.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SerializedNameValuePair.java
index 45cd631..3cc6eae 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SerializedNameValuePair.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/SerializedNameValuePair.java
@@ -72,9 +72,9 @@ public final class SerializedNameValuePair implements NameValuePair {
try {
return serializer.createPartSession(null).serialize(FORMDATA, schema, value);
} catch (SchemaValidationException e) {
- throw new FormattedRuntimeException(e, "Validation error on request form-data parameter ''{0}''=''{1}''", name, value);
+ throw new BasicRuntimeException(e, "Validation error on request form-data parameter ''{0}''=''{1}''", name, value);
} catch (SerializeException e) {
- throw new FormattedRuntimeException(e, "Serialization error on request form-data parameter ''{0}''", name);
+ throw new BasicRuntimeException(e, "Serialization error on request form-data parameter ''{0}''", name);
}
}
}
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMetadataException.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMetadataException.java
index 58d47aa..f8944a4 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMetadataException.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMetadataException.java
@@ -20,7 +20,7 @@ import org.apache.juneau.*;
/**
* Exceptions caused by invalid REST proxy classes.
*/
-public class RemoteMetadataException extends FormattedRuntimeException {
+public class RemoteMetadataException extends BasicRuntimeException {
private static final long serialVersionUID = 1L;
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client2/ext/SerializedHeader.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client2/ext/SerializedHeader.java
index b6b62d3..97c6685 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client2/ext/SerializedHeader.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client2/ext/SerializedHeader.java
@@ -168,9 +168,9 @@ public final class SerializedHeader extends BasicHeader {
return null;
return serializer.serialize(HttpPartType.HEADER, schema, value);
} catch (SchemaValidationException e) {
- throw new FormattedRuntimeException(e, "Validation error on request {0} parameter ''{1}''=''{2}''", HttpPartType.HEADER, getName(), value);
+ throw new BasicRuntimeException(e, "Validation error on request {0} parameter ''{1}''=''{2}''", HttpPartType.HEADER, getName(), value);
} catch (SerializeException e) {
- throw new FormattedRuntimeException(e, "Serialization error on request {0} parameter ''{1}''", HttpPartType.HEADER, getName());
+ throw new BasicRuntimeException(e, "Serialization error on request {0} parameter ''{1}''", HttpPartType.HEADER, getName());
}
}
}
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client2/ext/SerializedNameValuePair.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client2/ext/SerializedNameValuePair.java
index 039ac00..7f903a2 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client2/ext/SerializedNameValuePair.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client2/ext/SerializedNameValuePair.java
@@ -199,9 +199,9 @@ public final class SerializedNameValuePair implements NameValuePair {
return null;
return serializer.serialize(type, schema, value);
} catch (SchemaValidationException e) {
- throw new FormattedRuntimeException(e, "Validation error on request {0} parameter ''{1}''=''{2}''", type, name, value);
+ throw new BasicRuntimeException(e, "Validation error on request {0} parameter ''{1}''=''{2}''", type, name, value);
} catch (SerializeException e) {
- throw new FormattedRuntimeException(e, "Serialization error on request {0} parameter ''{1}''", type, name);
+ throw new BasicRuntimeException(e, "Serialization error on request {0} parameter ''{1}''", type, name);
}
}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
index cd4bcc4..f723367 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
@@ -18,7 +18,7 @@ import static org.apache.juneau.internal.IOUtils.*;
import static org.apache.juneau.internal.StringUtils.*;
import static org.apache.juneau.rest.util.RestUtils.*;
import static org.apache.juneau.rest.HttpRuntimeException.*;
-import static org.apache.juneau.FormattedIllegalArgumentException.*;
+import static org.apache.juneau.BasicIllegalArgumentException.*;
import java.io.*;
import java.lang.reflect.Method;
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
index 0fcc1ed..8b11254 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
@@ -246,7 +246,7 @@ public class RestContextBuilder extends BeanContextBuilder implements ServletCon
private static void assertArgsOnlyOfType(MethodInfo m, Class<?>...args) {
if (! m.argsOnlyOfType(args))
- throw new FormattedIllegalArgumentException("Invalid arguments passed to method {0}. Only arguments of type {1} are allowed.", m, args);
+ throw new BasicIllegalArgumentException("Invalid arguments passed to method {0}. Only arguments of type {1} are allowed.", m, args);
}
RestContextBuilder servletContext(ServletContext servletContext) {
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestConfigApply.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestConfigApply.java
index e816098..5931d13 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestConfigApply.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestConfigApply.java
@@ -88,7 +88,7 @@ public class RestConfigApply extends ConfigApply<Rest> {
for (String ra : strings(a.attrs())) {
String[] ra2 = RestUtils.parseKeyValuePair(ra);
if (ra2 == null)
- throw new FormattedRuntimeException("Invalid default request attribute specified: ''{0}''. Must be in the format: ''Name: value''", ra);
+ throw new BasicRuntimeException("Invalid default request attribute specified: ''{0}''. Must be in the format: ''Name: value''", ra);
if (isNotEmpty(ra2[1]))
psb.putTo(REST_attrs, ra2[0], ra2[1]);
}
@@ -96,7 +96,7 @@ public class RestConfigApply extends ConfigApply<Rest> {
for (String ra : strings(a.reqAttrs())) {
String[] ra2 = RestUtils.parseKeyValuePair(ra);
if (ra2 == null)
- throw new FormattedRuntimeException("Invalid default request attribute specified: ''{0}''. Must be in the format: ''Name: value''", ra);
+ throw new BasicRuntimeException("Invalid default request attribute specified: ''{0}''. Must be in the format: ''Name: value''", ra);
if (isNotEmpty(ra2[1]))
psb.putTo(REST_reqAttrs, ra2[0], ra2[1]);
}
@@ -104,7 +104,7 @@ public class RestConfigApply extends ConfigApply<Rest> {
for (String header : strings(a.defaultRequestHeaders())) {
String[] h = RestUtils.parseHeader(header);
if (h == null)
- throw new FormattedRuntimeException("Invalid default request header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
+ throw new BasicRuntimeException("Invalid default request header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
if (isNotEmpty(h[1]))
psb.putTo(REST_defaultRequestHeaders, h[0], h[1]);
}
@@ -112,7 +112,7 @@ public class RestConfigApply extends ConfigApply<Rest> {
for (String header : strings(a.reqHeaders())) {
String[] h = RestUtils.parseHeader(header);
if (h == null)
- throw new FormattedRuntimeException("Invalid default request header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
+ throw new BasicRuntimeException("Invalid default request header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
if (isNotEmpty(h[1]))
psb.putTo(REST_reqHeaders, h[0], h[1]);
}
@@ -133,7 +133,7 @@ public class RestConfigApply extends ConfigApply<Rest> {
for (String header : strings(a.defaultResponseHeaders())) {
String[] h = parseHeader(header);
if (h == null)
- throw new FormattedRuntimeException("Invalid default response header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
+ throw new BasicRuntimeException("Invalid default response header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
if (isNotEmpty(h[1]))
psb.putTo(REST_defaultResponseHeaders, h[0], h[1]);
}
@@ -141,7 +141,7 @@ public class RestConfigApply extends ConfigApply<Rest> {
for (String header : strings(a.resHeaders())) {
String[] h = parseHeader(header);
if (h == null)
- throw new FormattedRuntimeException("Invalid default response header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
+ throw new BasicRuntimeException("Invalid default response header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
if (isNotEmpty(h[1]))
psb.putTo(REST_resHeaders, h[0], h[1]);
}
@@ -187,7 +187,7 @@ public class RestConfigApply extends ConfigApply<Rest> {
for (String header : strings(a.staticFileResponseHeaders())) {
String[] h = RestUtils.parseHeader(header);
if (h == null)
- throw new FormattedRuntimeException("Invalid static file response header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
+ throw new BasicRuntimeException("Invalid static file response header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
if (isNotEmpty(h[1]))
psb.putTo(REST_staticFileResponseHeaders, h[0], h[1]);
}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResourceConfigApply.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResourceConfigApply.java
index 9d90938..2c2c1b9 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResourceConfigApply.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResourceConfigApply.java
@@ -93,7 +93,7 @@ public class RestResourceConfigApply extends ConfigApply<RestResource> {
for (String ra : strings(a.attrs())) {
String[] ra2 = RestUtils.parseKeyValuePair(ra);
if (ra2 == null)
- throw new FormattedRuntimeException("Invalid default request attribute specified: ''{0}''. Must be in the format: ''Name: value''", ra);
+ throw new BasicRuntimeException("Invalid default request attribute specified: ''{0}''. Must be in the format: ''Name: value''", ra);
if (isNotEmpty(ra2[1]))
psb.putTo(REST_attrs, ra2[0], ra2[1]);
}
@@ -101,7 +101,7 @@ public class RestResourceConfigApply extends ConfigApply<RestResource> {
for (String header : strings(a.defaultRequestHeaders())) {
String[] h = RestUtils.parseHeader(header);
if (h == null)
- throw new FormattedRuntimeException("Invalid default request header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
+ throw new BasicRuntimeException("Invalid default request header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
if (isNotEmpty(h[1]))
psb.putTo(REST_defaultRequestHeaders, h[0], h[1]);
}
@@ -122,7 +122,7 @@ public class RestResourceConfigApply extends ConfigApply<RestResource> {
for (String header : strings(a.defaultResponseHeaders())) {
String[] h = parseHeader(header);
if (h == null)
- throw new FormattedRuntimeException("Invalid default response header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
+ throw new BasicRuntimeException("Invalid default response header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
if (isNotEmpty(h[1]))
psb.putTo(REST_defaultResponseHeaders, h[0], h[1]);
}
@@ -178,7 +178,7 @@ public class RestResourceConfigApply extends ConfigApply<RestResource> {
for (String header : strings(a.staticFileResponseHeaders())) {
String[] h = RestUtils.parseHeader(header);
if (h == null)
- throw new FormattedRuntimeException("Invalid static file response header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
+ throw new BasicRuntimeException("Invalid static file response header specified: ''{0}''. Must be in the format: ''Header-Name: header-value''", header);
if (isNotEmpty(h[1]))
psb.putTo(REST_staticFileResponseHeaders, h[0], h[1]);
}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/helper/BeanDescription.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/helper/BeanDescription.java
index 8346ceb..11cfe02 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/helper/BeanDescription.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/helper/BeanDescription.java
@@ -47,7 +47,7 @@ public final class BeanDescription {
type = c.getName();
BeanMeta<?> bm = BeanContext.DEFAULT.getBeanMeta(c);
if (bm == null)
- throw new FormattedRuntimeException("Class ''{0}'' is not a valid bean.", c);
+ throw new BasicRuntimeException("Class ''{0}'' is not a valid bean.", c);
properties = new BeanPropertyDescription[bm.getPropertyMetas().size()];
int i = 0;
for (BeanPropertyMeta pm : bm.getPropertyMetas())
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/util/RestUtils.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/util/RestUtils.java
index 02985a4..7b69ea0 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/util/RestUtils.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/util/RestUtils.java
@@ -168,7 +168,7 @@ public final class RestUtils {
return requestURI;
throw new Exception("case=6");
} catch (Exception e) {
- throw new FormattedRuntimeException(e, "Could not find servlet path in request URI. URI=''{0}'', servletPath=''{1}''", requestURI, servletPath);
+ throw new BasicRuntimeException(e, "Could not find servlet path in request URI. URI=''{0}'', servletPath=''{1}''", requestURI, servletPath);
}
}