[java-opensaml] branch main updated: Fix some warnings.
Scott Cantor
cantor.2 at osu.edu
Thu May 25 13:42:57 UTC 2023
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=4d8cba2eb817cc256098561933128fe8b6bbbf37
The following commit(s) were added to refs/heads/main by this push:
new 4d8cba2eb Fix some warnings.
4d8cba2eb is described below
commit 4d8cba2eb817cc256098561933128fe8b6bbbf37
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu May 25 09:42:54 2023 -0400
Fix some warnings.
---
.../java/org/opensaml/profile/action/AbstractProfileAction.java | 4 +++-
.../src/main/java/org/opensaml/profile/context/MetricContext.java | 7 ++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractProfileAction.java b/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractProfileAction.java
index 573749a5f..0d2baef9c 100644
--- a/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractProfileAction.java
+++ b/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractProfileAction.java
@@ -181,7 +181,9 @@ public abstract class AbstractProfileAction extends AbstractInitializableCompone
final MetricContext metricCtx = profileRequestContext.getSubcontext(MetricContext.class);
if (metricCtx != null) {
- metricCtx.start(getClass().getSimpleName());
+ final String name = getClass().getSimpleName();
+ assert name != null;
+ metricCtx.start(name);
}
return true;
diff --git a/opensaml-profile-api/src/main/java/org/opensaml/profile/context/MetricContext.java b/opensaml-profile-api/src/main/java/org/opensaml/profile/context/MetricContext.java
index ba67b451d..d37d9714e 100644
--- a/opensaml-profile-api/src/main/java/org/opensaml/profile/context/MetricContext.java
+++ b/opensaml-profile-api/src/main/java/org/opensaml/profile/context/MetricContext.java
@@ -50,15 +50,16 @@ public final class MetricContext extends BaseContext {
*
* <p>The first member is the timer name, the second the object to associate with the timer.</p>
*/
- @Nonnull @NonnullElements private Multimap<String,Pair<String,String>> timerMap;
+ @Nonnull @NonnullElements private final Multimap<String,Pair<String,String>> timerMap;
/** Map of objects to contexts to perform a stop signal. */
- @Nonnull @NonnullElements private Multimap<String,Timer.Context> timerContextMap;
+ @Nonnull @NonnullElements private final Multimap<String,Timer.Context> timerContextMap;
/** Map of objects to counter names. */
- @Nonnull @NonnullElements private Map<String,String> counterMap;
+ @Nonnull @NonnullElements private final Map<String,String> counterMap;
/** Constructor. */
+ @SuppressWarnings("null")
public MetricContext() {
timerMap = ArrayListMultimap.create();
timerContextMap = ArrayListMultimap.create();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list