[java-identity-provider] branch main updated: Missing annotations.
Scott Cantor
cantor.2 at osu.edu
Mon Feb 19 13:34:28 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=42cf730183d300be21b9eba89c0dcf23b2c9513f
The following commit(s) were added to refs/heads/main by this push:
new 42cf73018 Missing annotations.
42cf73018 is described below
commit 42cf730183d300be21b9eba89c0dcf23b2c9513f
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Feb 19 08:34:24 2024 -0500
Missing annotations.
---
.../shibboleth/idp/ui/helper/AttributeHelper.java | 30 ++++++++--------------
1 file changed, 11 insertions(+), 19 deletions(-)
diff --git a/idp-ui/src/main/java/net/shibboleth/idp/ui/helper/AttributeHelper.java b/idp-ui/src/main/java/net/shibboleth/idp/ui/helper/AttributeHelper.java
index a6f67c144..350df33be 100644
--- a/idp-ui/src/main/java/net/shibboleth/idp/ui/helper/AttributeHelper.java
+++ b/idp-ui/src/main/java/net/shibboleth/idp/ui/helper/AttributeHelper.java
@@ -56,12 +56,8 @@ public final class AttributeHelper extends AbstractIdentifiableInitializableComp
* @param attributeName The attribute name to look up
* @return The attribute value or null
*/
- @Nullable public IdPAttributeValue getFirstAttributeValue(final ProfileRequestContext prc,
- final @Nonnull @NotEmpty String attributeName) {
- if (prc == null) {
- log.error("Provided ProfileRequestContext was null");
- return null;
- }
+ @Nullable public IdPAttributeValue getFirstAttributeValue(@Nonnull final ProfileRequestContext prc,
+ @Nonnull @NotEmpty final String attributeName) {
Constraint.isNotNull(attributeName, "Attribute Name must be non-niull");
final AttributeContext context = attributeContextStrategy.apply(prc);
if (context == null) {
@@ -77,8 +73,8 @@ public final class AttributeHelper extends AbstractIdentifiableInitializableComp
* @param defaultValue What to return if nothing found.
* @return The default value or the attribute value
*/
- @Nonnull public String getFirstAttributeDisplayValue(final ProfileRequestContext prc,
- final @Nonnull @NotEmpty String attributeName,
+ @Nonnull public String getFirstAttributeDisplayValue(@Nonnull final ProfileRequestContext prc,
+ @Nonnull @NotEmpty final String attributeName,
final @Nonnull String defaultValue) {
Constraint.isNotNull(defaultValue, "Default value must be non-null");
final IdPAttributeValue value = getFirstAttributeValue(prc, attributeName);
@@ -94,8 +90,8 @@ public final class AttributeHelper extends AbstractIdentifiableInitializableComp
* @param attributeName The attribute name to look up
* @return The attribute value or ""
*/
- @Nonnull public String getFirstAttributeDisplayValue(final ProfileRequestContext prc,
- final @Nonnull @NotEmpty String attributeName) {
+ @Nonnull public String getFirstAttributeDisplayValue(@Nonnull final ProfileRequestContext prc,
+ @Nonnull @NotEmpty final String attributeName) {
return getFirstAttributeDisplayValue(prc, attributeName, "");
}
@@ -104,13 +100,9 @@ public final class AttributeHelper extends AbstractIdentifiableInitializableComp
* @param attributeName The attribute name to look up
* @return The attribute value or null
*/
- @Nullable public IdPAttributeValue getFirstUnfilteredAttributeValue(final ProfileRequestContext prc,
- final @Nonnull @NotEmpty String attributeName) {
+ @Nullable public IdPAttributeValue getFirstUnfilteredAttributeValue(@Nonnull final ProfileRequestContext prc,
+ @Nonnull @NotEmpty final String attributeName) {
- if (prc == null) {
- log.error("Provided ProfileRequestContext was null");
- return null;
- }
Constraint.isNotNull(attributeName, "Attribute Name must be non-niull");
final AttributeContext context = attributeContextStrategy.apply(prc);
if (context == null) {
@@ -130,8 +122,8 @@ public final class AttributeHelper extends AbstractIdentifiableInitializableComp
*
* @return The default value or the attribute value
*/
- @Nonnull public String getFirstUnfilteredAttributeDisplayValue(final ProfileRequestContext prc,
- final @Nonnull @NotEmpty String attributeName,
+ @Nonnull public String getFirstUnfilteredAttributeDisplayValue(@Nonnull final ProfileRequestContext prc,
+ @Nonnull @NotEmpty final String attributeName,
final @Nonnull String defaultValue) {
Constraint.isNotNull(defaultValue, "Default value must be non-null");
@@ -148,7 +140,7 @@ public final class AttributeHelper extends AbstractIdentifiableInitializableComp
* @param attributeName The attribute name to look up
* @return The attribute value or ""
*/
- @Nonnull public String getFirstUnfilteredAttributeDisplayValue(final ProfileRequestContext prc,
+ @Nonnull public String getFirstUnfilteredAttributeDisplayValue(@Nonnull final ProfileRequestContext prc,
@Nonnull @NotEmpty final String attributeName) {
return getFirstUnfilteredAttributeDisplayValue(prc, attributeName, "");
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list