mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[console filters] IDEA-149878 Freeze in GradleConsoleFilterProvider: use a bombed char sequence with 1 sec delay
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* 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.
|
||||
@@ -17,6 +17,7 @@ package com.intellij.execution.filters;
|
||||
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
@@ -61,6 +62,9 @@ public class CompositeFilter implements Filter, FilterMixin {
|
||||
try {
|
||||
result = filter.applyFilter(line, entireLength);
|
||||
}
|
||||
catch (ProcessCanceledException ignore) {
|
||||
result = null;
|
||||
}
|
||||
catch (Throwable t) {
|
||||
throw new RuntimeException("Error while applying " + filter + " to '" + line + "'", t);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* 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.
|
||||
@@ -139,7 +139,7 @@ public class RegexpFilter implements Filter {
|
||||
|
||||
@Override
|
||||
public Result applyFilter(String line, int entireLength) {
|
||||
Matcher matcher = myPattern.matcher(line);
|
||||
Matcher matcher = myPattern.matcher(StringUtil.newBombedCharSequence(line, 1000));
|
||||
if (!matcher.find()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user