@@ -152,15 +152,27 @@ private EnvVars getEnv() {
152152
153153 // To retain Backward compatibility
154154 protected Object readResolve () {
155- // Assign default values to new elements.
156- this .pdfReportArtifact = new NullArtifact ();
157- this .tapArtifact = new NullArtifact ();
158- this .junitArtifact = new NullArtifact ();
159- this .coberturaArtifact = new NullArtifact ();
160- this .stmResultsArtifact = new NullArtifact ();
161- this .modelCoverageArtifact = new NullArtifact ();
162-
163- // Assign appropriate artifact type if it was selected earlier.
155+ // Assign default values to new elements if not already deserialized from config.
156+ if (this .pdfReportArtifact == null ) {
157+ this .pdfReportArtifact = new NullArtifact ();
158+ }
159+ if (this .tapArtifact == null ) {
160+ this .tapArtifact = new NullArtifact ();
161+ }
162+ if (this .junitArtifact == null ) {
163+ this .junitArtifact = new NullArtifact ();
164+ }
165+ if (this .coberturaArtifact == null ) {
166+ this .coberturaArtifact = new NullArtifact ();
167+ }
168+ if (this .stmResultsArtifact == null ) {
169+ this .stmResultsArtifact = new NullArtifact ();
170+ }
171+ if (this .modelCoverageArtifact == null ) {
172+ this .modelCoverageArtifact = new NullArtifact ();
173+ }
174+
175+ // Assign appropriate artifact type if it was selected in release 2.0.0 or earlier.
164176 if (pdfReportChkBx ) {
165177 this .pdfReportArtifact = new PdfArtifact ("matlabTestArtifacts/testreport.pdf" );
166178 }
0 commit comments