Skip to content

Commit

Permalink
adjust exception message
Browse files Browse the repository at this point in the history
Signed-off-by: yuye-aws <[email protected]>
  • Loading branch information
yuye-aws committed Mar 14, 2024
1 parent 4153988 commit 06ca1c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,9 @@ private void validateAndParseAlgorithmMap(final Map<String, Object> algorithmMap
throw new IllegalArgumentException(
String.format(
Locale.ROOT,
"Unable to create %s processor as [%s] parameters cannot be cast to [%s]",
"Unable to create %s processor as parameters for [%s] algorithm must be an object",
TYPE,
algorithmKey,
Map.class.getName()
algorithmKey
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,9 @@ public void testCreate_whenAlgorithmFieldInvalidAlgorithmContent_thenFail() {
assertEquals(
String.format(
Locale.ROOT,
"Unable to create %s processor as [%s] parameters cannot be cast to [%s]",
"Unable to create %s processor as parameters for [%s] algorithm must be an object",
TYPE,
FixedTokenLengthChunker.ALGORITHM_NAME,
Map.class.getName()
FixedTokenLengthChunker.ALGORITHM_NAME
),
illegalArgumentException.getMessage()
);
Expand Down

0 comments on commit 06ca1c7

Please sign in to comment.