Skip to content

Commit

Permalink
fix(java indexer): --override_jdk_corpus takes precedence over defaul…
Browse files Browse the repository at this point in the history
…t corpus (#5043)
  • Loading branch information
justbuchanan committed Aug 25, 2021
1 parent 43145a8 commit 08aea04
Showing 1 changed file with 9 additions and 5 deletions.
Expand Up @@ -129,13 +129,17 @@ public VName getNode(
return v;
}

// The vname corpus for jdk entities is determined by:
// * --override_jdk_corpus if present
// * the compilation's corpus if --use_compilation_corpus_as_default is set
// * "jdk" if the above two flags are unset
VName v = lookupVName(enclClass);
if ((v == null || config.getOverrideJdkCorpus() != null) && fromJDK(sym)) {
String corpus;
if (getUseCompilationCorpusAsDefault()) {
if (fromJDK(sym)) {
String corpus = "jdk";
if (config.getOverrideJdkCorpus() != null) {
corpus = config.getOverrideJdkCorpus();
} else if (getUseCompilationCorpusAsDefault()) {
corpus = defaultCorpusPath().getCorpus();
} else {
corpus = config.getOverrideJdkCorpus() != null ? config.getOverrideJdkCorpus() : "jdk";
}
v = VName.newBuilder().setCorpus(corpus).build();
}
Expand Down

0 comments on commit 08aea04

Please sign in to comment.