Skip to content

Commit

Permalink
Merge pull request quarkusio#6052 from geoand/kotlin-npe
Browse files Browse the repository at this point in the history
Prevent possible NPE in KotlinCompilationProvider
  • Loading branch information
gsmet authored Dec 9, 2019
2 parents 9671e80 + 48fc758 commit d19be13
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public Set<String> handledExtensions() {
@Override
public void compile(Set<File> filesToCompile, Context context) {
K2JVMCompilerArguments compilerArguments = new K2JVMCompilerArguments();
if (!context.getCompilePluginArtifacts().isEmpty()) {
if (context.getCompilePluginArtifacts() != null && !context.getCompilePluginArtifacts().isEmpty()) {
compilerArguments.setPluginClasspaths(context.getCompilePluginArtifacts().toArray(new String[0]));
}
if (!context.getCompilerPluginOptions().isEmpty()) {
if (context.getCompilerPluginOptions() != null && !context.getCompilerPluginOptions().isEmpty()) {
List<String> sanitizedOptions = new ArrayList<>(context.getCompilerOptions().size());
for (String rawOption : context.getCompilerPluginOptions()) {
Matcher matcher = OPTION_PATTERN.matcher(rawOption);
Expand Down

0 comments on commit d19be13

Please sign in to comment.