blackmo18 / kotlin-grass

Kotlin Csv to Data Class Parser
Apache License 2.0
38 stars 8 forks source link

import csv throw NullPointerException. #26

Closed Jacky-YC closed 2 years ago

Jacky-YC commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce NPE

Expected behavior Test failed java.lang.NullPointerException at io.blackmo18.kotlin.grass.pot.Root.createObject(Root.kt:70) at io.blackmo18.kotlin.grass.pot.Stem.harvestData(Stem.kt:48) at io.blackmo18.kotlin.grass.pot.Plant.harvest(Plant.kt:42)

Environment

Screenshots image image

Jacky-YC commented 2 years ago
id,product_type,fastone_region,fastone_model,price
1,VM,NORTH1,p1.c1.2,0.5916
Jacky-YC commented 2 years ago

data class ProductDto( val id: Long, val productType: ProductType, val fastoneRegion: Region, val fastoneModel: String, val price: BigDecimal )

blackmo18 commented 2 years ago

@Jacky-YC

can you create a simple repo to try this one?

Jacky-YC commented 2 years ago

yes, i'm sorry! i try registry my custom data type is ok!

Jacky-YC commented 2 years ago

The tests have passed.

Jacky-YC commented 2 years ago

Very useful class library, thanks to the author

blackmo18 commented 2 years ago

I was running the test a while ago, it passed. So I was thinking, maybe custom name. It seems It was OK on your end now. I will be closing this issue then.