[java-shib-shared] branch main updated: JSSH-23 - Removal of Guava Predicate/Function Spring converters
Scott Cantor
cantor.2 at osu.edu
Tue Jan 24 14:45:49 UTC 2023
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-shib-shared.
View the commit online:
http://git.shibboleth.net/view/?p=java-shib-shared.git;a=commit;h=61fe611a12a3f7da813150727c7f20ba72625ebc
The following commit(s) were added to refs/heads/main by this push:
new 61fe611a JSSH-23 - Removal of Guava Predicate/Function Spring converters
61fe611a is described below
commit 61fe611a12a3f7da813150727c7f20ba72625ebc
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jan 24 09:45:46 2023 -0500
JSSH-23 - Removal of Guava Predicate/Function Spring converters
https://shibboleth.atlassian.net/browse/JSSH-23
---
.../spring/config/FunctionToFunctionConverter.java | 43 ----------------------
.../config/PredicateToPredicateConverter.java | 42 ---------------------
.../spring/util/ApplicationContextBuilder.java | 6 +--
3 files changed, 1 insertion(+), 90 deletions(-)
diff --git a/shib-spring/src/main/java/net/shibboleth/shared/spring/config/FunctionToFunctionConverter.java b/shib-spring/src/main/java/net/shibboleth/shared/spring/config/FunctionToFunctionConverter.java
deleted file mode 100644
index df72cbd1..00000000
--- a/shib-spring/src/main/java/net/shibboleth/shared/spring/config/FunctionToFunctionConverter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You under the Apache
- * License, Version 2.0 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.shibboleth.shared.spring.config;
-
-import javax.annotation.Nonnull;
-
-import org.springframework.core.convert.converter.Converter;
-
-import net.shibboleth.shared.primitive.DeprecationSupport;
-import net.shibboleth.shared.primitive.DeprecationSupport.ObjectType;
-
-/**
- * Auto-converts standard Java functions to Guava's version for legacy compatibility.
- *
- * @param <T> input type
- * @param <R> return type
- */
-public class FunctionToFunctionConverter<T,R>
- implements Converter<java.util.function.Function<T,R>,com.google.common.base.Function<T,R>> {
-
- /** {@inheritDoc} */
- public com.google.common.base.Function<T,R> convert(@Nonnull final java.util.function.Function<T,R> source) {
- DeprecationSupport.warn(ObjectType.CLASS, com.google.common.base.Function.class.getName(), null,
- java.util.function.Function.class.getName());
- return source::apply;
- }
-
-}
\ No newline at end of file
diff --git a/shib-spring/src/main/java/net/shibboleth/shared/spring/config/PredicateToPredicateConverter.java b/shib-spring/src/main/java/net/shibboleth/shared/spring/config/PredicateToPredicateConverter.java
deleted file mode 100644
index 06d266da..00000000
--- a/shib-spring/src/main/java/net/shibboleth/shared/spring/config/PredicateToPredicateConverter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You under the Apache
- * License, Version 2.0 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.shibboleth.shared.spring.config;
-
-import javax.annotation.Nonnull;
-
-import org.springframework.core.convert.converter.Converter;
-
-import net.shibboleth.shared.primitive.DeprecationSupport;
-import net.shibboleth.shared.primitive.DeprecationSupport.ObjectType;
-
-/**
- * Auto-converts standard Java predicates to Guava's version for legacy compatibility.
- *
- * @param <T> input type
- */
-public class PredicateToPredicateConverter<T>
- implements Converter<java.util.function.Predicate<T>,com.google.common.base.Predicate<T>> {
-
- /** {@inheritDoc} */
- public com.google.common.base.Predicate<T> convert(@Nonnull final java.util.function.Predicate<T> source) {
- DeprecationSupport.warn(ObjectType.CLASS, com.google.common.base.Predicate.class.getName(), null,
- java.util.function.Predicate.class.getName());
- return source::test;
- }
-
-}
\ No newline at end of file
diff --git a/shib-spring/src/main/java/net/shibboleth/shared/spring/util/ApplicationContextBuilder.java b/shib-spring/src/main/java/net/shibboleth/shared/spring/util/ApplicationContextBuilder.java
index 74f53e1f..f6a0e402 100644
--- a/shib-spring/src/main/java/net/shibboleth/shared/spring/util/ApplicationContextBuilder.java
+++ b/shib-spring/src/main/java/net/shibboleth/shared/spring/util/ApplicationContextBuilder.java
@@ -34,8 +34,6 @@ import net.shibboleth.shared.logic.Constraint;
import net.shibboleth.shared.primitive.LoggerFactory;
import net.shibboleth.shared.primitive.StringSupport;
import net.shibboleth.shared.spring.config.BooleanToPredicateConverter;
-import net.shibboleth.shared.spring.config.FunctionToFunctionConverter;
-import net.shibboleth.shared.spring.config.PredicateToPredicateConverter;
import net.shibboleth.shared.spring.config.StringBooleanToPredicateConverter;
import net.shibboleth.shared.spring.config.StringToDurationConverter;
import net.shibboleth.shared.spring.config.StringToIPRangeConverter;
@@ -353,9 +351,7 @@ public class ApplicationContextBuilder {
new BooleanToPredicateConverter(),
new StringBooleanToPredicateConverter(),
new StringToResourceConverter(),
- new StringToDurationConverter(),
- new PredicateToPredicateConverter<>(),
- new FunctionToFunctionConverter<>())));
+ new StringToDurationConverter())));
service.afterPropertiesSet();
context.getBeanFactory().setConversionService(service.getObject());
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list