Commit 71834394 authored by Him188's avatar Him188

Process `string` properly

parent fbe5f14a
......@@ -261,6 +261,12 @@ fun String.generateProtoBufDataClass(): GeneratedClass {
@Suppress("NAME_SHADOWING")
var name = _name
when {
name.startsWith("string") -> {
name = name.substringAfter("string").takeIf { it.isNotBlank() }?.adjustName() ?: "string"
if (defaultValue == "EMPTY_BYTE_ARRAY")
defaultValue = "\"\""
}
name.startsWith("str") -> {
name = name.substringAfter("str").takeIf { it.isNotBlank() }?.adjustName() ?: "str"
if (defaultValue == "EMPTY_BYTE_ARRAY")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment