cleanup: use <> instead of <type>

This commit is contained in:
Sergey Ignatov
2018-07-10 14:40:59 +03:00
parent 35e0c036d3
commit 0d807c719d
20 changed files with 26 additions and 26 deletions
@@ -248,7 +248,7 @@ public class JavaStackFrame extends XStackFrame implements JVMStackFrameInfoProv
}
private static final Pair<Set<String>, Set<TextWithImports>> EMPTY_USED_VARS =
Pair.create(Collections.emptySet(), Collections.<TextWithImports>emptySet());
Pair.create(Collections.emptySet(), Collections.emptySet());
// copied from FrameVariablesTree
private void buildVariables(DebuggerContextImpl debuggerContext,
@@ -586,7 +586,7 @@ public class JavaStackFrame extends XStackFrame implements JVMStackFrameInfoProv
private static Pair<Set<String>, Set<TextWithImports>> findReferencedVars(Set<String> visibleVars, @NotNull SourcePosition position) {
final int line = position.getLine();
if (line < 0) {
return Pair.create(Collections.emptySet(), Collections.<TextWithImports>emptySet());
return Pair.create(Collections.emptySet(), Collections.emptySet());
}
final PsiFile positionFile = position.getFile();
if (!positionFile.isValid() || !positionFile.getLanguage().isKindOf(JavaLanguage.INSTANCE)) {
@@ -596,7 +596,7 @@ public class JavaStackFrame extends XStackFrame implements JVMStackFrameInfoProv
final VirtualFile vFile = positionFile.getVirtualFile();
final Document doc = vFile != null ? FileDocumentManager.getInstance().getDocument(vFile) : null;
if (doc == null || doc.getLineCount() == 0 || line > (doc.getLineCount() - 1)) {
return Pair.create(Collections.emptySet(), Collections.<TextWithImports>emptySet());
return Pair.create(Collections.emptySet(), Collections.emptySet());
}
final TextRange limit = calculateLimitRange(positionFile, doc, line);
@@ -647,7 +647,7 @@ public class JavaStackFrame extends XStackFrame implements JVMStackFrameInfoProv
}
}
}
return Pair.create(Collections.emptySet(), Collections.<TextWithImports>emptySet());
return Pair.create(Collections.emptySet(), Collections.emptySet());
}
private static TextRange calculateLimitRange(final PsiFile file, final Document doc, final int line) {
@@ -52,7 +52,7 @@ public class JavadocHelper {
private static final String PARAM_TEXT = "param";
private static final Pair<JavadocParameterInfo, List<JavadocParameterInfo>> EMPTY
= new Pair<>(null, Collections.<JavadocParameterInfo>emptyList());
= new Pair<>(null, Collections.emptyList());
private static final JavadocHelper INSTANCE = new JavadocHelper();
@NotNull
@@ -34,7 +34,7 @@ import java.util.List;
* @author nik
*/
public class JpsBuilderArtifactServiceImpl extends JpsBuilderArtifactService {
private static final JpsElementCollectionRole<JpsArtifact> SYNTHETIC_ARTIFACTS = JpsElementCollectionRole.create(JpsElementChildRoleBase.<JpsArtifact>create("synthetic artifact"));
private static final JpsElementCollectionRole<JpsArtifact> SYNTHETIC_ARTIFACTS = JpsElementCollectionRole.create(JpsElementChildRoleBase.create("synthetic artifact"));
@Override
public Collection<JpsArtifact> getArtifacts(JpsModel model, boolean includeSynthetic) {
@@ -29,7 +29,7 @@ import java.util.List;
*/
public abstract class JpsCompositePackagingElementBase<Self extends JpsCompositePackagingElementBase<Self>> extends JpsCompositeElementBase<Self>
implements JpsCompositePackagingElement {
private static final JpsElementCollectionRole<JpsPackagingElement> CHILDREN_ROLE = JpsElementCollectionRole.create(JpsElementChildRoleBase.<JpsPackagingElement>create("child"));
private static final JpsElementCollectionRole<JpsPackagingElement> CHILDREN_ROLE = JpsElementCollectionRole.create(JpsElementChildRoleBase.create("child"));
protected JpsCompositePackagingElementBase() {
myContainer.setChild(CHILDREN_ROLE);
@@ -44,8 +44,8 @@ import java.util.List;
*/
public class JpsProjectImpl extends JpsRootElementBase<JpsProjectImpl> implements JpsProject {
private static final JpsElementCollectionRole<JpsElementReference<?>> EXTERNAL_REFERENCES_COLLECTION_ROLE =
JpsElementCollectionRole.create(JpsElementChildRoleBase.<JpsElementReference<?>>create("external reference"));
private static final JpsElementCollectionRole<JpsRunConfiguration> RUN_CONFIGURATIONS_ROLE = JpsElementCollectionRole.create(JpsElementChildRoleBase.<JpsRunConfiguration>create("run configuration"));
JpsElementCollectionRole.create(JpsElementChildRoleBase.create("external reference"));
private static final JpsElementCollectionRole<JpsRunConfiguration> RUN_CONFIGURATIONS_ROLE = JpsElementCollectionRole.create(JpsElementChildRoleBase.create("run configuration"));
private final JpsLibraryCollection myLibraryCollection;
private String myName = "";
@@ -16,8 +16,8 @@
package org.jetbrains.jps.model.module.impl;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.ex.JpsElementChildRoleBase;
import org.jetbrains.jps.model.ex.JpsCompositeElementBase;
import org.jetbrains.jps.model.ex.JpsElementChildRoleBase;
import org.jetbrains.jps.model.ex.JpsElementCollectionRole;
import org.jetbrains.jps.model.library.JpsLibrary;
import org.jetbrains.jps.model.library.JpsLibraryReference;
@@ -31,7 +31,7 @@ import java.util.List;
*/
public class JpsDependenciesListImpl extends JpsCompositeElementBase<JpsDependenciesListImpl> implements JpsDependenciesList {
public static final JpsElementCollectionRole<JpsDependencyElement> DEPENDENCY_COLLECTION_ROLE =
JpsElementCollectionRole.create(JpsElementChildRoleBase.<JpsDependencyElement>create("dependency"));
JpsElementCollectionRole.create(JpsElementChildRoleBase.create("dependency"));
public JpsDependenciesListImpl() {
super();
@@ -36,7 +36,7 @@ import java.util.Collections;
public abstract class AbstractProjectDataService<E, I> implements ProjectDataService<E, I> {
public final Computable.PredefinedValueComputable<Collection<I>> EMPTY_LIST =
new Computable.PredefinedValueComputable<>(Collections.<I>emptyList());
new Computable.PredefinedValueComputable<>(Collections.emptyList());
@NotNull
@Override
@@ -82,7 +82,7 @@ public abstract class SettingsConnectionService {
LOG.info(e);
}
return settings;
}, Collections.<String, String>emptyMap(), LOG);
}, Collections.emptyMap(), LOG);
}
@Nullable
@@ -132,7 +132,7 @@ public class TextWithMarkupProcessor extends CopyPastePostProcessor<RawTextWithM
logSyntaxInfo(syntaxInfo);
createResult(syntaxInfo, editor);
return ObjectUtils.notNull(myResult, Collections.<RawTextWithMarkup>emptyList());
return ObjectUtils.notNull(myResult, Collections.emptyList());
}
catch (Throwable t) {
// catching the exception so that the rest of copy/paste functionality can still work fine
@@ -159,7 +159,7 @@ public class SliceLeafAnalyzer {
public Map<SliceNode, Collection<PsiElement>> createMap() {
return ConcurrentFactoryMap.createMap(k -> ConcurrentCollectionFactory.createConcurrentSet(myLeafEquality),
() -> ConcurrentCollectionFactory.createMap(ContainerUtil.<SliceNode>identityStrategy()));
() -> ConcurrentCollectionFactory.createMap(ContainerUtil.identityStrategy()));
}
static class SliceNodeGuide implements WalkingState.TreeGuide<SliceNode> {
@@ -50,7 +50,7 @@ public abstract class Revision {
}
public Pair<List<String>, Integer> getAffectedFileNames() {
return Pair.create(Collections.<String>emptyList(), 0);
return Pair.create(Collections.emptyList(), 0);
}
public abstract Entry findEntry();
@@ -94,7 +94,7 @@ public abstract class CollectionModelEditor<T, E extends CollectionItemEditor<T>
}
protected class ModelHelper {
final OrderedSet<T> originalItems = new OrderedSet<>(ContainerUtil.<T>identityStrategy());
final OrderedSet<T> originalItems = new OrderedSet<>(ContainerUtil.identityStrategy());
private final THashMap<T, T> modifiedToOriginal = ContainerUtil.newIdentityTroveMap();
private final THashMap<T, T> originalToModified = ContainerUtil.newIdentityTroveMap();
@@ -413,7 +413,7 @@ public class VcsLogRefresherImpl implements VcsLogRefresher, Disposable {
@NotNull
Map<VirtualFile, VcsLogProvider.Requirements> asMap(@NotNull Collection<VirtualFile> roots) {
return ContainerUtil
.map2Map(roots, root -> Pair.<VirtualFile, VcsLogProvider.Requirements>create(root, this));
.map2Map(roots, root -> Pair.create(root, this));
}
}
@@ -121,7 +121,7 @@ public class CommittedListsSequencesZipperTest {
group.add(location);
}
return Pair.create(Collections.singletonList(group), Collections.<RepositoryLocation>emptyList());
return Pair.create(Collections.singletonList(group), Collections.emptyList());
}
@Override
@@ -54,11 +54,11 @@ public class GitOutgoingChangesProvider implements VcsOutgoingChangesProvider<Co
LOG.debug("getOutgoingChanges root: " + vcsRoot.getPath());
final GitBranchesSearcher searcher = new GitBranchesSearcher(myProject, vcsRoot, findRemote);
if (searcher.getLocal() == null || searcher.getRemote() == null) {
return new Pair<>(null, Collections.<CommittedChangeList>emptyList());
return new Pair<>(null, Collections.emptyList());
}
final GitRevisionNumber base = getMergeBase(myProject, vcsRoot, searcher.getLocal(), searcher.getRemote());
if (base == null) {
return new Pair<>(null, Collections.<CommittedChangeList>emptyList());
return new Pair<>(null, Collections.emptyList());
}
final List<GitCommittedChangeList> lists = GitUtil.getLocalCommittedChanges(myProject, vcsRoot,
handler -> handler.addParameters(base.asString() + "..HEAD"));
@@ -66,7 +66,7 @@ public class GitCommitCompareInfo {
Pair<List<GitCommit>, List<GitCommit>> pair = myInfo.get(repo);
if (pair == null) {
LOG.error("Compare info not found for repository " + repo);
return Pair.create(Collections.<GitCommit>emptyList(), Collections.<GitCommit>emptyList());
return Pair.create(Collections.emptyList(), Collections.emptyList());
}
return pair;
}
@@ -50,7 +50,7 @@ public class GriffonDefaultImportContributor implements GrImportContributor {
}
}
return Result.create(Couple.<List<String>>of(new ArrayList<>(), new ArrayList<>()),
return Result.create(Couple.of(new ArrayList<>(), new ArrayList<>()),
PsiModificationTracker.MODIFICATION_COUNT);
}
@@ -121,7 +121,7 @@ public class MethodOrClosureScopeChooser {
panel.add(scrollPane, BorderLayout.CENTER);
final List<Pair<ActionListener, KeyStroke>> keyboardActions = Collections.singletonList(
Pair.<ActionListener, KeyStroke>create(new ActionListener() {
Pair.create(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
final GrParametersOwner ToSearchIn = (GrParametersOwner)list.getSelectedValue();
@@ -62,7 +62,7 @@ public class InlinePropertyHandler extends JavaInlineActionHandler {
final String propertyValue = property.getValue();
if (propertyValue == null) return;
final List<PsiElement> occurrences = Collections.synchronizedList(ContainerUtil.<PsiElement>newArrayList());
final List<PsiElement> occurrences = Collections.synchronizedList(ContainerUtil.newArrayList());
final Collection<PsiFile> containingFiles = Collections.synchronizedSet(new HashSet<PsiFile>());
containingFiles.add(psiElement.getContainingFile());
boolean result = ReferencesSearch.search(psiElement).forEach(
@@ -86,7 +86,7 @@ public class PyDebugProcess extends XDebugProcess implements IPyDebugProcess, Pr
private final Map<String, XBreakpoint<? extends ExceptionBreakpointProperties>> myRegisteredExceptionBreakpoints =
new ConcurrentHashMap<>();
private final List<PyThreadInfo> mySuspendedThreads = Collections.synchronizedList(Lists.<PyThreadInfo>newArrayList());
private final List<PyThreadInfo> mySuspendedThreads = Collections.synchronizedList(Lists.newArrayList());
private final Map<String, XValueChildrenList> myStackFrameCache = Maps.newConcurrentMap();
private final Object myFrameCacheObject = new Object();
private final Map<String, PyDebugValue> myNewVariableValue = Maps.newHashMap();