mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[jps] excludes module-info classes from instrumentation
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -115,7 +115,7 @@ public class ClassFilesIndicesBuilder extends BaseInstrumentingBuilder {
|
||||
|
||||
@Override
|
||||
protected boolean canInstrument(final CompiledClass compiledClass, final int classFileVersion) {
|
||||
return true;
|
||||
return !"module-info".equals(compiledClass.getClassName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -69,7 +69,7 @@ public class NotNullInstrumentingBuilder extends BaseInstrumentingBuilder{
|
||||
|
||||
@Override
|
||||
protected boolean canInstrument(CompiledClass compiledClass, int classFileVersion) {
|
||||
return classFileVersion >= Opcodes.V1_5;
|
||||
return classFileVersion >= Opcodes.V1_5 && !"module-info".equals(compiledClass.getClassName());
|
||||
}
|
||||
|
||||
// todo: probably instrument other NotNull-like annotations defined in project settings?
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -53,7 +53,7 @@ public class PatternValidatorBuilder extends BaseInstrumentingBuilder{
|
||||
|
||||
@Override
|
||||
protected boolean canInstrument(CompiledClass compiledClass, int classFileVersion) {
|
||||
return true;
|
||||
return !"module-info".equals(compiledClass.getClassName());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user