From 3dd9445f4bed7b3dea98b686a6850161764ffe82 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Wed, 20 Dec 2017 09:48:54 +0100 Subject: [PATCH] [TEST] Catch ISE instead of IAE for illegal array size relates elastic/x-pack-elasticsearch#2493 Original commit: elastic/x-pack-elasticsearch@605dcebf0e3669bda1e8bd02464ba892fbf8800d --- .../xpack/security/authc/AuthenticationServiceTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java index c1a17791551..57cb3cd7e82 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java @@ -845,7 +845,7 @@ public class AuthenticationServiceTests extends ESTestCase { success.set(true); latch.countDown(); }, this::logAndFail)); - } catch (IllegalArgumentException ex) { + } catch (IllegalStateException ex) { assertThat(ex.getMessage(), containsString("array length must be <= to " + ArrayUtil.MAX_ARRAY_LENGTH + " but was: ")); latch.countDown(); } catch (NegativeArraySizeException ex) {