Skip to content

Commit 188bb78

Browse files
committed
Fix Local Run Context not working in sbt project issue
In sbt project, the dependence virtual file are xxx.scala, So, only check the main dependence file name not include extension. Signed-off-by: Wei Zhang <[email protected]>
1 parent 7a8fc52 commit 188bb78

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/hdinsight/spark/run/SparkBatchJobLocalRunConfigurationProducer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ protected boolean setupConfigurationFromContext(RemoteDebugRunConfiguration conf
7575
return Optional.ofNullable(db.getDependencies().get(mcPair.getKey().getContainingFile()))
7676
.map((Set<PsiFile> t) -> t.stream()
7777
.map(PsiFile::getVirtualFile)
78-
.map(VirtualFile::getName)
79-
.anyMatch(className -> className.equals("SparkContext.class") ||
80-
className.equals("JavaSparkContext.class") ||
81-
className.equals("SparkConf.class") ||
82-
className.equals("StreamingContext.class") ||
83-
className.equals("SparkSession.class")))
78+
.map(VirtualFile::getNameWithoutExtension)
79+
.anyMatch(className -> className.equals("SparkContext") ||
80+
className.equals("JavaSparkContext") ||
81+
className.equals("SparkConf") ||
82+
className.equals("StreamingContext") ||
83+
className.equals("SparkSession")))
8484
.orElse(false);
8585
})
8686
.map(mcPair -> {

0 commit comments

Comments
 (0)