diff options
Diffstat (limited to 'org.jacoco.report/src/org/jacoco/report/internal/xml/XMLGroupVisitor.java')
-rw-r--r-- | org.jacoco.report/src/org/jacoco/report/internal/xml/XMLGroupVisitor.java | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLGroupVisitor.java b/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLGroupVisitor.java index e6795b7f..7f2b7d3f 100644 --- a/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLGroupVisitor.java +++ b/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLGroupVisitor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2018 Mountainminds GmbH & Co. KG and Contributors + * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,7 +25,7 @@ import org.jacoco.report.internal.AbstractGroupVisitor; public class XMLGroupVisitor extends AbstractGroupVisitor { /** XML element of this group */ - protected final XMLElement element; + protected final ReportElement element; /** * New handler for a group with the given name. @@ -38,7 +38,7 @@ public class XMLGroupVisitor extends AbstractGroupVisitor { * @throws IOException * in case of problems with the underlying writer */ - public XMLGroupVisitor(final XMLElement element, final String name) + public XMLGroupVisitor(final ReportElement element, final String name) throws IOException { super(name); this.element = element; @@ -47,14 +47,14 @@ public class XMLGroupVisitor extends AbstractGroupVisitor { @Override protected void handleBundle(final IBundleCoverage bundle, final ISourceFileLocator locator) throws IOException { - final XMLElement child = createChild(bundle.getName()); + final ReportElement child = element.group(bundle.getName()); XMLCoverageWriter.writeBundle(bundle, child); } @Override protected AbstractGroupVisitor handleGroup(final String name) throws IOException { - final XMLElement child = createChild(name); + final ReportElement child = element.group(name); return new XMLGroupVisitor(child, name); } @@ -63,8 +63,4 @@ public class XMLGroupVisitor extends AbstractGroupVisitor { XMLCoverageWriter.writeCounters(total, element); } - private XMLElement createChild(final String name) throws IOException { - return XMLCoverageWriter.createChild(element, "group", name); - } - } |