mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
removed redundant suppressions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 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.
|
||||
@@ -82,13 +82,12 @@ public class Extensions {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@SuppressWarnings({"unchecked"})
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T[] getExtensions(@NotNull ExtensionPointName<T> extensionPointName) {
|
||||
return (T[])getExtensions(extensionPointName.getName(), null);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@SuppressWarnings({"unchecked"})
|
||||
public static <T> T[] getExtensions(@NotNull ExtensionPointName<T> extensionPointName, AreaInstance areaInstance) {
|
||||
// keep it until 1.7 JDK
|
||||
return Extensions.<T>getExtensions(extensionPointName.getName(), areaInstance);
|
||||
@@ -151,7 +150,7 @@ public class Extensions {
|
||||
// allow duplicate area class registrations if they are the same - fixing duplicate registration in tests is much more trouble
|
||||
AreaClassConfiguration configuration = ourAreaClass2Configuration.get(areaClass);
|
||||
if (!equals(configuration.getParentClassName(), parentAreaClass)) {
|
||||
throw new RuntimeException("Area class already registered: " + areaClass + ", "+ ourAreaClass2Configuration.get(areaClass));
|
||||
throw new RuntimeException("Area class already registered: " + areaClass + ", "+ configuration);
|
||||
}
|
||||
else {
|
||||
return;
|
||||
@@ -190,7 +189,7 @@ public class Extensions {
|
||||
private final String myClassName;
|
||||
private final String myParentClassName;
|
||||
|
||||
AreaClassConfiguration(@NotNull String className, String parentClassName) {
|
||||
private AreaClassConfiguration(@NotNull String className, String parentClassName) {
|
||||
myClassName = className;
|
||||
myParentClassName = parentClassName;
|
||||
}
|
||||
@@ -203,6 +202,11 @@ public class Extensions {
|
||||
public String getParentClassName() {
|
||||
return myParentClassName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AreaClassConfiguration{myClassName='" + myClassName + '\'' + ", myParentClassName='" + myParentClassName + "'}";
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("CallToPrintStackTrace")
|
||||
|
||||
+1
-5
@@ -204,7 +204,6 @@ public class ExtensionsAreaImpl implements ExtensionsArea {
|
||||
|
||||
getExtensionPoint(EPAvailabilityListenerExtension.EXTENSION_POINT_NAME).addExtensionPointListener(new ExtensionPointListener() {
|
||||
@Override
|
||||
@SuppressWarnings({"unchecked"})
|
||||
public void extensionRemoved(@NotNull Object extension, final PluginDescriptor pluginDescriptor) {
|
||||
EPAvailabilityListenerExtension epListenerExtension = (EPAvailabilityListenerExtension) extension;
|
||||
Collection<ExtensionPointAvailabilityListener> listeners = myAvailabilityListeners.get(epListenerExtension.getExtensionPointName());
|
||||
@@ -296,7 +295,6 @@ public class ExtensionsAreaImpl implements ExtensionsArea {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked"})
|
||||
private void notifyEPRegistered(final ExtensionPoint extensionPoint) {
|
||||
Collection<ExtensionPointAvailabilityListener> listeners = myAvailabilityListeners.get(extensionPoint.getName());
|
||||
for (final ExtensionPointAvailabilityListener listener : listeners) {
|
||||
@@ -335,7 +333,6 @@ public class ExtensionsAreaImpl implements ExtensionsArea {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
@SuppressWarnings({"unchecked"})
|
||||
public <T> ExtensionPoint<T> getExtensionPoint(@NotNull ExtensionPointName<T> extensionPointName) {
|
||||
return getExtensionPoint(extensionPointName.getName());
|
||||
}
|
||||
@@ -356,8 +353,7 @@ public class ExtensionsAreaImpl implements ExtensionsArea {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked"})
|
||||
private void notifyEPRemoved(final ExtensionPoint extensionPoint) {
|
||||
private void notifyEPRemoved(@NotNull ExtensionPoint extensionPoint) {
|
||||
Collection<ExtensionPointAvailabilityListener> listeners = myAvailabilityListeners.get(extensionPoint.getName());
|
||||
for (final ExtensionPointAvailabilityListener listener : listeners) {
|
||||
notifyUnavailableListener(extensionPoint, listener);
|
||||
|
||||
@@ -106,7 +106,6 @@ class FindInProjectTask {
|
||||
final String filter = findModel.getFileFilter();
|
||||
final Pattern pattern = FindInProjectUtil.createFileMaskRegExp(filter);
|
||||
|
||||
//noinspection unchecked
|
||||
myFileMask = pattern == null ? Conditions.<VirtualFile>alwaysTrue() : new Condition<VirtualFile>() {
|
||||
@Override
|
||||
public boolean value(VirtualFile file) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 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.
|
||||
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.NonNls;
|
||||
*
|
||||
* @deprecated {@link DataKeys} and {@link DataKey#getData} should be used instead
|
||||
*/
|
||||
@SuppressWarnings({"HardCodedStringLiteral", "JavadocReference", "UnusedDeclaration"})
|
||||
@SuppressWarnings({"HardCodedStringLiteral", "JavadocReference"})
|
||||
public interface DataConstants {
|
||||
/**
|
||||
* Returns {@link com.intellij.openapi.project.Project}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 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.
|
||||
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.NonNls;
|
||||
* {@link com.intellij.openapi.actionSystem.DataProvider#getData(String)}.
|
||||
* @deprecated {@link DataKeys} and {@link com.intellij.openapi.actionSystem.DataKey#getData} should be used instead
|
||||
*/
|
||||
@SuppressWarnings({"HardCodedStringLiteral", "JavadocReference", "UnusedDeclaration"})
|
||||
@SuppressWarnings({"HardCodedStringLiteral", "JavadocReference"})
|
||||
public interface DataConstantsEx {
|
||||
/**
|
||||
* Returns {@link com.intellij.psi.PsiElement}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 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.
|
||||
@@ -116,7 +116,6 @@ public class ConfigurableEP<T extends UnnamedConfigurable> extends AbstractExten
|
||||
private PicoContainer myPicoContainer;
|
||||
private Project myProject;
|
||||
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
public ConfigurableEP() {
|
||||
this(ApplicationManager.getApplication().getPicoContainer(), null);
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ import java.util.Set;
|
||||
* <p/>
|
||||
* See also http://confluence.jetbrains.net/display/IDEADEV/IntelliJ+IDEA+DialogWrapper.
|
||||
*/
|
||||
@SuppressWarnings({"SSBasedInspection", "MethodMayBeStatic", "UnusedDeclaration"})
|
||||
@SuppressWarnings({"SSBasedInspection", "MethodMayBeStatic"})
|
||||
public abstract class DialogWrapper {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.ui.DialogWrapper");
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 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.
|
||||
@@ -228,7 +228,6 @@ public final class EditorUtil {
|
||||
* long document lines - {@link Editor#logicalPositionToOffset(LogicalPosition)}
|
||||
* should be faster when soft wraps are enabled. To be removed in IDEA 16.
|
||||
*/
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
public static int calcOffset(@NotNull EditorEx editor,
|
||||
@NotNull CharSequence text,
|
||||
int start,
|
||||
|
||||
+1
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 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.
|
||||
@@ -42,8 +42,6 @@ public class ModuleFixtureImpl extends BaseFixture implements ModuleFixture {
|
||||
}
|
||||
}.execute().throwException();
|
||||
|
||||
|
||||
//disposeOnTearDown(myModule);
|
||||
return myModule;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 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.
|
||||
@@ -28,7 +28,6 @@ import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings({"SSBasedInspection"})
|
||||
public class Disposer {
|
||||
private static final ObjectTree<Disposable> ourTree;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 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.
|
||||
@@ -62,7 +62,6 @@ public class ExceptionUtil {
|
||||
@NotNull
|
||||
public static String getThrowableText(@NotNull Throwable aThrowable) {
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
@SuppressWarnings("IOResourceOpenedButNotSafelyClosed")
|
||||
PrintWriter writer = new PrintWriter(stringWriter);
|
||||
aThrowable.printStackTrace(writer);
|
||||
return stringWriter.getBuffer().toString();
|
||||
@@ -76,9 +75,8 @@ public class ExceptionUtil {
|
||||
final String skipPattern = prefix + stackFrameSkipPattern;
|
||||
|
||||
final StringWriter stringWriter = new StringWriter();
|
||||
@SuppressWarnings("IOResourceOpenedButNotSafelyClosed")
|
||||
final PrintWriter writer = new PrintWriter(stringWriter) {
|
||||
boolean skipping = false;
|
||||
private boolean skipping;
|
||||
@Override
|
||||
public void println(final String x) {
|
||||
boolean curSkipping = skipping;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 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.
|
||||
@@ -35,7 +35,6 @@ import java.util.*;
|
||||
* (Note that it is not advisable to use COWAL in high write-contention code anyway, consider using {@link java.util.concurrent.ConcurrentHashMap}) instead)
|
||||
*/
|
||||
class LockFreeCopyOnWriteArrayList<E> implements List<E>, RandomAccess, ConcurrentList<E> {
|
||||
@SuppressWarnings("FieldMayBeFinal")
|
||||
@NotNull private volatile Object[] array;
|
||||
|
||||
LockFreeCopyOnWriteArrayList() {
|
||||
|
||||
Reference in New Issue
Block a user