You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ji...@apache.org on 2023/07/17 12:08:26 UTC

[camel-quarkus] 08/12: Fixed Slack

This is an automated email from the ASF dual-hosted git repository.

jiriondrusek pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit e94d799b5d31257dd47692b90f08f892865bc7de
Author: JiriOndrusek <on...@gmail.com>
AuthorDate: Fri Jul 14 09:31:46 2023 +0200

    Fixed Slack
---
 .../component/slack/graal/SlackSubstitutions.java  | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/extensions/slack/runtime/src/main/java/org/apache/camel/quarkus/component/slack/graal/SlackSubstitutions.java b/extensions/slack/runtime/src/main/java/org/apache/camel/quarkus/component/slack/graal/SlackSubstitutions.java
index ae481858db..64afbb4087 100644
--- a/extensions/slack/runtime/src/main/java/org/apache/camel/quarkus/component/slack/graal/SlackSubstitutions.java
+++ b/extensions/slack/runtime/src/main/java/org/apache/camel/quarkus/component/slack/graal/SlackSubstitutions.java
@@ -30,6 +30,7 @@ import com.slack.api.audit.AuditConfig;
 import com.slack.api.methods.MethodsConfig;
 import com.slack.api.rate_limits.metrics.MetricsDatastore;
 import com.slack.api.scim.SCIMConfig;
+import com.slack.api.scim2.SCIM2Config;
 import com.slack.api.util.http.listener.DetailedLoggingListener;
 import com.slack.api.util.http.listener.HttpResponseListener;
 import com.slack.api.util.http.listener.ResponsePrettyPrintingListener;
@@ -162,6 +163,44 @@ final class SlackConfigSubstitutions {
         }
     };
 
+    @Alias
+    @RecomputeFieldValue(kind = Reset)
+    private SCIM2Config sCIM2Config = new SCIM2Config() {
+        void throwException() {
+            throw new UnsupportedOperationException("This config is immutable");
+        }
+
+        @Override
+        public void setStatsEnabled(boolean statsEnabled) {
+            throwException();
+        }
+
+        @Override
+        public void setExecutorName(String executorName) {
+            throwException();
+        }
+
+        @Override
+        public void setMaxIdleMills(int maxIdleMills) {
+            throwException();
+        }
+
+        @Override
+        public void setDefaultThreadPoolSize(int defaultThreadPoolSize) {
+            throwException();
+        }
+
+        @Override
+        public void setMetricsDatastore(MetricsDatastore metricsDatastore) {
+            throwException();
+        }
+
+        @Override
+        public void setCustomThreadPoolSizes(Map<String, Integer> customThreadPoolSizes) {
+            throwException();
+        }
+    };
+
     @Alias
     private ExecutorServiceProvider executorServiceProvider;
     @Alias
@@ -199,3 +238,11 @@ final class SCIMConfigSubstitutions {
     @RecomputeFieldValue(kind = Reset)
     public static SCIMConfig DEFAULT_SINGLETON = null;
 }
+
+@TargetClass(SCIM2Config.class)
+final class SCIM2ConfigSubstitutions {
+
+    @Alias
+    @RecomputeFieldValue(kind = Reset)
+    public static SCIM2Config DEFAULT_SINGLETON = null;
+}