From 55da3ee353135290d98860d29da4d82f0bbf86e8 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Mon, 15 Jan 2018 17:23:20 +0100 Subject: [PATCH] =?UTF-8?q?LogConsolePreferences=20=E2=80=94=20remove=20un?= =?UTF-8?q?used=20patterns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logging/LogConsolePreferences.java | 33 ++----------------- 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/platform/lang-api/src/com/intellij/diagnostic/logging/LogConsolePreferences.java b/platform/lang-api/src/com/intellij/diagnostic/logging/LogConsolePreferences.java index 8d09b15d8cb4..5371ec055509 100644 --- a/platform/lang-api/src/com/intellij/diagnostic/logging/LogConsolePreferences.java +++ b/platform/lang-api/src/com/intellij/diagnostic/logging/LogConsolePreferences.java @@ -1,19 +1,6 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. */ - package com.intellij.diagnostic.logging; import com.intellij.execution.process.ProcessOutputTypes; @@ -61,22 +48,8 @@ public class LogConsolePreferences extends LogFilterRegistrar { @NonNls public static final String DEBUG = "DEBUG"; @NonNls public static final String CUSTOM = "CUSTOM"; - @Deprecated - public final static Pattern ERROR_PATTERN = Pattern.compile(".*(" + ERROR + "|FATAL).*"); - @Deprecated - public final static Pattern WARNING_PATTERN = Pattern.compile(".*" + WARNING + ".*"); - @Deprecated - public final static Pattern WARN_PATTERN = Pattern.compile(".*" + WARN + ".*"); - @Deprecated - public final static Pattern INFO_PATTERN = Pattern.compile(".*" + INFO + ".*"); - @Deprecated - public static final Pattern DEBUG_PATTERN = Pattern.compile(".*" + DEBUG + ".*"); - - @NonNls public final static Pattern EXCEPTION_PATTERN = Pattern.compile(".*at .*"); - /** - * Set of patterns to assign severity to given message. Replaces deprecated patterns {@link LogConsolePreferences#ERROR_PATTERN}, - * {@link LogConsolePreferences#DEBUG_PATTERN}, etc with the versions which don't contain ".*" + * Set of patterns to assign severity to given message. */ private enum LevelPattern { @@ -206,7 +179,7 @@ public class LogConsolePreferences extends LogFilterRegistrar { } @Override - public void loadState(final Element object) { + public void loadState(@NotNull final Element object) { try { final List children = object.getChildren(FILTER); for (Object child : children) {