Anyone figured out deprecation "com.google.common.base.Predicate"?
John Porter
jporter2 at swarthmore.edu
Tue Feb 10 13:57:36 UTC 2026
Attempting to continue the thread re: [DEPRECATED:135] - Java class
'com.google.common.base.Predicate'
First - thank you very much Scott for your time and attention to this
issue. Your various points made me realize I should challenge the
assumption that the following documented example would throw the DEPRECATED
warning:
https://shibboleth.atlassian.net/wiki/spaces/IDP5/pages/3199506470/CasProtocolConfiguration#:~:text=Relying%20Party%20Override.-,In%20this%20example%2C,-3%20services%20will
When I placed this example into our relying-party.xml file it did NOT throw
the warning. Since the example code is fulfilling the same need that we
have, I simply plugged in our relying party domains and everything is now
working fine. No deprecation warnings and the services continue to
authenticate.
For those curious here is the old xml and new xml. Likely line 6 of the old
code is at the root of the issue but unsure why...
<!-- This way throws a DEPRECATED WARNING -->
<!--
<bean id="shibboleth.regexRelyingParty" parent="RelyingParty" >
<property name="activationCondition" >
<bean
class="net.shibboleth.idp.profile.logic.RelyingPartyIdPredicate" >
<constructor-arg name="pred" >
<bean class="com.google.common.base.Predicates"
factory-method="or" >
<constructor-arg>
<util:list>
<bean class="com.google.common.base.Predicates"
factory-method="containsPattern" c:_0="https:\/\/(.+\.)?redacted\.com\/.*"
/>
<bean class="com.google.common.base.Predicates"
factory-method="containsPattern"
c:_0="https:\/\/redacted\.redacted\.edu\/.*" />
</util:list>
</constructor-arg>
</bean>
</constructor-arg>
</bean>
</property>
<property name="profileConfigurations">
<list>
<ref bean="CAS.LoginConfiguration" />
<ref bean="CAS.ProxyConfiguration" />
<bean parent="CAS.ValidateConfiguration"
p:userAttribute="email" />
</list>
</property>
</bean>
-->
<!-- This way does not throw a DEPRECATED warning and closely
matches the documented example -->
<bean id="shibboleth.regexRelyingParty" parent="RelyingParty">
<property name="activationCondition" >
<bean parent="shibboleth.Conditions.RelyingPartyId">
<constructor-arg name="pred" >
<bean
parent="shibboleth.Conditions.OR">
<constructor-arg>
<list>
<bean
class="com.google.common.base.Predicates" factory-method="containsPattern"
c:_0="https:\/\/(.+\.)?redacted\.com\/.*" />
<bean
class="com.google.common.base.Predicates" factory-method="containsPattern"
c:_0="https:\/\/redacted\.redacted\.edu\/.*" />
</list>
</constructor-arg>
</bean>
</constructor-arg>
</bean>
</property>
<property name="profileConfigurations">
<list>
<ref bean="CAS.LoginConfiguration" />
<ref bean="CAS.ProxyConfiguration" />
<bean parent="CAS.ValidateConfiguration"
p:userAttribute="email" />
</list>
</property>
</bean>
On Mon, Feb 9, 2026 at 2:27 PM John Porter <jporter2 at swarthmore.edu> wrote:
> Greetings all and thanks for any information you can provide. I'm having
> the toughest time finding a viable alternative to address the following
> warning:
>
> WARN [DEPRECATED:135] - Java class 'com.google.common.base.Predicate':
>> This will be removed in the next major version of this software;
>> replacement is java.util.function.Predicate
>
>
> We utilize this class just as it is described in the idp 5 documentation
> here:
>
>
> https://shibboleth.atlassian.net/wiki/spaces/IDP5/pages/3199506470/CasProtocolConfiguration#:~:text=Relying%20Party%20Override.-,In%20this%20example%2C,-3%20services%20will
>
> I've attempted switching from this regex method to the Spring Expression
> method discussed here, but that doesn't seem to play nicely with CAS:
>
>
> https://shibboleth.atlassian.net/wiki/spaces/IDP5/pages/3199509766/ActivationConditions#SpecificRelyingParties:~:text=you%20can%20write-,Spring%20Expressions,-%2C%20sort%20of%20a
>
> Hoping someone out there has figured out a simpler way to update the class
> with minimal changes.
>
> Thanks for any help you can provide.
>
> --
> John Porter
> Systems Administrator
> Swarthmore College
> jporter2 at swarthmore.edu
>
--
John Porter
Systems Administrator
Swarthmore College
jporter2 at swarthmore.edu
(610) 690-3878
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20260210/9932ecec/attachment.htm>
More information about the users
mailing list