mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 03:07:47 +07:00
quick fix for MagicConstantInspection which suggests to replace 1 with Font.BOLD
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// "Replace with 'FontType.PLAIN'" "true"
|
||||
import org.intellij.lang.annotations.MagicConstant;
|
||||
|
||||
class D {
|
||||
static class FontType {
|
||||
public static final int PLAIN = 0;
|
||||
public static final int BOLD = 1;
|
||||
public static final int ITALIC = 2;
|
||||
}
|
||||
void font(@MagicConstant(flags = {FontType.PLAIN, FontType.BOLD, FontType.ITALIC}) int x) {
|
||||
// 0 is not allowed despite the fact that it's flags parameter
|
||||
font(<caret>0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user