[java-identity-provider] branch main updated: Checkstyle issues and some cleanup around Version reporting.
Scott Cantor
cantor.2 at osu.edu
Wed May 15 14:24:21 UTC 2024
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=75c588f664da19b3d6617c158e2e09a3ace28263
The following commit(s) were added to refs/heads/main by this push:
new 75c588f66 Checkstyle issues and some cleanup around Version reporting.
75c588f66 is described below
commit 75c588f664da19b3d6617c158e2e09a3ace28263
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed May 15 10:24:18 2024 -0400
Checkstyle issues and some cleanup around Version reporting.
---
.../shibboleth/idp/admin/impl/InstallableComponentGaugeSet.java | 4 ++--
.../java/net/shibboleth/idp/admin/impl/ReportModuleStatus.java | 4 ++--
.../src/main/java/net/shibboleth/idp/plugin/impl/PluginInfo.java | 8 +++++---
idp-core/src/main/java/net/shibboleth/idp/Version.java | 4 ++++
4 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/InstallableComponentGaugeSet.java b/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/InstallableComponentGaugeSet.java
index 97797c4fc..b0dc00662 100644
--- a/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/InstallableComponentGaugeSet.java
+++ b/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/InstallableComponentGaugeSet.java
@@ -256,8 +256,8 @@ public class InstallableComponentGaugeSet extends AbstractIdentifiableInitializa
final String idpVersionStr = Version.getVersion();
if (idpVersionStr == null) {
// So things work inside Eclipse.
- log.warn("Could not find current IdP Version (likely operating inside IDE), assuming V5.0.0");
- idpVersion = new InstallableComponentVersion(5,0,0);
+ log.warn("Could not find current IdP Version (likely operating inside IDE), assuming V5.1.2");
+ idpVersion = new InstallableComponentVersion(5, 1, 2);
} else {
idpVersion = new InstallableComponentVersion(idpVersionStr);
}
diff --git a/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/ReportModuleStatus.java b/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/ReportModuleStatus.java
index 513b0347a..03ef8ad7d 100644
--- a/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/ReportModuleStatus.java
+++ b/idp-admin-impl/src/main/java/net/shibboleth/idp/admin/impl/ReportModuleStatus.java
@@ -41,7 +41,7 @@ public class ReportModuleStatus extends AbstractIdentifiableInitializableCompone
@Nonnull private final Logger log = LoggerFactory.getLogger(ReportModuleStatus.class);
/** The IdOP Home dir. */
- @Nonnull private String idpHome="";
+ @Nonnull private String idpHome = "";
/**
* Sets IdP home location.
@@ -49,7 +49,7 @@ public class ReportModuleStatus extends AbstractIdentifiableInitializableCompone
* @param input what to set.
*/
public void setIdpHome(@Nonnull @NotEmpty final String input) {
- idpHome = Constraint.isNotNull(input, "IdpHome not set");
+ idpHome = Constraint.isNotNull(input, "idp.home property cannot be null");
}
/**
diff --git a/idp-admin-impl/src/main/java/net/shibboleth/idp/plugin/impl/PluginInfo.java b/idp-admin-impl/src/main/java/net/shibboleth/idp/plugin/impl/PluginInfo.java
index f72407dae..a4c9a9c2f 100644
--- a/idp-admin-impl/src/main/java/net/shibboleth/idp/plugin/impl/PluginInfo.java
+++ b/idp-admin-impl/src/main/java/net/shibboleth/idp/plugin/impl/PluginInfo.java
@@ -35,13 +35,14 @@ public class PluginInfo extends InstallableComponentInfo {
* @param id the plugin Id to ask about.
* @param props the properties file to load from
*/
- public PluginInfo(@Nonnull String id, @Nonnull Properties props) {
+ public PluginInfo(@Nonnull final String id, @Nonnull final Properties props) {
super(id, props);
}
/** {@inheritDoc} */
@Override
- protected @Nullable InstallableComponentVersion getMaxVersion(@Nonnull Properties props, @Nonnull String version) {
+ protected @Nullable InstallableComponentVersion getMaxVersion(@Nonnull final Properties props,
+ @Nonnull final String version) {
final String maxVersionInfo = StringSupport.trimOrNull(
props.getProperty(getComponentId() + InstallableComponentSupport.MAX_IDP_VERSION_INTERFIX + version));
if (maxVersionInfo == null) {
@@ -53,7 +54,8 @@ public class PluginInfo extends InstallableComponentInfo {
/** {@inheritDoc} */
@Override
@Nullable
- protected InstallableComponentVersion getMinVersion(@Nonnull Properties props, @Nonnull String version) {
+ protected InstallableComponentVersion getMinVersion(@Nonnull final Properties props,
+ @Nonnull final String version) {
final String minVersionInfo = StringSupport.trimOrNull(
props.getProperty(getComponentId() + InstallableComponentSupport.MIN_IDP_VERSION_INTERFIX + version));
if (minVersionInfo == null) {
diff --git a/idp-core/src/main/java/net/shibboleth/idp/Version.java b/idp-core/src/main/java/net/shibboleth/idp/Version.java
index 97fe29185..904f5e6b2 100644
--- a/idp-core/src/main/java/net/shibboleth/idp/Version.java
+++ b/idp-core/src/main/java/net/shibboleth/idp/Version.java
@@ -45,6 +45,10 @@ public final class Version {
* @return version of the IdP
*/
@Nullable public static String getVersion() {
+ if (VERSION == null) {
+ return "5.1.2";
+ }
return VERSION;
}
+
}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list