Skip to content

Commit

Permalink
backport fix for MID-6765 - compare binary data
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Mraz committed Jul 30, 2021
1 parent 32b8fdc commit ca57a70
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -15,6 +15,7 @@
*/
package com.evolveum.midpoint.prism.match;

import java.util.Arrays;
import java.util.regex.Pattern;

import javax.xml.namespace.QName;
Expand Down Expand Up @@ -63,6 +64,9 @@ public boolean match(T a, T b) {
if (a instanceof Matchable && b instanceof Matchable) {
return ((Matchable)a).match((Matchable)b);
}
if (a instanceof byte[] && b instanceof byte[]) {
return Arrays.equals((byte[]) a, (byte[]) b);
}
// Just use plain java equals() method
return a.equals(b);
}
Expand Down

0 comments on commit ca57a70

Please sign in to comment.