Skip to content

Commit

Permalink
Fix sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
enricovianello committed Dec 9, 2024
1 parent 202e5e6 commit 5563f89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

Expand All @@ -32,6 +31,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.collect.Sets;

import eu.emi.security.authn.x509.impl.OpensslNameUtils;

public class MapfileVOMembershipSource implements VOMembershipSource {
Expand Down Expand Up @@ -82,7 +83,7 @@ public Set<String> getVOMembers() {

long startTime = System.currentTimeMillis();

Set<String> subjects = new HashSet<String>();
Set<String> subjects = Sets.newHashSet();

CSVParser parser = getParser();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void VOMapParserTest() {

Assert.assertEquals("testers", m.getVOName());
Assert.assertTrue(m.getVOMembers().contains(AC_SUBJECT));
Assert.assertTrue(m.getVOMembers().contains(EV_SUBJECT));
Assert.assertFalse(m.getVOMembers().contains(EV_SUBJECT));
Assert.assertFalse(m.getVOMembers().contains(COMMA_SUBJECT));
Assert.assertTrue(m.getVOMembers().contains(RM_SUBJECT));
Assert.assertFalse(m.getVOMembers().contains("CN=I am not Real, L=CNAF"));
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/vomsmap/testers.map
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/C=IT/O=INFN/OU=Personal Certificate/L=CNAF/CN=Andrea Ceccanti,/C=IT/O=INFN/CN=INFN CA,[email protected]
/C=IT/O=INFN/OU=Personal Certificate/L=CNAF/CN=Enrico Vianello,/C=IT/O=INFN/CN=INFN CA,[email protected]
C=IT/O=INFN/OU=Personal Certificate/L=CNAF/CN=Enrico Vianello,/C=IT/O=INFN/CN=INFN CA,[email protected]
/C=IT/O=INFN/OU=Personal Certificate/L=CNAF,Bologna/CN=Federica Agostini,/C=IT/O=INFN/CN=INFN CA,[email protected]
/C=IT/O=INFN/OU=Personal Certificate/L=CNAF/CN=Roberta Miccoli,/C=IT/O=INFN/CN=INFN CA,[email protected]

0 comments on commit 5563f89

Please sign in to comment.