Skip to content

Commit e9aaa7a

Browse files
committed
Update SMIMETest.java
Add identity and null checks before comparing byte arrays.
1 parent c47e8a8 commit e9aaa7a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

util/src/test/java/org/bouncycastle/asn1/smime/test/SMIMETest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ private boolean isSameAs(
2626
byte[] a,
2727
byte[] b)
2828
{
29+
if (a == b)
30+
{
31+
return true;
32+
}
33+
if (null == a || null == b)
34+
{
35+
return false;
36+
}
2937
if (a.length != b.length)
3038
{
3139
return false;

0 commit comments

Comments
 (0)