diff --git a/service/src/main/java/gov/nasa/pds/api/registry/model/identifiers/PdsVid.java b/service/src/main/java/gov/nasa/pds/api/registry/model/identifiers/PdsVid.java index e259fd11..9d530aad 100644 --- a/service/src/main/java/gov/nasa/pds/api/registry/model/identifiers/PdsVid.java +++ b/service/src/main/java/gov/nasa/pds/api/registry/model/identifiers/PdsVid.java @@ -5,8 +5,8 @@ public class PdsVid implements Comparable { private final int minorVersion; public PdsVid(int majorVersion, int minorVersion) { - if (majorVersion < 1) { - String errMsg = String.format("majorVersion must be 1 or higher (got '%d'))", majorVersion); + if (majorVersion < 0) { + String errMsg = String.format("majorVersion must be 0 or higher (got '%d'))", majorVersion); throw new IllegalArgumentException(errMsg); } diff --git a/service/src/test/java/gov/nasa/pds/api/registry/model/PdsVidTest.java b/service/src/test/java/gov/nasa/pds/api/registry/model/PdsVidTest.java index 029c26aa..dcefcdb9 100644 --- a/service/src/test/java/gov/nasa/pds/api/registry/model/PdsVidTest.java +++ b/service/src/test/java/gov/nasa/pds/api/registry/model/PdsVidTest.java @@ -13,10 +13,6 @@ public void testValidInstantiations() { @Test public void testInvalidInstantiations() { - Assert.assertThrows(IllegalArgumentException.class, () -> { - PdsVid.fromString("0.1"); - }); - Assert.assertThrows(IllegalArgumentException.class, () -> { PdsVid.fromString("1.-1"); });