Skip to content

Commit 772ec17

Browse files
committed
Fixed compilation error for PR issue #271
1 parent 9a22f7a commit 772ec17

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

oidc/src/main/java/oidc/saml/AuthnRequestContextConsumer.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ private IDPList addIdpEntries(String loginHint) {
217217
idpEntry.setProviderID(s);
218218
return idpEntry;
219219
})
220-
.collect(Collectors.toList());
220+
.toList();
221221
IDPList idpList = ((IDPListBuilder) registry.getBuilderFactory().getBuilder(IDPList.DEFAULT_ELEMENT_NAME)).buildObject();
222222
idpList.getIDPEntrys().addAll(idpEntries);
223223
return idpList;
@@ -244,12 +244,9 @@ private void addRequesterIds(String entityId, Scoping scoping) {
244244

245245
private boolean isValidURI(String uri) {
246246
try {
247-
URI parsed = new URI(uri);
248-
if (parsed.isAbsolute() === false) {
249-
// As per paragraph 1.3.2 of the SAML 2.0 core specifications
250-
throw new URISyntaxException("URI provided is not an absolute URI as required by SAML 2.0 specifications.");
251-
}
252-
return true;
247+
// As per paragraph 1.3.2 of the SAML 2.0 core specifications
248+
// "URI provided is not an absolute URI as required by SAML 2.0 specifications."
249+
return new URI(uri).isAbsolute();
253250
} catch (URISyntaxException e) {
254251
return false;
255252
}

0 commit comments

Comments
 (0)