mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Test-case for IDEA-127764 MagicConstantInspection uses wrong annotation
Actually fixed as part of IDEA-144891 (IDEA-CR-33807)
This commit is contained in:
@@ -50,4 +50,14 @@ public class SpecialCases {
|
||||
if(instance.get(Calendar.AM_PM) == <warning descr="Should be one of: Calendar.AM, Calendar.PM">MONDAY</warning>) {}
|
||||
if(instance.get(Calendar.DATE) == 1) {}
|
||||
}
|
||||
|
||||
public void test(Calendar cal) {
|
||||
// IDEA-127764
|
||||
if (cal.get(Calendar.DAY_OF_WEEK) != cal.getFirstDayOfWeek()) {
|
||||
}
|
||||
if (<warning descr="Should be one of: Calendar.SUNDAY, Calendar.MONDAY, Calendar.TUESDAY, Calendar.WEDNESDAY, Calendar.THURSDAY, ...">cal.get(Calendar.MONTH)</warning> != <warning descr="Should be one of: Calendar.JANUARY, Calendar.FEBRUARY, Calendar.MARCH, Calendar.APRIL, Calendar.MAY, ...">cal.getFirstDayOfWeek()</warning>) {
|
||||
}
|
||||
if (<warning descr="Should be one of: Calendar.SUNDAY, Calendar.MONDAY, Calendar.TUESDAY, Calendar.WEDNESDAY, Calendar.THURSDAY, ...">cal.get(Calendar.YEAR)</warning> != cal.getFirstDayOfWeek()) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user