@Test public void validateReleaseWithValidRelease() { SW360Release release = new SW360Release() .setName("releaseName") .setVersion("1.0-SNAPSHOT"); assertThat(SW360ReleaseAdapterUtils.validateRelease(release)).isSameAs(release); }
public static SW360Release validateRelease(SW360Release release) { if (StringUtils.isEmpty(release.getName())) { throw new IllegalArgumentException("Invalid release: missing property 'name'."); } if (StringUtils.isEmpty(release.getVersion())) { throw new IllegalArgumentException("Invalid release: missing property 'version'."); } return release; }
SW360ReleaseAdapterUtils { public static SW360Release validateRelease(SW360Release release) { if (StringUtils.isEmpty(release.getName())) { throw new IllegalArgumentException("Invalid release: missing property 'name'."); } if (StringUtils.isEmpty(release.getVersion())) { throw new IllegalArgumentException("Invalid release: missing property 'version'."); } return release; } }
SW360ReleaseAdapterUtils { public static SW360Release validateRelease(SW360Release release) { if (StringUtils.isEmpty(release.getName())) { throw new IllegalArgumentException("Invalid release: missing property 'name'."); } if (StringUtils.isEmpty(release.getVersion())) { throw new IllegalArgumentException("Invalid release: missing property 'version'."); } return release; } private  SW360ReleaseAdapterUtils(); }
SW360ReleaseAdapterUtils { public static SW360Release validateRelease(SW360Release release) { if (StringUtils.isEmpty(release.getName())) { throw new IllegalArgumentException("Invalid release: missing property 'name'."); } if (StringUtils.isEmpty(release.getVersion())) { throw new IllegalArgumentException("Invalid release: missing property 'version'."); } return release; } private  SW360ReleaseAdapterUtils(); static SW360Release validateRelease(SW360Release release); }
SW360ReleaseAdapterUtils { public static SW360Release validateRelease(SW360Release release) { if (StringUtils.isEmpty(release.getName())) { throw new IllegalArgumentException("Invalid release: missing property 'name'."); } if (StringUtils.isEmpty(release.getVersion())) { throw new IllegalArgumentException("Invalid release: missing property 'version'."); } return release; } private  SW360ReleaseAdapterUtils(); static SW360Release validateRelease(SW360Release release);  }