Skip to content

Commit

Permalink
Fixes type cast error in GradleCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed Mar 8, 2023
1 parent 2d9435c commit 02137ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2022 the original author or authors.
* Copyright 2014-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -74,7 +74,7 @@ class GradleCommand implements ProjectCommand, Completer, ProjectContextAware {
private void initializeCompleter() {
if (completer == null && projectContext) {
readTasks = new ReadGradleTasks(projectContext)
completer = new ClosureCompleter((Closure<Collection<String>>) { readTasks.call() })
completer = new ClosureCompleter((Closure<List<String>>) { readTasks.call() })
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2022 the original author or authors.
* Copyright 2014-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,10 +25,10 @@ import jline.console.completer.Completer
@CompileStatic
class ClosureCompleter implements Completer {

private final Closure<Collection<String>> closure
private final Closure<List<String>> closure
private Completer completer

ClosureCompleter(Closure<Collection<String>> closure) {
ClosureCompleter(Closure<List<String>> closure) {
this.closure = closure
}

Expand Down

0 comments on commit 02137ab

Please sign in to comment.