mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
avoid casting to specific class
GitOrigin-RevId: ad7af09e091927895ea9fe06193332580732277d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
351ee756e6
commit
82fd568e26
+8
@@ -36,7 +36,15 @@ public class NotNullVerifyingInstrumenter extends ClassVisitor implements Opcode
|
||||
myAuxGenerator = new AuxiliaryMethodGenerator(reader);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link NotNullVerifyingInstrumenter#processClassFile(ClassReader, ClassVisitor, String[])} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean processClassFile(FailSafeClassReader reader, ClassVisitor writer, String[] notNullAnnotations) {
|
||||
return processClassFile((ClassReader)reader, writer, notNullAnnotations);
|
||||
}
|
||||
|
||||
public static boolean processClassFile(ClassReader reader, ClassVisitor writer, String[] notNullAnnotations) {
|
||||
NotNullVerifyingInstrumenter instrumenter = new NotNullVerifyingInstrumenter(writer, reader, notNullAnnotations);
|
||||
reader.accept(instrumenter, 0);
|
||||
return instrumenter.myIsModification;
|
||||
|
||||
+1
-2
@@ -1,7 +1,6 @@
|
||||
// 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 org.jetbrains.jps.incremental.instrumentation;
|
||||
|
||||
import com.intellij.compiler.instrumentation.FailSafeClassReader;
|
||||
import com.intellij.compiler.instrumentation.InstrumentationClassFinder;
|
||||
import com.intellij.compiler.notNullVerification.NotNullVerifyingInstrumenter;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
@@ -67,7 +66,7 @@ public class NotNullInstrumentingBuilder extends BaseInstrumentingBuilder{
|
||||
try {
|
||||
final ProjectDescriptor pd = context.getProjectDescriptor();
|
||||
final List<String> notNulls = JpsJavaExtensionService.getInstance().getCompilerConfiguration(pd.getProject()).getNotNullAnnotations();
|
||||
if (NotNullVerifyingInstrumenter.processClassFile((FailSafeClassReader)reader, writer, ArrayUtilRt.toStringArray(notNulls))) {
|
||||
if (NotNullVerifyingInstrumenter.processClassFile(reader, writer, ArrayUtilRt.toStringArray(notNulls))) {
|
||||
return new BinaryContent(writer.toByteArray());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user