cleanup - diamonds

GitOrigin-RevId: 1c500da1fd340f0951de11096afc3e320e38d3c0
This commit is contained in:
Vladimir Krivosheev
2019-05-03 19:02:25 +03:00
committed by intellij-monorepo-bot
parent ec60d9e443
commit 0958cc04e6
125 changed files with 240 additions and 588 deletions
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2009 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-2019 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.compiler.impl;
import com.intellij.util.containers.EmptyIterator;
@@ -28,7 +14,7 @@ import java.util.Stack;
* @author Eugene Zhuravlev
*/
public class TreeBasedMap<T> {
private Node<T> myRoot = new Node<T>();
private Node<T> myRoot = new Node<>();
private final StringInterner myInterner;
private final char mySeparator;
private int mySize = 0;
@@ -96,10 +82,10 @@ public class TreeBasedMap<T> {
@NotNull
private Node<T> addChild(final StringInterner table, final String text, final int nameStartIndex, final int nameEndIndex) {
if (myChildren == null) {
myChildren = new HashMap<String, Node<T>>(3, 0.95f);
myChildren = new HashMap<>(3, 0.95f);
}
Node<T> newChild = new Node<T>();
Node<T> newChild = new Node<>();
final String key = table.intern(text.substring(nameStartIndex, nameEndIndex));
myChildren.put(key, newChild);
@@ -146,7 +132,7 @@ public class TreeBasedMap<T> {
}
public void removeAll() {
myRoot = new Node<T>();
myRoot = new Node<>();
}
public Iterator<String> getKeysIterator() {
@@ -155,7 +141,7 @@ public class TreeBasedMap<T> {
private class KeysIterator implements Iterator<String> {
private final Stack<PathElement<T>> myCurrentNodePath = new Stack<PathElement<T>>();
private final Stack<PathElement<T>> myCurrentNodePath = new Stack<>();
private final StringBuilder myCurrentName = new StringBuilder();
KeysIterator() {
@@ -129,7 +129,7 @@ public class CompilerUIConfigurable implements SearchableConfigurable, Configura
}
}
Map<Setting, Collection<JComponent>> controls = new HashMap<Setting, Collection<JComponent>>();
Map<Setting, Collection<JComponent>> controls = new HashMap<>();
controls.put(Setting.RESOURCE_PATTERNS, ContainerUtilRt.newArrayList(myResourcePatternsLabel, myResourcePatternsField, myPatternLegendLabel));
controls.put(Setting.CLEAR_OUTPUT_DIR_ON_REBUILD, Collections.singleton(myCbClearOutputDirectory));
controls.put(Setting.ADD_NOT_NULL_ASSERTIONS, Collections.singleton(myAssertNotNullPanel));
@@ -1,4 +1,4 @@
// 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.
// Copyright 2000-2019 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.compiler.server;
import com.intellij.ide.highlighter.JavaFileType;
@@ -91,7 +91,7 @@ public abstract class DefaultMessageHandler implements BuilderMessageHandler {
final boolean isRemoved = task.getIsFieldRemoved();
boolean canceled = false;
final Ref<Boolean> isSuccess = Ref.create(Boolean.TRUE);
final Set<String> affectedPaths = Collections.synchronizedSet(new HashSet<String>()); // PsiSearchHelper runs multiple threads
final Set<String> affectedPaths = Collections.synchronizedSet(new HashSet<>()); // PsiSearchHelper runs multiple threads
final long searchStart = System.currentTimeMillis();
try {
if (myConstantSearchTime > CONSTANT_SEARCH_TIME_LIMIT) {