fix compliation idea/163.1752
authorVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Thu, 21 Jul 2016 08:34:00 +0000 (10:34 +0200)
committerVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Thu, 21 Jul 2016 08:34:00 +0000 (10:34 +0200)
platform/analysis-impl/src/com/intellij/codeInspection/ex/InspectionProfileImpl.java
platform/lang-impl/src/com/intellij/codeInspection/ex/ApplicationInspectionProfileManager.java
platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleSchemeImpl.java
platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleSchemesImpl.java

index df53df032e8aebff18570f83fc744ab8fcdf420d..02b77c327c3ad26a227f74e778d1a888dc934a2a 100644 (file)
@@ -88,7 +88,7 @@ public class InspectionProfileImpl extends ProfileEx implements ModifiableModel,
 
   private final Object myLock = new Object();
 
-  private SchemeDataHolder<InspectionProfileImpl> myDataHolder;
+  private SchemeDataHolder<? super InspectionProfileImpl> myDataHolder;
 
   InspectionProfileImpl(@NotNull InspectionProfileImpl inspectionProfile) {
     this(inspectionProfile.getName(), inspectionProfile.myRegistrar, inspectionProfile.getProfileManager(), inspectionProfile.myBaseProfile, null);
@@ -114,7 +114,7 @@ public class InspectionProfileImpl extends ProfileEx implements ModifiableModel,
                                @NotNull InspectionToolRegistrar registrar,
                                @NotNull ProfileManager profileManager,
                                @Nullable InspectionProfileImpl baseProfile,
-                               @Nullable SchemeDataHolder<InspectionProfileImpl> dataHolder) {
+                               @Nullable SchemeDataHolder<? super InspectionProfileImpl> dataHolder) {
     super(profileName);
 
     myRegistrar = registrar;
@@ -534,7 +534,7 @@ public class InspectionProfileImpl extends ProfileEx implements ModifiableModel,
   }
 
   private void initialize(@Nullable Project project) {
-    SchemeDataHolder<InspectionProfileImpl> dataHolder = myDataHolder;
+    SchemeDataHolder<? super InspectionProfileImpl> dataHolder = myDataHolder;
     if (dataHolder != null) {
       myDataHolder = null;
       Element element = dataHolder.read();
index 38c2cf01bff4facb7464b15e8c850362f28db2ef..7c7eb8764ffdc1c1462c213ec1b96cd3e41ed1da 100644 (file)
@@ -94,7 +94,7 @@ public class ApplicationInspectionProfileManager extends BaseInspectionProfileMa
       }
 
       @NotNull
-      public InspectionProfileImpl createScheme(@NotNull SchemeDataHolder<InspectionProfileImpl> dataHolder,
+      public InspectionProfileImpl createScheme(@NotNull SchemeDataHolder<? super InspectionProfileImpl> dataHolder,
                                                 @NotNull String name,
                                                 @NotNull Function<String, String> attributeProvider,
                                                 boolean duringLoad) {
index 0a043f01925a5442570bfb102493502eb3db039f..72d8ac06e98d7b8dde6799a14f52ec652e0a3304 100644 (file)
@@ -32,12 +32,12 @@ public class CodeStyleSchemeImpl implements CodeStyleScheme, ExternalizableSchem
 
   private static final Logger LOG = Logger.getInstance(CodeStyleSchemeImpl.class);
 
-  private SchemeDataHolder<CodeStyleSchemeImpl> myDataHolder;
+  private SchemeDataHolder<? super CodeStyleSchemeImpl> myDataHolder;
   private String myParentSchemeName;
   private final boolean myIsDefault;
   private volatile CodeStyleSettings myCodeStyleSettings;
 
-  CodeStyleSchemeImpl(@NotNull String name, String parentSchemeName, @NotNull SchemeDataHolder<CodeStyleSchemeImpl> dataHolder) {
+  CodeStyleSchemeImpl(@NotNull String name, String parentSchemeName, @NotNull SchemeDataHolder<? super CodeStyleSchemeImpl> dataHolder) {
     setName(name);
     myDataHolder = dataHolder;
     myIsDefault = false;
@@ -85,7 +85,7 @@ public class CodeStyleSchemeImpl implements CodeStyleScheme, ExternalizableSchem
 
   @Override
   public CodeStyleSettings getCodeStyleSettings() {
-    SchemeDataHolder<CodeStyleSchemeImpl> dataHolder = myDataHolder;
+    SchemeDataHolder<? super CodeStyleSchemeImpl> dataHolder = myDataHolder;
     if (dataHolder != null) {
       myDataHolder = null;
       init(myParentSchemeName == null ? null : CodeStyleSchemesImpl.getSchemeManager().findSchemeByName(myParentSchemeName), dataHolder.read());
index 6a0039d31ac19ad8cf7bb1513d5bb8e5305ce059..61dc143d5c433cdca8b6bc47ba4b7dc29e6a1a7a 100644 (file)
@@ -40,7 +40,7 @@ public abstract class CodeStyleSchemesImpl extends CodeStyleSchemes {
     mySchemeManager = schemeManagerFactory.create(CODE_STYLES_DIR_PATH, new LazySchemeProcessor<CodeStyleScheme, CodeStyleSchemeImpl>() {
       @NotNull
       @Override
-      public CodeStyleSchemeImpl createScheme(@NotNull SchemeDataHolder<CodeStyleSchemeImpl> dataHolder, @NotNull String name, @NotNull Function<String, String> attributeProvider, boolean duringLoad) {
+      public CodeStyleSchemeImpl createScheme(@NotNull SchemeDataHolder<? super CodeStyleSchemeImpl> dataHolder, @NotNull String name, @NotNull Function<String, String> attributeProvider, boolean duringLoad) {
         return new CodeStyleSchemeImpl(attributeProvider.apply("name"), attributeProvider.apply("parent"), dataHolder);
       }