diff --git a/META-INF/plugin.xml b/META-INF/plugin.xml index 6e357a4..958dbeb 100644 --- a/META-INF/plugin.xml +++ b/META-INF/plugin.xml @@ -1,7 +1,7 @@ cn.nekocode.plugin.parcelablegenerator Parcelable Code Generator(for kotlin) - 0.5.0 + 0.5.1 nekocode declarations = oldBodyOfCompanion.getDeclarations(); - for (KtDeclaration declaration : declarations) { - String declarationName = declaration.getName(); - if (declarationName != null && !declarationName.equals("CREATOR")) { - oldBodyText.append(declaration.getText()).append("\n\n"); + if (oldBodyOfCompanion != null) { + List declarations = oldBodyOfCompanion.getDeclarations(); + for (KtDeclaration declaration : declarations) { + String declarationName = declaration.getName(); + if (declarationName != null && !declarationName.equals("CREATOR")) { + oldBodyText.append(declaration.getText()).append("\n\n"); + } } }