[java-opensaml] branch main updated: Fix exception messages.
Scott Cantor
cantor.2 at osu.edu
Tue Jan 2 15:02:57 UTC 2024
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=1f0a5b014310970cf5403a43d29532d40351bdef
The following commit(s) were added to refs/heads/main by this push:
new 1f0a5b014 Fix exception messages.
1f0a5b014 is described below
commit 1f0a5b014310970cf5403a43d29532d40351bdef
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jan 2 10:02:27 2024 -0500
Fix exception messages.
---
.../src/main/java/org/opensaml/messaging/context/BaseContext.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/BaseContext.java b/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/BaseContext.java
index 75ba28fd8..36f76cc8a 100644
--- a/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/BaseContext.java
+++ b/opensaml-messaging-api/src/main/java/org/opensaml/messaging/context/BaseContext.java
@@ -117,7 +117,8 @@ public abstract class BaseContext implements Iterable<BaseContext> {
@Nonnull public <T extends BaseContext> T ensureSubcontext(@Nonnull final Class<T> clazz) {
final T newContext = getSubcontext(clazz, true);
if (newContext == null) {
- throw new IllegalStateException("Context of type " + clazz.getName() + "did not exist or was not created");
+ throw new IllegalStateException("Context of type '" + clazz.getName() +
+ "' did not exist or was not created");
}
return newContext;
@@ -177,7 +178,7 @@ public abstract class BaseContext implements Iterable<BaseContext> {
@Nullable public BaseContext ensureSubcontext(@Nonnull @NotEmpty final String className) {
final BaseContext newContext = getSubcontext(className, true);
if (newContext == null) {
- throw new IllegalStateException("Context of type " + className + "did not exist or was not created");
+ throw new IllegalStateException("Context of type '" + className + "' did not exist or was not created");
}
return newContext;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list