Skip to content

Commit 9946b27

Browse files
committed
fix compilation problem after upgrading to gradle 2.3-rc-1
[Static type checking] - Cannot find matching method org.yaml.snakeyaml.Yaml#loadAs(java.io.InputStream, java.lang.Class <java.util.Map>). Please check if the declared type is right and if the method exists.
1 parent ca480e6 commit 9946b27

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

grails-shell/src/main/groovy/org/grails/cli/profile/DefaultProfile.groovy

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,16 @@
1414
* limitations under the License.
1515
*/
1616
package org.grails.cli.profile
17-
1817
import grails.util.CosineSimilarity
19-
import grails.util.Environment
18+
import groovy.transform.CompileDynamic
2019
import groovy.transform.CompileStatic
2120
import jline.console.completer.ArgumentCompleter
2221
import jline.console.completer.Completer
23-
import org.grails.build.parsing.CommandLine
2422
import org.grails.build.parsing.ScriptNameResolver
2523
import org.grails.cli.interactive.completers.StringsCompleter
2624
import org.grails.cli.profile.commands.CommandRegistry
2725
import org.grails.config.NavigableMap
28-
import org.yaml.snakeyaml.Yaml;
29-
26+
import org.yaml.snakeyaml.Yaml
3027
/**
3128
* Simple disk based implementation of the {@link Profile} interface
3229
*
@@ -175,6 +172,7 @@ class DefaultProfile implements Profile {
175172
}
176173
}
177174

175+
@CompileDynamic
178176
private void initialize(ProfileRepository repository) {
179177
parentProfiles = []
180178
File profileYml = new File(profileDir, "profile.yml")

grails-shell/src/main/groovy/org/grails/cli/profile/commands/factory/YamlCommandFactory.groovy

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,15 @@
1414
* limitations under the License.
1515
*/
1616
package org.grails.cli.profile.commands.factory
17-
1817
import groovy.json.JsonParserType
1918
import groovy.json.JsonSlurper
19+
import groovy.transform.CompileDynamic
2020
import groovy.transform.CompileStatic
2121
import org.grails.cli.profile.Command
2222
import org.grails.cli.profile.Profile
2323
import org.grails.cli.profile.commands.DefaultMultiStepCommand
2424
import org.grails.io.support.Resource
2525
import org.yaml.snakeyaml.Yaml
26-
27-
import java.util.regex.Pattern
28-
29-
3026
/**
3127
* A {@link CommandFactory} that can discover commands defined in YAML or JSON
3228
*
@@ -42,6 +38,7 @@ class YamlCommandFactory extends ResourceResolvingCommandFactory<Map> {
4238
final Collection<String> matchingFileExtensions = ["yml", "json"]
4339
final String fileNamePattern = /^.*\.(yml|json)$/
4440

41+
@CompileDynamic
4542
@Override
4643
protected Map readCommandFile(Resource resource) {
4744
Map data

0 commit comments

Comments
 (0)