[maven] branch MNG-6571 updated: use assertSame()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[maven] branch MNG-6571 updated: use assertSame()

hboutemy
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch MNG-6571
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/MNG-6571 by this push:
     new 0198d47  use assertSame()
0198d47 is described below

commit 0198d474c8bf96c1a05e7b76b9e7ec72e75d37fb
Author: Hervé Boutemy <[hidden email]>
AuthorDate: Fri Feb 8 13:16:05 2019 +0100

    use assertSame()
---
 .../java/org/apache/maven/artifact/versioning/VersionRangeTest.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java
index da5d758..2cf0fec 100644
--- a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java
+++ b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java
@@ -732,15 +732,15 @@ public class VersionRangeTest
         throws InvalidVersionSpecificationException
     {
         VersionRange range = VersionRange.createFromVersionSpec( "[1.0,1.2]" );
-        assertTrue( range == VersionRange.createFromVersionSpec( "[1.0,1.2]" ) ); // same instance from spec cache
+        assertSame( range, VersionRange.createFromVersionSpec( "[1.0,1.2]" ) ); // same instance from spec cache
 
         VersionRange spec = VersionRange.createFromVersionSpec( "1.0" );
-        assertTrue( spec == VersionRange.createFromVersionSpec( "1.0" ) ); // same instance from spec cache
+        assertSame( spec, VersionRange.createFromVersionSpec( "1.0" ) ); // same instance from spec cache
         List<Restriction> restrictions = spec.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
 
         VersionRange version = VersionRange.createFromVersion( "1.0" );
-        assertTrue( version == VersionRange.createFromVersion( "1.0" ) ); // same instance from version cache
+        assertSame( version, VersionRange.createFromVersion( "1.0" ) ); // same instance from version cache
         restrictions = version.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 0, restrictions.size() );