2727import javax .xml .stream .XMLStreamWriter ;
2828
2929import static org .apache .tools .ant .taskdefs .optional .junitlauncher .confined .Constants .LD_XML_ATTR_CLASS_NAME ;
30+ import static org .apache .tools .ant .taskdefs .optional .junitlauncher .confined .Constants .LD_XML_ATTR_LISTENER_EXTENSION ;
3031import static org .apache .tools .ant .taskdefs .optional .junitlauncher .confined .Constants .LD_XML_ATTR_LISTENER_RESULT_FILE ;
3132import static org .apache .tools .ant .taskdefs .optional .junitlauncher .confined .Constants .LD_XML_ATTR_LISTENER_USE_LEGACY_REPORTING_NAME ;
3233import static org .apache .tools .ant .taskdefs .optional .junitlauncher .confined .Constants .LD_XML_ATTR_OUTPUT_DIRECTORY ;
@@ -202,6 +203,9 @@ void toForkedRepresentation(final XMLStreamWriter writer) throws XMLStreamExcept
202203 if (this .resultFile != null ) {
203204 writer .writeAttribute (LD_XML_ATTR_LISTENER_RESULT_FILE , this .resultFile );
204205 }
206+ if (this .extension != null ) {
207+ writer .writeAttribute (LD_XML_ATTR_LISTENER_EXTENSION , this .extension );
208+ }
205209 writer .writeEndElement ();
206210 }
207211
@@ -226,6 +230,10 @@ public static ListenerDefinition fromForkedRepresentation(final XMLStreamReader
226230 if (resultFile != null ) {
227231 listenerDef .setResultFile (resultFile );
228232 }
233+ final String extension = reader .getAttributeValue (null , LD_XML_ATTR_LISTENER_EXTENSION );
234+ if (extension != null ) {
235+ listenerDef .setExtension (extension );
236+ }
229237 final String useLegacyReportingName = reader .getAttributeValue (null ,
230238 LD_XML_ATTR_LISTENER_USE_LEGACY_REPORTING_NAME );
231239 if (useLegacyReportingName != null ) {
0 commit comments