Skip to content

Commit 4fc3396

Browse files
committed
Ensure that non-null resources (because if Java) are actually checked before usage (to limit kotlin warnings)
1 parent 6b4047e commit 4fc3396

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gradle-plugin/plugin/src/main/java/com/yelp/codegen/SharedCodegen.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ abstract class SharedCodegen : DefaultCodegen(), CodegenConfig {
8282
* Returns the /main/resources directory to access the .mustache files
8383
*/
8484
protected val resourcesDirectory: File
85-
get() = File(this.javaClass.classLoader.getResource(templateDir).path.safeSuffix(File.separator))
85+
get() = File(this.javaClass.classLoader.getResource(templateDir)!!.path.safeSuffix(File.separator))
8686

8787
override fun processOpts() {
8888
super.processOpts()
@@ -451,7 +451,7 @@ abstract class SharedCodegen : DefaultCodegen(), CodegenConfig {
451451
* or `items` at the top level (Arrays).
452452
* Their returned type would be a `Map<String, Any?>` or `List<Any?>`, where `Any?` will be the aliased type.
453453
*
454-
* The method will call [KotlinAndroidGenerator.resolvePropertyType] that will perform a check if the model
454+
* The method will call [KotlinGenerator.resolvePropertyType] that will perform a check if the model
455455
* is aliasing to a 'x-nullable' annotated model and compute the proper type (adding a `?` if needed).
456456
*
457457
* ```

0 commit comments

Comments
 (0)