From c9769ab4544f95fa109f13063bd6c49ca7226bdb Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Fri, 21 Apr 2017 12:57:59 +0300 Subject: [PATCH] Do not serialize/deserialize CommonCompilerArguments#errors This prevents .idea/kotlinc.xml from being added with an empty ArgumentParseErrors object and also fixes ConfigureKotlinInTempDirTest.testKotlincExistsNoSettingsRuntime11 --- .../kotlin/cli/common/arguments/CommonCompilerArguments.java | 2 +- .../org/jetbrains/kotlin/cli/common/arguments/argumentUtils.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.java b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.java index e50ac3acd87..c58dcf09757 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.java +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.java @@ -109,7 +109,7 @@ public abstract class CommonCompilerArguments implements Serializable { public List freeArgs = new SmartList<>(); - public ArgumentParseErrors errors = new ArgumentParseErrors(); + public transient ArgumentParseErrors errors = new ArgumentParseErrors(); @NotNull public static CommonCompilerArguments createDefaultInstance() { diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/argumentUtils.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/argumentUtils.kt index 94f5477b762..f903bbc41a9 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/argumentUtils.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/argumentUtils.kt @@ -79,7 +79,7 @@ fun collectFieldsToCopy(clazz: Class<*>, inheritedOnly: Boolean): List { while (currentClass != null) { for (field in currentClass.declaredFields) { val modifiers = field.modifiers - if (!Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers)) { + if (!Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers) && !Modifier.isTransient(modifiers)) { fromFields.add(field) } }