Created
December 6, 2012 19:30
-
-
Save andreaceccanti/4227554 to your computer and use it in GitHub Desktop.
Test that shows how VOMS Java APIs (if not properly used) will leak memory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestOOM2 { | |
public static final Logger log = Logger.getLogger(TestOOM.class); | |
public TestOOM2() throws CertificateException { | |
X509Certificate[] proxyChain = PKIUtils.loadCertificates("/tmp/x509up_u504"); | |
while(true){ | |
VOMSValidator validator = new VOMSValidator(proxyChain); | |
validator.validate(); | |
String[] fqans = validator.getAllFullyQualifiedAttributes(); | |
log.info("FQANs: "+Arrays.toString(fqans)); | |
} | |
} | |
/** | |
* @param args | |
* @throws CertificateException | |
*/ | |
public static void main(String[] args) throws CertificateException { | |
new TestOOM2(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment