Skip to content

Commit

Permalink
Update dependencies (#26)
Browse files Browse the repository at this point in the history
* Update dependencies

Changes:
* parent POM to 16
* remove sole use of hamcrest
* jmh update

* nullcheck
  • Loading branch information
cstamas authored Dec 13, 2023
1 parent 7bfeb09 commit aa82ed3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
14 changes: 4 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
<parent>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus</artifactId>
<version>13</version>
<version>16</version>
</parent>

<artifactId>plexus-xml</artifactId>
Expand Down Expand Up @@ -55,7 +55,7 @@ limitations under the License.
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-xml-impl</artifactId>
<version>4.0.0-alpha-7</version>
<version>4.0.0-alpha-8</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.sisu</groupId>
Expand All @@ -66,26 +66,20 @@ limitations under the License.
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>1.36</version>
<version>1.37</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>1.36</version>
<version>1.37</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;
import static org.junit.jupiter.api.Assertions.*;

/**
Expand Down Expand Up @@ -1485,14 +1483,16 @@ void testBlankAtBeginning(String ws) throws XmlPullParserException, IOException

MXParser parser = new MXParser();
parser.setInput(new StringReader(ws + xml));
assertThat(
assertThrows(XmlPullParserException.class, parser::next).getMessage(),
containsString("XMLDecl is only allowed as first characters in input"));

String message;
message = assertThrows(XmlPullParserException.class, parser::next).getMessage();
assertNotNull(message);
assertTrue(message.contains("XMLDecl is only allowed as first characters in input"), message);

parser.setInput(new StringReader(ws + xml));
assertEquals(XmlPullParser.IGNORABLE_WHITESPACE, parser.nextToken());
assertThat(
assertThrows(XmlPullParserException.class, parser::nextToken).getMessage(),
containsString("processing instruction can not have PITarget with reserved xml name"));
message = assertThrows(XmlPullParserException.class, parser::nextToken).getMessage();
assertNotNull(message);
assertTrue(message.contains("processing instruction can not have PITarget with reserved xml name"), message);
}
}

0 comments on commit aa82ed3

Please sign in to comment.