IG: cleanup some regex warnings

This commit is contained in:
Bas Leijdekkers
2017-03-16 11:36:08 +01:00
parent 5b1a4e5258
commit 9bd32af949
3 changed files with 4 additions and 4 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2003-2016 Dave Griffith, Bas Leijdekkers
* Copyright 2003-2017 Dave Griffith, Bas Leijdekkers
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ import java.util.regex.Pattern;
class FormatDecode {
private static final Pattern fsPattern = Pattern.compile("%(\\d+\\$)?([-#+ 0,(\\<]*)?(\\d+)?(\\.\\d*)?([tT])?([a-zA-Z%])");
private static final Pattern fsPattern = Pattern.compile("%(\\d+\\$)?([-#+ 0,(<]*)?(\\d+)?(\\.\\d*)?([tT])?([a-zA-Z%])");
private FormatDecode() {}
@@ -51,7 +51,7 @@ public class HardcodedFileSeparatorsInspection extends BaseInspection {
* media types.
*/
@NonNls private static final String EXAMPLE_MIME_MEDIA_TYPE_PATTERN =
"example/\\p{Alnum}+(?:[\\.\\-\\\\+]\\p{Alnum}+)*";
"example/\\p{Alnum}+(?:[.\\-\\\\+]\\p{Alnum}+)*";
/**
* A regular expression pattern that matches strings which start with a URL
* protocol, as they're likely to actually be URLs.
@@ -28,7 +28,7 @@ import java.util.regex.Pattern;
public class HardcodedLineSeparatorsInspection extends BaseInspection {
private static final Pattern newlines = Pattern.compile("\\\\n|\\\\r|\\\\0{0,1}12|\\\\0{0,1}15");
private static final Pattern newlines = Pattern.compile("\\\\n|\\\\r|\\\\0?12|\\\\0?15");
@Override
@NotNull