From 4fc339612a83f398afe4872544938210efa4dceb Mon Sep 17 00:00:00 2001 From: Samuele Maci Date: Tue, 4 Feb 2020 21:39:58 +0100 Subject: [PATCH] Ensure that non-null resources (because if Java) are actually checked before usage (to limit kotlin warnings) --- .../plugin/src/main/java/com/yelp/codegen/SharedCodegen.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle-plugin/plugin/src/main/java/com/yelp/codegen/SharedCodegen.kt b/gradle-plugin/plugin/src/main/java/com/yelp/codegen/SharedCodegen.kt index 4ff88857..0b23d33f 100644 --- a/gradle-plugin/plugin/src/main/java/com/yelp/codegen/SharedCodegen.kt +++ b/gradle-plugin/plugin/src/main/java/com/yelp/codegen/SharedCodegen.kt @@ -82,7 +82,7 @@ abstract class SharedCodegen : DefaultCodegen(), CodegenConfig { * Returns the /main/resources directory to access the .mustache files */ protected val resourcesDirectory: File - get() = File(this.javaClass.classLoader.getResource(templateDir).path.safeSuffix(File.separator)) + get() = File(this.javaClass.classLoader.getResource(templateDir)!!.path.safeSuffix(File.separator)) override fun processOpts() { super.processOpts() @@ -451,7 +451,7 @@ abstract class SharedCodegen : DefaultCodegen(), CodegenConfig { * or `items` at the top level (Arrays). * Their returned type would be a `Map` or `List`, where `Any?` will be the aliased type. * - * The method will call [KotlinAndroidGenerator.resolvePropertyType] that will perform a check if the model + * The method will call [KotlinGenerator.resolvePropertyType] that will perform a check if the model * is aliasing to a 'x-nullable' annotated model and compute the proper type (adding a `?` if needed). * * ```