You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2026/02/06 14:43:40 UTC
(camel) 09/23: (chores): modernize instanceof checks in camel-oauth
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit c09ef61880b877dd84a87b55948a92d7e3b8a0ce
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Feb 6 13:17:27 2026 +0000
(chores): modernize instanceof checks in camel-oauth
---
.../src/main/java/org/apache/camel/oauth/vertx/VertxOAuth.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/components/camel-oauth/src/main/java/org/apache/camel/oauth/vertx/VertxOAuth.java b/components/camel-oauth/src/main/java/org/apache/camel/oauth/vertx/VertxOAuth.java
index ab729fa429e1..09c27afda954 100644
--- a/components/camel-oauth/src/main/java/org/apache/camel/oauth/vertx/VertxOAuth.java
+++ b/components/camel-oauth/src/main/java/org/apache/camel/oauth/vertx/VertxOAuth.java
@@ -104,9 +104,9 @@ public class VertxOAuth extends OAuth {
public UserProfile authenticate(org.apache.camel.oauth.Credentials creds) throws OAuthException {
Credentials vtxCreds;
- if (creds instanceof org.apache.camel.oauth.UserCredentials) {
+ if (creds instanceof org.apache.camel.oauth.UserCredentials uc) {
- var userProfile = ((UserCredentials) creds).getUserProfile();
+ var userProfile = uc.getUserProfile();
log.info("Authenticate userProfile: {}", userProfile.subject());
var scope = (String) userProfile.principal().get("scope");
vtxCreds = new TokenCredentials()