Skip to content

Commit

Permalink
Ensure that non-null resources (because if Java) are actually checked…
Browse files Browse the repository at this point in the history
… before usage (to limit kotlin warnings)
  • Loading branch information
macisamuele committed Feb 7, 2020
1 parent 7a7eb77 commit e6e330b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -451,7 +451,7 @@ abstract class SharedCodegen : DefaultCodegen(), CodegenConfig {
* or `items` at the top level (Arrays).
* Their returned type would be a `Map<String, Any?>` or `List<Any?>`, 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).
*
* ```
Expand Down

0 comments on commit e6e330b

Please sign in to comment.