From cdcc47a0a8fcd94a4fff2d3821b81179ebaf37ec Mon Sep 17 00:00:00 2001 From: Ilia Smirnov Date: Sun, 14 Sep 2025 18:03:15 +0200 Subject: [PATCH] IJPL-193751 Allow loading TraceConsentManager from JetBrains plugins only GitOrigin-RevId: c2e6878e1cc00969c081e5090feb5c6b04c744fa --- .../src/com/intellij/ide/gdpr/trace/TraceConsentManager.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/ide/gdpr/trace/TraceConsentManager.kt b/platform/platform-impl/src/com/intellij/ide/gdpr/trace/TraceConsentManager.kt index 53a344a4c0b1..c8097c63764b 100644 --- a/platform/platform-impl/src/com/intellij/ide/gdpr/trace/TraceConsentManager.kt +++ b/platform/platform-impl/src/com/intellij/ide/gdpr/trace/TraceConsentManager.kt @@ -1,6 +1,7 @@ // Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.ide.gdpr.trace +import com.intellij.internal.statistic.utils.getPluginInfo import com.intellij.openapi.extensions.ExtensionPointName import org.jetbrains.annotations.ApiStatus @@ -21,6 +22,10 @@ interface TraceConsentManager { val EP_NAME: ExtensionPointName = ExtensionPointName("com.intellij.ide.gdpr.traceConsentManager") @JvmStatic - fun getInstance(): TraceConsentManager? = EP_NAME.extensionList.firstOrNull() + fun getInstance(): TraceConsentManager? { + return EP_NAME.findFirstSafe { + getPluginInfo(it.javaClass).isDevelopedByJetBrains() + } + } } } \ No newline at end of file