Skip to content

Commit

Permalink
Checkstyle fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurzydlowski committed Oct 11, 2022
1 parent aba463c commit 648e50f
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public Iterator<String> getPrefixes(String namespaceUri) {
"r:host", root, XPathConstants.NODESET));
for (Element hostElem : elements) {

List<? extends Node> children = Utils.asNodeList((NodeList) hostElem.getChildNodes());
List<? extends Node> children = Utils.asNodeList(hostElem.getChildNodes());
Node institutionsCovered = null;
Node clientCredentials = null;
Node serverCredentials = null;
Expand All @@ -281,7 +281,7 @@ public Iterator<String> getPrefixes(String namespaceUri) {
Set<String> coveredHeis = new HashSet<>();

if (institutionsCovered != null) {
List<? extends Node> heiNodes = Utils.asNodeList((NodeList) institutionsCovered.getChildNodes());
List<? extends Node> heiNodes = Utils.asNodeList(institutionsCovered.getChildNodes());
for (Node heiIdNode : heiNodes) {
if ("hei-id".equals(heiIdNode.getLocalName())) {
coveredHeis.add(heiIdNode.getTextContent());
Expand All @@ -297,10 +297,12 @@ public Iterator<String> getPrefixes(String namespaceUri) {
this.hostServerKeys.put(hostElem, keys);

if (clientCredentials != null) {
List<? extends Node> credentialNodes = Utils.asNodeList((NodeList) clientCredentials.getChildNodes());
List<? extends Node> credentialNodes =
Utils.asNodeList(clientCredentials.getChildNodes());
for (Node credential : credentialNodes) {
if ("certificate".equals(credential.getLocalName())) {
String fingerprint = credential.getAttributes().getNamedItem("sha-256").getTextContent();
String fingerprint =
credential.getAttributes().getNamedItem("sha-256").getTextContent();

Set<String> coveredCertHeis;

Expand All @@ -314,7 +316,8 @@ public Iterator<String> getPrefixes(String namespaceUri) {
coveredCertHeis.addAll(coveredHeis);

} else if ("rsa-public-key".equals(credential.getLocalName())) {
String fingerprint = credential.getAttributes().getNamedItem("sha-256").getTextContent();
String fingerprint =
credential.getAttributes().getNamedItem("sha-256").getTextContent();
Set<String> coveredKeyHeis;
if (this.cliKeyHeis.containsKey(fingerprint)) {
coveredKeyHeis = this.cliKeyHeis.get(fingerprint);
Expand All @@ -328,10 +331,12 @@ public Iterator<String> getPrefixes(String namespaceUri) {
}

if (serverCredentials != null) {
List<? extends Node> credentialNodes = Utils.asNodeList((NodeList) serverCredentials.getChildNodes());
List<? extends Node> credentialNodes =
Utils.asNodeList(serverCredentials.getChildNodes());
for (Node credential : credentialNodes) {
if ("rsa-public-key".equals(credential.getLocalName())) {
String fingerprint = credential.getAttributes().getNamedItem("sha-256").getTextContent();
String fingerprint =
credential.getAttributes().getNamedItem("sha-256").getTextContent();
keys.add(fingerprint);
}
}
Expand Down Expand Up @@ -828,7 +833,6 @@ public boolean isStale() {
}
}

@SuppressWarnings("serial")
static class CatalogueParserException extends RegistryClientException {
CatalogueParserException(String message) {
super(message);
Expand Down

0 comments on commit 648e50f

Please sign in to comment.