Рефакторинг

This commit is contained in:
serega6531
2020-04-16 00:48:39 +03:00
parent 85681947cd
commit 07affe3812
4 changed files with 21 additions and 37 deletions

View File

@@ -4,7 +4,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.security.crypto.codec.Hex;
import ru.serega6531.packmate.model.FoundPattern;
import ru.serega6531.packmate.model.Pattern;
import ru.serega6531.packmate.utils.Bytes;
import ru.serega6531.packmate.utils.BytesUtils;
import java.util.*;
import java.util.regex.Matcher;
@@ -80,7 +80,7 @@ class PatternMatcher {
final byte[] value = Hex.decode(pattern.getValue());
while (true) {
int start = Bytes.indexOf(contentBytes, value, startSearch, contentBytes.length);
int start = BytesUtils.indexOf(contentBytes, value, startSearch, contentBytes.length);
if (start == -1) {
return;