Add some tests, minor Checkstyle fixes

This commit is contained in:
ljacqu
2017-07-16 12:59:33 +02:00
parent 7c48cf59c7
commit 4ac980111d
22 changed files with 435 additions and 34 deletions
@@ -5,11 +5,11 @@ import java.util.regex.Pattern;
/**
* Utility class about the InternetProtocol
*/
public class InternetProtocolUtils {
public final class InternetProtocolUtils {
private final static Pattern LOCAL_ADDRESS_PATTERN =
Pattern.compile("(^127\\.)|(^(0)?10\\.)|(^172\\.(0)?1[6-9]\\.)|(^172\\.(0)?2[0-9]\\.)" +
"|(^172\\.(0)?3[0-1]\\.)|(^169\\.254\\.)|(^192\\.168\\.)");
private static final Pattern LOCAL_ADDRESS_PATTERN =
Pattern.compile("(^127\\.)|(^(0)?10\\.)|(^172\\.(0)?1[6-9]\\.)|(^172\\.(0)?2[0-9]\\.)"
+ "|(^172\\.(0)?3[0-1]\\.)|(^169\\.254\\.)|(^192\\.168\\.)");
// Utility class
private InternetProtocolUtils() {