am fe7c0039: Merge "Fix test since getExtendedKeyUsage doc disagrees"
* commit 'fe7c0039e934b7f4681a58fbebd9cd2d1e018818':
Fix test since getExtendedKeyUsage doc disagrees
diff --git a/luni/src/test/java/tests/security/cert/X509Certificate2Test.java b/luni/src/test/java/tests/security/cert/X509Certificate2Test.java
index 2c9e2fb..03b0243 100644
--- a/luni/src/test/java/tests/security/cert/X509Certificate2Test.java
+++ b/luni/src/test/java/tests/security/cert/X509Certificate2Test.java
@@ -303,10 +303,21 @@
X509Certificate cert = generateCert(CERT_CORRECT);
List<String> l = cert.getExtendedKeyUsage();
assertNotNull(l);
- l.clear();
- l.add("Test");
- assertEquals(1, l.size());
- l.remove(0);
+
+ try {
+ l.clear();
+ } catch (UnsupportedOperationException expected) {
+ }
+
+ try {
+ l.add("Test");
+ } catch (UnsupportedOperationException expected) {
+ }
+
+ try {
+ l.remove(0);
+ } catch (UnsupportedOperationException expected) {
+ }
}
private static final String CERT_WITHOUT_BASIC