Skip to content

Commit 6cec90d

Browse files
Merge branch 'develop.next' into resolve-conflicts
2 parents a01e952 + 6ea4951 commit 6cec90d

File tree

8 files changed

+56
-12
lines changed

8 files changed

+56
-12
lines changed

PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.appservice/src/com/microsoft/azure/toolkit/eclipse/functionapp/logstreaming/FunctionAppLogStreamingHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static void startLogStreaming(final FunctionAppBase<?, ?, ?> functionApp)
6666
}
6767
}
6868

69-
// Refers https://github.com/microsoft/vscode-azurefunctions/blob/v0.22.0/src/
69+
// Refers https://github.com/microsoft/vscode-azurefunctions/blob/v0.22.0.JAVA17/src/
7070
// commands/logstream/startStreamingLogs.ts#L53
7171
private static void openLiveMetricsStream(final FunctionAppBase<?, ?, ?> functionApp) throws IOException {
7272
final String aiKey = functionApp.getAppSettings().get(APPINSIGHTS_INSTRUMENTATIONKEY);

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/appservice/AppServiceStreamingLogManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public Flux<String> getStreamingLogContent() {
189189
return functionApp.streamAllLogsAsync();
190190
}
191191

192-
// Refers https://github.com/microsoft/vscode-azurefunctions/blob/v0.22.0/src/
192+
// Refers https://github.com/microsoft/vscode-azurefunctions/blob/v0.22.0.JAVA17/src/
193193
// commands/logstream/startStreamingLogs.ts#L53
194194
private void openLiveMetricsStream() {
195195
final String aiKey = Optional.ofNullable(functionApp.getAppSettings()).map(settings -> settings.get(APPINSIGHTS_INSTRUMENTATIONKEY)).orElse(null);

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-vm/src/main/java/com/microsoft/azure/toolkit/intellij/vm/runtarget/AzureVmTargetType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public TargetEnvironmentRequest createEnvironmentRequest(@Nonnull Project projec
125125
}
126126

127127
@Override
128-
public @NotNull <T extends Component> ActionListener createBrowser(@NotNull Project project, @NlsContexts.DialogTitle String title, @NotNull TextComponentAccessor<T> textComponentAccessor, @NotNull T component, @NotNull Supplier<TargetEnvironmentConfiguration> configurationSupplier) {
128+
public @NotNull <T extends Component> ActionListener createBrowser(@NotNull Project project, @NlsContexts.DialogTitle String title, @NotNull TextComponentAccessor<T> textComponentAccessor, @NotNull T component, @NotNull Supplier<? extends TargetEnvironmentConfiguration> configurationSupplier) {
129129
return new ActionListener() {
130130
public final void actionPerformed(ActionEvent it) {
131131
final TargetEnvironmentConfiguration configuration = configurationSupplier.get();

PluginsAndFeatures/azure-toolkit-for-intellij/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
2-
id "org.jetbrains.intellij" version "1.5.2"
3-
id "org.jetbrains.kotlin.jvm" version "1.6.10"
2+
id "org.jetbrains.intellij" version "1.6.0"
3+
id "org.jetbrains.kotlin.jvm" version "1.6.21"
44
id "de.undercouch.download" version "4.1.1"
55
id "com.github.ben-manes.versions" version "0.39.0"
66
id "io.freefair.aspectj.post-compile-weaving" version "6.0.0-m2"
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
pluginVersion=3.68.0
2-
intellijDisplayVersion=2022.1
2+
intellijDisplayVersion=2022.2
33
needPatchVersion=true
44
javaVersion=11
55
org.gradle.jvmargs='-Duser.language=en'
66
sources=true
7-
intellij_version=IU-2022.1
8-
dep_plugins=org.intellij.scala:2022.1.4
7+
intellij_version=IU-2022.2
8+
dep_plugins=org.intellij.scala:2022.2.3
99
applicationinsights.key=57cc111a-36a8-44b3-b044-25d293b8b77c
1010
updateVersionRange=true
11-
patchPluginXmlSinceBuild=221.4165.146
11+
patchPluginXmlSinceBuild=222.2680.4
1212
org.gradle.configureondemand=true
1313
org.gradle.parallel=true
1414
org.gradle.daemon=true
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package com.azure.core.implementation;
2+
//
3+
// Source code recreated from a .class file by IntelliJ IDEA
4+
// (powered by FernFlower decompiler)
5+
//
6+
7+
import java.lang.invoke.MethodHandles;
8+
import java.security.AccessController;
9+
import java.security.PrivilegedExceptionAction;
10+
11+
final class ReflectionUtils implements ReflectionUtilsApi {
12+
private static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();
13+
private static final Module CORE_MODULE = ReflectionUtils.class.getModule();
14+
15+
public MethodHandles.Lookup getLookupToUse(Class<?> targetClass) throws Exception {
16+
Module responseModule = targetClass.getModule();
17+
if (!responseModule.isNamed()) {
18+
CORE_MODULE.addReads(responseModule);
19+
return performSafePrivateLookupIn(targetClass);
20+
} else if (responseModule == CORE_MODULE) {
21+
return LOOKUP;
22+
} else if (!responseModule.isOpen(targetClass.getPackageName()) && !responseModule.isOpen(targetClass.getPackageName(), CORE_MODULE)) {
23+
return MethodHandles.publicLookup();
24+
} else {
25+
CORE_MODULE.addReads(responseModule);
26+
return performSafePrivateLookupIn(targetClass);
27+
}
28+
}
29+
30+
public int getJavaImplementationMajorVersion() {
31+
return 9;
32+
}
33+
34+
private static MethodHandles.Lookup performSafePrivateLookupIn(Class<?> targetClass) throws Exception {
35+
return System.getSecurityManager() == null ? MethodHandles.privateLookupIn(targetClass, LOOKUP) : (MethodHandles.Lookup) AccessController.doPrivileged((PrivilegedExceptionAction<MethodHandles.Lookup>) () -> MethodHandles.privateLookupIn(targetClass, LOOKUP));
36+
}
37+
38+
ReflectionUtils() {
39+
}
40+
}

PluginsAndFeatures/azure-toolkit-for-intellij/src/main/java/com/microsoft/intellij/AzureActionsListener.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package com.microsoft.intellij;
77

8+
import com.azure.core.implementation.ReflectionUtilsApi;
89
import com.azure.core.implementation.http.HttpClientProviders;
910
import com.azure.core.management.AzureEnvironment;
1011
import com.google.gson.Gson;
@@ -97,6 +98,9 @@ public class AzureActionsListener implements AppLifecycleListener, PluginCompone
9798
Thread.currentThread().setContextClassLoader(AzureActionsListener.class.getClassLoader());
9899
HttpClientProviders.createInstance();
99100
Azure.az(AzureAccount.class);
101+
final Logger logger = Logger.getInstance(AzureActionsListener.class);
102+
final int version = ReflectionUtilsApi.INSTANCE.getJavaImplementationMajorVersion();
103+
log.warn("ReflectionUtilsApi.INSTANCE.getJavaImplementationMajorVersion(): " + version);
100104
Hooks.onErrorDropped(ex -> {
101105
Throwable cause = findExceptionInExceptionChain(ex, Arrays.asList(InterruptedException.class, UnknownHostException.class));
102106
if (cause instanceof InterruptedException) {

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
ARTIFACTS_DIR=artifacts
22
INJECT_INTELLIJ_VERSION=true
3-
IJ_VERSION_MAJOR_BUILD=221.4165.146
4-
IJ_VERSION_MAJOR=2021.1
3+
IJ_VERSION_MAJOR_BUILD=222.2680.4
4+
IJ_VERSION_MAJOR=2022.2
55
IJ_VERSION_MINOR=
6-
IJ_SCALA_VERSION_LATEST=2022.1.4
6+
IJ_SCALA_VERSION_LATEST=2022.2.3
77
skipCheckstyle=true
88
skipTest=false
99
forceClean=false

0 commit comments

Comments
 (0)