diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 0000000..18341ab --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,26 @@ +name: Publish release to the Maven Central Repository + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up then Maven Central Repository + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + + - name: Publish to OSS with maven + run: mvn --batch-mode clean deploy -Dgpg.passphrase=${{ secrets.CI_GPG_PASSPHRASE }} -Psonatype-oss-release + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + MAVEN_OPTS: --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED diff --git a/pom.xml b/pom.xml index 89d1ce7..a865097 100644 --- a/pom.xml +++ b/pom.xml @@ -1,89 +1,176 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 ch.galinet.xml xml-merge - 0.2-SNAPSHOT + 0.2 jar + EL4J module XmlMerge common - - Module XmlMerge, common parts of the EL4J framework. - + Module XmlMerge, common parts of the EL4J framework. + https://github.com/nilsaellen/xml-merge + + + + Nils Aellen + nils@aellen.org + + + + + + GNU General Lesser Public License (LGPL) version 2.1 + https://www.gnu.org/licenses/lgpl-2.1.html + repo + + + + + scm:git:git://github.com/nilsaellen/xml-merge.git + scm:git:ssh://github.com:nilsaellen/xml-merge.git + http://github.com/nilsaellen/xml-merge/tree/master + + + + UTF-8 + 2.0.0 + 2.0.6.1 + 5.9.2 + 3.3.1 + 3.2.1 + 3.0.1 + 3.10.1 + 1.6.7 + 2.0.6 + 0.2 + maven-compiler-plugin + ${maven-compiler-plugin.version} - 1.8 - 1.8 + 17 + 17 - - artifactory-releases - artifactory.pnet.ch-releases - http://artifactory.pnet.ch/artifactory/libs-release-local - - artifactory-snapshots - artifactory.pnet.ch-snapshots - http://artifactory.pnet.ch/artifactory/libs-snapshot-local + ossrh + https://oss.sonatype.org/content/repositories/snapshots - com.wutka - dtdparser - 1.21 - - - jdom - jdom - 1.0 + org.jdom + jdom2 + ${jdom2.version} jaxen jaxen - 1.2.0-atlassian-2 + ${jaxen.version} org.slf4j slf4j-api - RELEASE + ${slf4j.version} org.slf4j slf4j-simple - RELEASE + ${slf4j.version} - junit - junit - 4.12 + org.junit.jupiter + junit-jupiter-engine + ${junit-jupiter-engine.version} + test ch.galinet.xml xsd-hierarchy - 0.1 + ${xsd-hierarchy.version} - - - GNU General Lesser Public License (LGPL) version 2.1 - https://www.gnu.org/licenses/lgpl-2.1.html - repo - - - + + + sonatype-oss-release + + + + + + org.apache.maven.plugins + maven-source-plugin + ${maven-source-plugin.version} + + + attach-sources + + jar-no-fork + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + attach-javadocs + + jar + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + + sign-artifacts + verify + + sign + + + ${session.executionRootDirectory} + eb11bc74 + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + ${nexus-staging-maven-plugin.version} + true + + ossrh + https://s01.oss.sonatype.org/ + false + + + + + + + \ No newline at end of file diff --git a/pubring.gpg b/pubring.gpg new file mode 100644 index 0000000..2fd2cc2 Binary files /dev/null and b/pubring.gpg differ diff --git a/secring.gpg b/secring.gpg new file mode 100644 index 0000000..447d97d Binary files /dev/null and b/secring.gpg differ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/AbstractXmlMergeException.java b/src/main/java/ch/galinet/xml/xmlmerge/AbstractXmlMergeException.java index 920f034..bef977f 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/AbstractXmlMergeException.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/AbstractXmlMergeException.java @@ -19,8 +19,6 @@ /** * Base class for all exceptions thrown by XmlMerge. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/Action.java b/src/main/java/ch/galinet/xml/xmlmerge/Action.java index c509956..8f3f916 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/Action.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/Action.java @@ -16,13 +16,11 @@ */ package ch.galinet.xml.xmlmerge; -import org.jdom.Element; +import org.jdom2.Element; /** * Operation on two nodes creating a third node. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/ConfigurationException.java b/src/main/java/ch/galinet/xml/xmlmerge/ConfigurationException.java index a8e04bf..9741c8a 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/ConfigurationException.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/ConfigurationException.java @@ -19,8 +19,6 @@ /** * Thrown when something wrong happens in the XmlMerge configuration. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/Configurer.java b/src/main/java/ch/galinet/xml/xmlmerge/Configurer.java index 4afab0b..3a37d22 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/Configurer.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/Configurer.java @@ -19,8 +19,6 @@ /** * Applies a configuration to an XmlMerge instance. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/DocumentException.java b/src/main/java/ch/galinet/xml/xmlmerge/DocumentException.java index af78740..8cd181a 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/DocumentException.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/DocumentException.java @@ -16,13 +16,11 @@ */ package ch.galinet.xml.xmlmerge; -import org.jdom.Document; +import org.jdom2.Document; /** * Thrown when something is wrong with a source or output document. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/ElementException.java b/src/main/java/ch/galinet/xml/xmlmerge/ElementException.java index 34e0570..4a72f38 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/ElementException.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/ElementException.java @@ -16,13 +16,11 @@ */ package ch.galinet.xml.xmlmerge; -import org.jdom.Element; +import org.jdom2.Element; /** * Thrown when there is something wrong with an element. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/Mapper.java b/src/main/java/ch/galinet/xml/xmlmerge/Mapper.java index 65a4400..3df4f62 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/Mapper.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/Mapper.java @@ -16,14 +16,12 @@ */ package ch.galinet.xml.xmlmerge; -import org.jdom.Element; +import org.jdom2.Element; /** * Transforms an element to another element by changing some nested content or * attributes. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/MatchException.java b/src/main/java/ch/galinet/xml/xmlmerge/MatchException.java index 8d2785e..33999e1 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/MatchException.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/MatchException.java @@ -16,13 +16,11 @@ */ package ch.galinet.xml.xmlmerge; -import org.jdom.Element; +import org.jdom2.Element; /** * Thrown when something is wrong in the matching process. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/Matcher.java b/src/main/java/ch/galinet/xml/xmlmerge/Matcher.java index 7c563ea..81dad47 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/Matcher.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/Matcher.java @@ -16,13 +16,11 @@ */ package ch.galinet.xml.xmlmerge; -import org.jdom.Element; +import org.jdom2.Element; /** * Compares two elements to know if they correspond for merging. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/MergeAction.java b/src/main/java/ch/galinet/xml/xmlmerge/MergeAction.java index f9af5eb..00ac1f1 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/MergeAction.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/MergeAction.java @@ -21,8 +21,6 @@ * actions to apply to children elements are configurable through this * interface. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/Operation.java b/src/main/java/ch/galinet/xml/xmlmerge/Operation.java index 1733849..fe4fb65 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/Operation.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/Operation.java @@ -20,8 +20,6 @@ * Abstraction for matchers, mappers or actions two be creatable by the same * factory classes. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/OperationFactory.java b/src/main/java/ch/galinet/xml/xmlmerge/OperationFactory.java index e5d62f5..30a20d0 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/OperationFactory.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/OperationFactory.java @@ -16,14 +16,12 @@ */ package ch.galinet.xml.xmlmerge; -import org.jdom.Element; +import org.jdom2.Element; /** * Creates operation (action, mapper and matcher) instances corresponding to a * pair of elements from the original and patch DOMs. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/ParseException.java b/src/main/java/ch/galinet/xml/xmlmerge/ParseException.java index 2c0c93a..c0b488c 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/ParseException.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/ParseException.java @@ -19,8 +19,6 @@ /** * Thrown when XML parsing fails. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/XmlMerge.java b/src/main/java/ch/galinet/xml/xmlmerge/XmlMerge.java index 4b32818..4c8aab2 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/XmlMerge.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/XmlMerge.java @@ -23,8 +23,6 @@ /** * Entry point for merging XML documents. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/XmlMergeContext.java b/src/main/java/ch/galinet/xml/xmlmerge/XmlMergeContext.java index 570f352..7ceb34c 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/XmlMergeContext.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/XmlMergeContext.java @@ -13,8 +13,6 @@ * * Do not abuse. It could be used as general thread-local global variables * * There is a potential security risk here (do not put confidential info in here) * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Philipp H. Oser (POS) */ public class XmlMergeContext { diff --git a/src/main/java/ch/galinet/xml/xmlmerge/action/AbstractMergeAction.java b/src/main/java/ch/galinet/xml/xmlmerge/action/AbstractMergeAction.java index b7d5d74..8763b3b 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/action/AbstractMergeAction.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/action/AbstractMergeAction.java @@ -25,8 +25,6 @@ /** * Gathers the operation factory-related behaviour and a default configuration. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/action/CompleteAction.java b/src/main/java/ch/galinet/xml/xmlmerge/action/CompleteAction.java index b355615..6019cd8 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/action/CompleteAction.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/action/CompleteAction.java @@ -17,13 +17,11 @@ package ch.galinet.xml.xmlmerge.action; import ch.galinet.xml.xmlmerge.Action; -import org.jdom.Element; +import org.jdom2.Element; /** * Copies the patch element only if it does not exist in the orginal document. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/action/DeleteAction.java b/src/main/java/ch/galinet/xml/xmlmerge/action/DeleteAction.java index ed0f76d..d30b749 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/action/DeleteAction.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/action/DeleteAction.java @@ -17,13 +17,11 @@ package ch.galinet.xml.xmlmerge.action; import ch.galinet.xml.xmlmerge.Action; -import org.jdom.Element; +import org.jdom2.Element; /** * Keeps the original element only if it does not appear in the patch document. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/action/InsertAction.java b/src/main/java/ch/galinet/xml/xmlmerge/action/InsertAction.java index 19c1be4..31dd6ea 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/action/InsertAction.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/action/InsertAction.java @@ -21,8 +21,8 @@ import java.util.List; import ch.galinet.xml.xmlmerge.matcher.SkipMatcher; -import org.jdom.Content; -import org.jdom.Element; +import org.jdom2.Content; +import org.jdom2.Element; import ch.galinet.xml.xmlmerge.Action; @@ -31,8 +31,6 @@ * existing elements of the same name. Usually applied with the * {@link SkipMatcher}. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/action/OrderedMergeAction.java b/src/main/java/ch/galinet/xml/xmlmerge/action/OrderedMergeAction.java index 104dcf6..b1b0687 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/action/OrderedMergeAction.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/action/OrderedMergeAction.java @@ -24,11 +24,11 @@ import ch.galinet.xml.xmlmerge.MergeAction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.jdom.Attribute; -import org.jdom.Comment; -import org.jdom.Content; -import org.jdom.Element; -import org.jdom.Text; +import org.jdom2.Attribute; +import org.jdom2.Comment; +import org.jdom2.Content; +import org.jdom2.Element; +import org.jdom2.Text; import ch.galinet.xml.xmlmerge.Action; import ch.galinet.xml.xmlmerge.DocumentException; @@ -39,8 +39,6 @@ * Merge implementation traversing parallelly both element contents. Works when * contents are in the same order in both elements. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/action/OverrideAction.java b/src/main/java/ch/galinet/xml/xmlmerge/action/OverrideAction.java index a7ab2cf..f555bb4 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/action/OverrideAction.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/action/OverrideAction.java @@ -17,14 +17,12 @@ package ch.galinet.xml.xmlmerge.action; import ch.galinet.xml.xmlmerge.Action; -import org.jdom.Element; +import org.jdom2.Element; /** * Copies the patch element if it exist in the original, keep the original if no * corresponding patch element exists. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/action/PreserveAction.java b/src/main/java/ch/galinet/xml/xmlmerge/action/PreserveAction.java index 682f624..d7e7540 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/action/PreserveAction.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/action/PreserveAction.java @@ -17,13 +17,11 @@ package ch.galinet.xml.xmlmerge.action; import ch.galinet.xml.xmlmerge.Action; -import org.jdom.Element; +import org.jdom2.Element; /** * Copies the original regardless of the existence of patch element. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/action/ReplaceAction.java b/src/main/java/ch/galinet/xml/xmlmerge/action/ReplaceAction.java index 097ec06..47ffc7c 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/action/ReplaceAction.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/action/ReplaceAction.java @@ -16,15 +16,13 @@ */ package ch.galinet.xml.xmlmerge.action; -import org.jdom.Element; +import org.jdom2.Element; import ch.galinet.xml.xmlmerge.Action; /** * Copies the patch element if it exists. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/action/StandardActions.java b/src/main/java/ch/galinet/xml/xmlmerge/action/StandardActions.java index 37e9d09..bc7daec 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/action/StandardActions.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/action/StandardActions.java @@ -20,8 +20,6 @@ * Constants for built-in actions. The constant names are also used in the * configuration. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/action/XsdInsertAction.java b/src/main/java/ch/galinet/xml/xmlmerge/action/XsdInsertAction.java index 52ea4fb..09168d7 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/action/XsdInsertAction.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/action/XsdInsertAction.java @@ -5,7 +5,7 @@ import ch.galinet.xml.xsdhierarchy.XsdHelper; import ch.galinet.xml.xsdhierarchy.XsdParser; import org.apache.commons.lang3.tuple.Pair; -import org.jdom.Element; +import org.jdom2.Element; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xml.sax.SAXException; diff --git a/src/main/java/ch/galinet/xml/xmlmerge/action/package-info.java b/src/main/java/ch/galinet/xml/xmlmerge/action/package-info.java index a18778f..2d20f1c 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/action/package-info.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/action/package-info.java @@ -15,10 +15,6 @@ * For alternative licensing, please contact info@elca.ch */ /** - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * Implementation of built-in actions. - * - * @wikiLink ModuleXmlMerge */ package ch.galinet.xml.xmlmerge.action; \ No newline at end of file diff --git a/src/main/java/ch/galinet/xml/xmlmerge/config/AbstractXPathConfigurer.java b/src/main/java/ch/galinet/xml/xmlmerge/config/AbstractXPathConfigurer.java index 912e9c2..c58a87b 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/config/AbstractXPathConfigurer.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/config/AbstractXPathConfigurer.java @@ -38,8 +38,6 @@ /** * Superclass for configurers using XPathOperationFactory. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/config/AttributeMergeConfigurer.java b/src/main/java/ch/galinet/xml/xmlmerge/config/AttributeMergeConfigurer.java index 07df814..f256964 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/config/AttributeMergeConfigurer.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/config/AttributeMergeConfigurer.java @@ -34,8 +34,6 @@ /** * Configure to apply actions declared as attributes in the patch DOM. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/config/ConfigurableXmlMerge.java b/src/main/java/ch/galinet/xml/xmlmerge/config/ConfigurableXmlMerge.java index d3baf82..d270d20 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/config/ConfigurableXmlMerge.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/config/ConfigurableXmlMerge.java @@ -31,8 +31,6 @@ /** * XmlMerge wrapper applying a configurer on the wrapped instance. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/config/PropertyXPathConfigurer.java b/src/main/java/ch/galinet/xml/xmlmerge/config/PropertyXPathConfigurer.java index f009cd1..6e36677 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/config/PropertyXPathConfigurer.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/config/PropertyXPathConfigurer.java @@ -32,8 +32,6 @@ * Reads the {@link XPathOperationFactory} * configuration from a property file or a map. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/config/package-info.java b/src/main/java/ch/galinet/xml/xmlmerge/config/package-info.java index e62af2c..e1c4131 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/config/package-info.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/config/package-info.java @@ -15,10 +15,6 @@ * For alternative licensing, please contact info@elca.ch */ /** - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * Implementation of built-in configuration classes. - * - * @wikiLink ModuleXmlMerge */ package ch.galinet.xml.xmlmerge.config; \ No newline at end of file diff --git a/src/main/java/ch/galinet/xml/xmlmerge/factory/AttributeOperationFactory.java b/src/main/java/ch/galinet/xml/xmlmerge/factory/AttributeOperationFactory.java index c9f9f42..7c438bc 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/factory/AttributeOperationFactory.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/factory/AttributeOperationFactory.java @@ -17,8 +17,8 @@ package ch.galinet.xml.xmlmerge.factory; import ch.galinet.xml.xmlmerge.AbstractXmlMergeException; -import org.jdom.Element; -import org.jdom.Namespace; +import org.jdom2.Element; +import org.jdom2.Namespace; import ch.galinet.xml.xmlmerge.Operation; import ch.galinet.xml.xmlmerge.OperationFactory; @@ -27,8 +27,6 @@ * Creates operations by inspecting keywords passed as attributes in patch * elements. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/factory/DiffOperationFactory.java b/src/main/java/ch/galinet/xml/xmlmerge/factory/DiffOperationFactory.java index 5e3bfbe..4da5163 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/factory/DiffOperationFactory.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/factory/DiffOperationFactory.java @@ -17,7 +17,7 @@ package ch.galinet.xml.xmlmerge.factory; import ch.galinet.xml.xmlmerge.AbstractXmlMergeException; -import org.jdom.Element; +import org.jdom2.Element; import ch.galinet.xml.xmlmerge.Operation; import ch.galinet.xml.xmlmerge.OperationFactory; @@ -26,8 +26,6 @@ * An operation factory delegating to other operation factories according to the * existence of the original and patch element. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/factory/OperationResolver.java b/src/main/java/ch/galinet/xml/xmlmerge/factory/OperationResolver.java index 7281f22..969ce8f 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/factory/OperationResolver.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/factory/OperationResolver.java @@ -24,8 +24,6 @@ /** * Creates an operation instance given a short name (alias) or a class name. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/factory/StaticOperationFactory.java b/src/main/java/ch/galinet/xml/xmlmerge/factory/StaticOperationFactory.java index cadc087..2535363 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/factory/StaticOperationFactory.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/factory/StaticOperationFactory.java @@ -16,7 +16,7 @@ */ package ch.galinet.xml.xmlmerge.factory; -import org.jdom.Element; +import org.jdom2.Element; import ch.galinet.xml.xmlmerge.Operation; import ch.galinet.xml.xmlmerge.OperationFactory; @@ -25,8 +25,6 @@ * An operation factory returning always the same operation whatever the * specified elements. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/factory/XPathOperationFactory.java b/src/main/java/ch/galinet/xml/xmlmerge/factory/XPathOperationFactory.java index 9d89920..444dafb 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/factory/XPathOperationFactory.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/factory/XPathOperationFactory.java @@ -22,7 +22,7 @@ import org.jaxen.JaxenException; import org.jaxen.jdom.JDOMXPath; -import org.jdom.Element; +import org.jdom2.Element; import ch.galinet.xml.xmlmerge.AbstractXmlMergeException; import ch.galinet.xml.xmlmerge.MatchException; @@ -30,12 +30,9 @@ import ch.galinet.xml.xmlmerge.OperationFactory; /** - * An operation factory that resolves operations given a map { xpath (as - * String), Operation }. The order in the map is relevant if several XPath + * An operation factory that resolves operations given a map { xpath (as String), Operation }. The order in the map is relevant if several XPath * matches. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ @@ -54,8 +51,7 @@ public class XPathOperationFactory implements OperationFactory { /** * Sets the factory's map containing configuration properties. * - * @param map - * A map containing configuration properties. + * @param map A map containing configuration properties. */ public void setOperationMap(Map map) { this.m_map = map; @@ -63,6 +59,7 @@ public void setOperationMap(Map map) { /** * Sets the default operation returned by this factory. + * * @param operation The default operation returned by this factory. */ public void setDefaultOperation(Operation operation) { @@ -73,12 +70,12 @@ public void setDefaultOperation(Operation operation) { * {@inheritDoc} */ public Operation getOperation(Element originalElement, Element patchElement) - throws AbstractXmlMergeException { + throws AbstractXmlMergeException { Iterator it = m_map.keySet().iterator(); while (it.hasNext()) { String xPath = (String) it.next(); if (matches(originalElement, xPath) || matches(patchElement, - xPath)) { + xPath)) { return (Operation) m_map.get(xPath); } } @@ -88,16 +85,13 @@ public Operation getOperation(Element originalElement, Element patchElement) /** * Detects whether the given element matches the given XPath string. * - * @param element - * The element which will be checked - * @param xPathString - * The XPath expression the element will be checked against + * @param element The element which will be checked + * @param xPathString The XPath expression the element will be checked against * @return True if the given element matches the given XPath string - * @throws AbstractXmlMergeException - * If an error occurred during the matching process + * @throws AbstractXmlMergeException If an error occurred during the matching process */ private boolean matches(Element element, String xPathString) - throws AbstractXmlMergeException { + throws AbstractXmlMergeException { if (element == null) { return false; @@ -105,11 +99,7 @@ private boolean matches(Element element, String xPathString) try { JDOMXPath xPath = new JDOMXPath(xPathString); - - boolean result = xPath.selectNodes(element.getParent()).contains( - element); - - return result; + return xPath.selectNodes(element.getParent()).contains(element); } catch (JaxenException e) { throw new MatchException(element, e); diff --git a/src/main/java/ch/galinet/xml/xmlmerge/factory/package-info.java b/src/main/java/ch/galinet/xml/xmlmerge/factory/package-info.java index 1555990..04c3537 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/factory/package-info.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/factory/package-info.java @@ -15,10 +15,6 @@ * For alternative licensing, please contact info@elca.ch */ /** - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * Implementation of built-in operation factories. - * - * @wikiLink ModuleXmlMerge */ package ch.galinet.xml.xmlmerge.factory; \ No newline at end of file diff --git a/src/main/java/ch/galinet/xml/xmlmerge/mapper/IdentityMapper.java b/src/main/java/ch/galinet/xml/xmlmerge/mapper/IdentityMapper.java index 0cdaa9b..6b3adb4 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/mapper/IdentityMapper.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/mapper/IdentityMapper.java @@ -17,14 +17,12 @@ package ch.galinet.xml.xmlmerge.mapper; import ch.galinet.xml.xmlmerge.Mapper; -import org.jdom.Element; +import org.jdom2.Element; /** * Does not transform the element. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/mapper/NamespaceFilterMapper.java b/src/main/java/ch/galinet/xml/xmlmerge/mapper/NamespaceFilterMapper.java index 253fc1f..69911a7 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/mapper/NamespaceFilterMapper.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/mapper/NamespaceFilterMapper.java @@ -20,15 +20,13 @@ import java.util.List; import ch.galinet.xml.xmlmerge.Mapper; -import org.jdom.Attribute; -import org.jdom.Element; -import org.jdom.Namespace; +import org.jdom2.Attribute; +import org.jdom2.Element; +import org.jdom2.Namespace; /** * Filters out elements and attributes with a specified namespace. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/mapper/StandardMappers.java b/src/main/java/ch/galinet/xml/xmlmerge/mapper/StandardMappers.java index 5d07bae..436c402 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/mapper/StandardMappers.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/mapper/StandardMappers.java @@ -20,8 +20,6 @@ * Constant for built-in mappers. The constant names are also used in the * configuration. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/mapper/package-info.java b/src/main/java/ch/galinet/xml/xmlmerge/mapper/package-info.java index 5ba1795..51ae2e9 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/mapper/package-info.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/mapper/package-info.java @@ -15,10 +15,6 @@ * For alternative licensing, please contact info@elca.ch */ /** - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * Implementation of built-in mappers. - * - * @wikiLink ModuleXmlMerge */ package ch.galinet.xml.xmlmerge.mapper; \ No newline at end of file diff --git a/src/main/java/ch/galinet/xml/xmlmerge/matcher/IdMatcher.java b/src/main/java/ch/galinet/xml/xmlmerge/matcher/IdMatcher.java index b2320fc..fa7ae61 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/matcher/IdMatcher.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/matcher/IdMatcher.java @@ -17,13 +17,11 @@ package ch.galinet.xml.xmlmerge.matcher; import ch.galinet.xml.xmlmerge.Matcher; -import org.jdom.Element; +import org.jdom2.Element; /** * Elements match if their name and 'id' attribute are the same. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/matcher/SkipMatcher.java b/src/main/java/ch/galinet/xml/xmlmerge/matcher/SkipMatcher.java index f16be2e..742169d 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/matcher/SkipMatcher.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/matcher/SkipMatcher.java @@ -17,13 +17,11 @@ package ch.galinet.xml.xmlmerge.matcher; import ch.galinet.xml.xmlmerge.Matcher; -import org.jdom.Element; +import org.jdom2.Element; /** * Elements compared with this matcher never match. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/matcher/StandardMatchers.java b/src/main/java/ch/galinet/xml/xmlmerge/matcher/StandardMatchers.java index b184a89..6b3ea16 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/matcher/StandardMatchers.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/matcher/StandardMatchers.java @@ -19,8 +19,6 @@ /** * Constants for built-in matchers. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/matcher/TagMatcher.java b/src/main/java/ch/galinet/xml/xmlmerge/matcher/TagMatcher.java index 103a6e8..2430776 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/matcher/TagMatcher.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/matcher/TagMatcher.java @@ -17,13 +17,11 @@ package ch.galinet.xml.xmlmerge.matcher; import ch.galinet.xml.xmlmerge.Matcher; -import org.jdom.Element; +import org.jdom2.Element; /** * Compares the qualified name of elements. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/matcher/package-info.java b/src/main/java/ch/galinet/xml/xmlmerge/matcher/package-info.java index 4c6b3e7..fcca9f2 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/matcher/package-info.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/matcher/package-info.java @@ -15,10 +15,6 @@ * For alternative licensing, please contact info@elca.ch */ /** - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * Implementation of built-in matchers. - * - * @wikiLink ModuleXmlMerge */ package ch.galinet.xml.xmlmerge.matcher; \ No newline at end of file diff --git a/src/main/java/ch/galinet/xml/xmlmerge/merge/DefaultXmlMerge.java b/src/main/java/ch/galinet/xml/xmlmerge/merge/DefaultXmlMerge.java index 97d2cc3..2a68ff8 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/merge/DefaultXmlMerge.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/merge/DefaultXmlMerge.java @@ -24,15 +24,15 @@ import ch.galinet.xml.xmlmerge.action.OrderedMergeAction; import ch.galinet.xml.xmlmerge.factory.StaticOperationFactory; import ch.galinet.xml.xmlmerge.mapper.IdentityMapper; -import org.jdom.DocType; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.DOMBuilder; -import org.jdom.input.SAXBuilder; -import org.jdom.output.DOMOutputter; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; +import org.jdom2.DocType; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.JDOMException; +import org.jdom2.input.DOMBuilder; +import org.jdom2.input.SAXBuilder; +import org.jdom2.output.DOMOutputter; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; import org.xml.sax.EntityResolver; import ch.galinet.xml.xmlmerge.AbstractXmlMergeException; @@ -51,8 +51,6 @@ * Default implementation of XmlMerge. Create all JDOM documents, then perform * the merge into a new JDOM document. * - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) */ diff --git a/src/main/java/ch/galinet/xml/xmlmerge/merge/package-info.java b/src/main/java/ch/galinet/xml/xmlmerge/merge/package-info.java index 20c1a93..c55b16c 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/merge/package-info.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/merge/package-info.java @@ -15,10 +15,6 @@ * For alternative licensing, please contact info@elca.ch */ /** - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * Default implementation of XmlMerge. - * - * @wikiLink ModuleXmlMerge */ package ch.galinet.xml.xmlmerge.merge; \ No newline at end of file diff --git a/src/main/java/ch/galinet/xml/xmlmerge/package-info.java b/src/main/java/ch/galinet/xml/xmlmerge/package-info.java index def6412..9c7543f 100644 --- a/src/main/java/ch/galinet/xml/xmlmerge/package-info.java +++ b/src/main/java/ch/galinet/xml/xmlmerge/package-info.java @@ -15,10 +15,6 @@ * For alternative licensing, please contact info@elca.ch */ /** - * @svnLink $Revision$;$Date$;$Author$;$URL$ - * * Interfaces and classes defining the XmlMerge API. - * - * @wikiLink ModuleXmlMerge */ package ch.galinet.xml.xmlmerge; \ No newline at end of file diff --git a/src/test/java/ch/galinet/xml/xmlmerge/DefaultMergeTest.java b/src/test/java/ch/galinet/xml/xmlmerge/DefaultMergeTest.java index 70dc267..ce73acf 100644 --- a/src/test/java/ch/galinet/xml/xmlmerge/DefaultMergeTest.java +++ b/src/test/java/ch/galinet/xml/xmlmerge/DefaultMergeTest.java @@ -19,15 +19,7 @@ package ch.galinet.xml.xmlmerge; -import ch.galinet.xml.xmlmerge.action.CompleteAction; -import ch.galinet.xml.xmlmerge.action.OrderedMergeAction; -import ch.galinet.xml.xmlmerge.config.AttributeMergeConfigurer; -import ch.galinet.xml.xmlmerge.config.ConfigurableXmlMerge; -import ch.galinet.xml.xmlmerge.config.PropertyXPathConfigurer; -import ch.galinet.xml.xmlmerge.factory.XPathOperationFactory; -import ch.galinet.xml.xmlmerge.merge.DefaultXmlMerge; -import org.jdom.Element; -import org.junit.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.IOException; import java.io.InputStream; @@ -36,7 +28,16 @@ import java.util.Map; import java.util.Properties; -import static org.junit.Assert.assertEquals; +import org.jdom2.Element; +import org.junit.jupiter.api.Test; + +import ch.galinet.xml.xmlmerge.action.CompleteAction; +import ch.galinet.xml.xmlmerge.action.OrderedMergeAction; +import ch.galinet.xml.xmlmerge.config.AttributeMergeConfigurer; +import ch.galinet.xml.xmlmerge.config.ConfigurableXmlMerge; +import ch.galinet.xml.xmlmerge.config.PropertyXPathConfigurer; +import ch.galinet.xml.xmlmerge.factory.XPathOperationFactory; +import ch.galinet.xml.xmlmerge.merge.DefaultXmlMerge; /** * This class tests several functionalities of the xml_merge module, using a @@ -44,9 +45,8 @@ * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) - * @svnLink $Revision$;$Date$;$Author$;$URL$ */ -public class DefaultMergeTest { +class DefaultMergeTest { /** * New line. @@ -56,10 +56,9 @@ public class DefaultMergeTest { /** * Tests a simple merge of two strings. * - * @throws Exception If an error occurs during the test */ @Test - public void testSimpleMerge() throws Exception { + void testSimpleMerge() { String xml1 = "" + "" @@ -129,10 +128,9 @@ public void testSimpleMerge() throws Exception { /** * Tests a merge of three strings. * - * @throws Exception If an error occurs during the test */ @Test - public void testThreeMerges() throws Exception { + void testThreeMerges() { String[] sources = { "", @@ -157,10 +155,9 @@ public void testThreeMerges() throws Exception { * Tests programmatic configuration of an XmlMerge instance, using an * XPathOperationFactory. * - * @throws Exception If an error occurs during the test */ @Test - public void testXPathOperationFactory() throws Exception { + void testXPathOperationFactory() { String[] sources = { "", @@ -202,7 +199,7 @@ public void testXPathOperationFactory() throws Exception { * @throws Exception If an error occurs during the test */ @Test - public void testPropertyXPathConfigurer() throws Exception { + void testPropertyXPathConfigurer() throws Exception { String[] sources = { @@ -232,10 +229,9 @@ public void testPropertyXPathConfigurer() throws Exception { * Tests the InsertAction in conjunction with the SkipMatcher, inserting the * patch elements after the original elements of the same tag in the result. * - * @throws Exception If an error occurs during the test */ @Test - public void testInsertAction() throws Exception { + void testInsertAction() { String[] sources = { "" @@ -271,10 +267,9 @@ public void testInsertAction() throws Exception { /** * Tests a merge of an element's attributes. * - * @throws Exception If an error occurs during the test */ @Test - public void testAttributes() throws Exception { + void testAttributes() { String[] sources = { @@ -301,10 +296,9 @@ public void testAttributes() throws Exception { /** * Tests a merge using the IdentityMapper. * - * @throws Exception If an error occurs during the test */ @Test - public void testIdMapper() throws Exception { + void testIdMapper() { String[] sources = { "" @@ -347,10 +341,9 @@ public void testIdMapper() throws Exception { * Tests configuration of an XmlMerge instance with inline attributes in the * patch document. * - * @throws Exception If an error occurs during the test */ @Test - public void testAttributeMerge() throws Exception { + void testAttributeMerge() { String[] sources = { "" @@ -411,7 +404,6 @@ private void writeFromTo(InputStream in, OutputStream out) { * * @author Laurent Bovet (LBO) * @author Alex Mathey (AMA) - * @svnLink $Revision$;$Date$;$Author$;$URL$ */ public static class ServletNameMatcher implements Matcher { @@ -431,10 +423,9 @@ public boolean matches(Element originalElement, Element patchElement) { /** * Tests a merge using a custom matcher. * - * @throws Exception If an error occurs during the test */ @Test - public void testCustomMatcher() throws Exception { + void testCustomMatcher() { String[] sources = new String[]{ "" @@ -532,5 +523,4 @@ public void testCustomMatcher() throws Exception { assertEquals(expected.trim(), result.trim()); } -} - +} \ No newline at end of file