[java-support] branch dev/JSPT-111 updated: Correct accidental change to construction ordering.
Scott Cantor
cantor.2 at osu.edu
Tue Jul 5 17:44:00 UTC 2022
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch dev/JSPT-111
in repository java-support.
View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=25ac337d3e01c868088fae105b2649b26ae1b556
The following commit(s) were added to refs/heads/dev/JSPT-111 by this push:
new 25ac337 Correct accidental change to construction ordering.
25ac337 is described below
commit 25ac337d3e01c868088fae105b2649b26ae1b556
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jul 5 13:43:58 2022 -0400
Correct accidental change to construction ordering.
---
.../support/service/ReloadableServiceGaugeSet.java | 57 +++++++++++-----------
1 file changed, 29 insertions(+), 28 deletions(-)
diff --git a/src/main/java/net/shibboleth/utilities/java/support/service/ReloadableServiceGaugeSet.java b/src/main/java/net/shibboleth/utilities/java/support/service/ReloadableServiceGaugeSet.java
index 7907262..4ff941d 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/service/ReloadableServiceGaugeSet.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/service/ReloadableServiceGaugeSet.java
@@ -61,35 +61,7 @@ public class ReloadableServiceGaugeSet<T> extends AbstractInitializableComponent
*/
public ReloadableServiceGaugeSet(@Nonnull @NotEmpty @ParameterName(name="metricName") final String metricName) {
metricPrefix = Constraint.isNotEmpty(metricName, "Metric name cannot be null or empty");
- }
-
- /**
- * Get the service to report on.
- *
- * @return service to report on
- */
- @NonnullAfterInit public ReloadableService<T> getService() {
- return service;
- }
-
- /**
- * Set the service to report on.
- *
- * @param svc service instance
- */
- public void setService(@Nonnull final ReloadableService<T> svc) {
- ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
- service = Constraint.isNotNull(svc, "ReloadableService cannot be null");
- }
-
- /** {@inheritDoc} */
- @Override
- protected void doInitialize() throws ComponentInitializationException {
- if (service == null) {
- throw new ComponentInitializationException("Injected ReloadableService cannot be null");
- }
-
gauges = new HashMap<>();
gauges.put(
@@ -117,7 +89,36 @@ public class ReloadableServiceGaugeSet<T> extends AbstractInitializableComponent
}
});
+ }
+
+ /**
+ * Get the service to report on.
+ *
+ * @return service to report on
+ */
+ @NonnullAfterInit public ReloadableService<T> getService() {
+ return service;
+ }
+
+ /**
+ * Set the service to report on.
+ *
+ * @param svc service instance
+ */
+ public void setService(@Nonnull final ReloadableService<T> svc) {
+ ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
+
+ service = Constraint.isNotNull(svc, "ReloadableService cannot be null");
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ protected void doInitialize() throws ComponentInitializationException {
super.doInitialize();
+
+ if (service == null) {
+ throw new ComponentInitializationException("ReloadableService cannot be null");
+ }
}
/** {@inheritDoc} */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list