Commit Graph
235 Commits
Author SHA1 Message Date
Mikhail Pyltsinandintellij-monorepo-bot 8245e0962e [java-inspections] IDEA-380532 IJ-CR-181243 Jspecify. False positive. Warning about a wildcard, extending Object
- make it more precise. Only for non-unknown places


(cherry picked from commit 830a59453f7f4264c0d530e816d5360e99ac5e52)

IJ-CR-181243

GitOrigin-RevId: 9e74e8aa4bf4d37046e1af86607abdd863d8e8f0
2025-11-05 21:45:41 +00:00
Mikhail Pyltsinandintellij-monorepo-bot 01ee480d20 [java-inspections] IDEA-380532 Jspecify. False positive. Warning about a wildcard, extending Object
(cherry picked from commit 7f71feb61e8c2310e5342b6cfd5949ec4b1fe014)

IJ-CR-181243

GitOrigin-RevId: 730fa2e93e01abbdd19b399c526fec0d76220f7c
2025-11-05 21:45:41 +00:00
Bartek Paciaandintellij-monorepo-bot 539f7567fb [java-inspections] IDEA-379752 fix "missing '@deprecated' Javadoc tag explanation" throwing with Markdown Javadoc
GitOrigin-RevId: 0741065a739e8b7ea34a710a2038d762fdcbb5a3
2025-10-09 10:35:20 +00:00
Tagir Valeevandintellij-monorepo-bot 86d095cd79 [java-inspections] IDEA-380307 "Fix all 'Code block contains single statement' problems in file" changes semantics
GitOrigin-RevId: 24a924d763405960425c35436372f57ab64a70e9
2025-10-08 09:44:11 +00:00
Mikhail Pyltsinandintellij-monorepo-bot 5219102458 [java-inspection] IJ-CR-177592 IDEA-375813 It seems dataflow join works wrong for branching with division by zero
- fix naming

GitOrigin-RevId: 66fb80af4c9c5e69285eb62845265cc06f9718be
2025-10-07 19:42:03 +00:00
Bas Leijdekkersandintellij-monorepo-bot 8f6afc90fe Java: don't make loop variables final when splitting multiple declarations (IDEA-380295)
GitOrigin-RevId: 0d83b9f64eda019c7d0b2b75fd1221fe41a83877
2025-10-07 18:33:10 +00:00
Bas Leijdekkersandintellij-monorepo-bot cd8ada5c65 Java: add synthetic default constructor on resolve (IDEA-376799)
GitOrigin-RevId: 71d783efd5095b0995ac1788863c8a50de759f77
2025-10-07 18:33:10 +00:00
Mikhail Pyltsinandintellij-monorepo-bot e8b76edbf2 [java-inspection] IDEA-375813 It seems dataflow join works wrong for branching with division by zero
GitOrigin-RevId: c14db3aee067692092d2a96292082d81756c21a5
2025-10-03 15:46:22 +00:00
Bas Leijdekkersandintellij-monorepo-bot ee40c49e16 Java: improve inspection message
GitOrigin-RevId: 8691cc97b15d1a8bd2bfd6ec73ebe2ddafe27bac
2025-09-25 18:47:50 +00:00
Bas Leijdekkersandintellij-monorepo-bot 31f8aa8bef Java: don't report unnamed lambda parameter naming convention issues (IDEA-378952)
GitOrigin-RevId: 56436c8ad6d7a0417c6f0c9b7cece653cc5b399d
2025-09-08 19:06:14 +00:00
Bas Leijdekkersandintellij-monorepo-bot 70e0e8a22b Java: don't report unnamed local variable naming convention issues (IDEA-378952)
GitOrigin-RevId: 7ecd777f5ae442c329155555d5ca6d5d4ffd080a
2025-09-08 19:06:14 +00:00
Marcin Mikosikandintellij-monorepo-bot dc005115cd [java] IDEA-376793 Fix 'Duplicate class' error check to highlight each duplicate class exactly once
Merge-request: IJ-MR-171426
Merged-by: Marcin Mikosik <marcin.mikosik@jetbrains.com>

GitOrigin-RevId: 882e7e6b7ee66083be0376bbc84b23bd60903977
2025-08-19 09:20:45 +00:00
Bas Leijdekkersandintellij-monorepo-bot 77536725b9 Java: fix PsiClass.getScope() method which was broken by the migration to the new stubs api (IDEA-376896)
GitOrigin-RevId: e204142d2cd57a6cdb83285064ec21fe15b8270b
2025-08-11 19:24:55 +00:00
Bas Leijdekkersandintellij-monorepo-bot 1030e9fc1f Java: better file name for test data
GitOrigin-RevId: de01a8464ce5e7ef7ed29c3071349b97e8b25abf
2025-08-11 19:24:55 +00:00
Bas Leijdekkersandintellij-monorepo-bot 1250b4612c Java: report "Static initializer references subclass" when subclass is private but indirect (IDEA-348744)
GitOrigin-RevId: ffc256b9afdcb4cd1ea073263e55188ad02b5636
2025-08-11 19:24:55 +00:00
Bart van Helvertandintellij-monorepo-bot 11a35fb07e [java] Preserve comments in convert to varargs method fix
#IDEA-376822 Fixed

GitOrigin-RevId: 9e1340bd15e54e3a2f3fda1017ce11aa2433cba2
2025-08-04 23:00:44 +00:00
Tagir Valeevandintellij-monorepo-bot dcee4fbc13 [java-inspections] IDEA-376166 return null inspection should consider contract as well as @Nullable
GitOrigin-RevId: 2fb103a97887bd068454702b520f86e83aa38a36
2025-07-21 12:07:39 +00:00
Bas Leijdekkersandintellij-monorepo-bot 546defb6f8 Java: inner class accessing local variable or parameter can't be static (IDEA-375602)
GitOrigin-RevId: 1b16d1388c09d51009b288ede89e73d156364619
2025-07-09 00:31:24 +00:00
Bas Leijdekkersandintellij-monorepo-bot e77f70c723 Java: handle whitespace in {@link} doc tags better (IDEA-375317)
for "Javadoc comment can be Markdown documentation comment" inspection quick-fix

GitOrigin-RevId: 8030c1a98e1bf34392751021026b362107c69fdf
2025-07-09 00:31:23 +00:00
Mikhail Pyltsinandintellij-monorepo-bot 09d46b2382 [java] IDEA-371865 Inspection to convert 'System.out'<->'IO'
- fixes for comments
- simplified replacement
- support char[]
- support ImplicitArrayToStringInspection

GitOrigin-RevId: 49f9f829821a498259aa53ebb12cd0b0007f1238
2025-07-04 17:57:16 +00:00
Bas Leijdekkersandintellij-monorepo-bot bb71ba1c2a Java: fix exception on incomplete code (IDEA-375071)
in "Unnecessary local variable" inspection

GitOrigin-RevId: 3c0cf1abec084a91727e23ec19bb1acf815de9db
2025-06-30 18:41:25 +00:00
Mikhail Pyltsinandintellij-monorepo-bot 128454480a [java-highlighting] WIP IDEA-372969 Support JEP 512: Compact Source Files and Instance Main Methods
- update language levels partially
- fix tests

GitOrigin-RevId: 8d7b599772eda8dfd999bee9f816ec2609be4adb
2025-06-24 23:04:26 +00:00
Bas Leijdekkersandintellij-monorepo-bot 2c328aeecd Java: fix converting {@link} to type members (IDEA-360937)
GitOrigin-RevId: 455441a23f74c67676817dfc4549e34804718c89
2025-06-24 17:51:53 +00:00
Bart van Helvertandintellij-monorepo-bot 59681067ad [java] Don't report UnnecessaryLocalVariable warning on unused local variables
#IDEA-374767 Fixed

GitOrigin-RevId: a11f0777dfe20e7b31de9c5396c0080fc27562eb
2025-06-24 09:03:21 +00:00
Tagir Valeevandintellij-monorepo-bot e76c456f64 [java-refactoring] InlineLocalHandler: fixes after review of IDEA-371649
1. Exclude an option to rename the original variable if the type differs
2. Rename actions

GitOrigin-RevId: 2fd3bb261163cbd5b0d4af0f986e27250abb0956
2025-06-23 13:02:39 +00:00
Tagir Valeevandintellij-monorepo-bot 05e9197580 [java-intentions] PsiElementFactoryImpl.createVariableDeclarationStatement: use 'var' if non-denotable type is requested
Fixes IDEA-374601 Copy 'x' to effectively final variable breaks code when type is non-denotable

GitOrigin-RevId: 3b2d15f24b182ac3948ae3b5066c5e68c1c0bf5c
2025-06-17 18:17:52 +00:00
Bas Leijdekkersandintellij-monorepo-bot f48cea56e1 Java: avoid false positive in broken code with cyclic inheritance
for "Subclass field hides superclass field" inspection

GitOrigin-RevId: 2da814fb51c92618cf528260c0ee585b894ca65a
2025-06-17 10:25:58 +00:00
Bas Leijdekkersandintellij-monorepo-bot 76a10e63e4 Java: enable Flexibile Constructor Bodies in non-preview language level 25 (IDEA-372971)
GitOrigin-RevId: c0b12174a7dc60cfdf662d7d6d3bc576e734e4d4
2025-06-17 10:25:58 +00:00
Bas Leijdekkersandintellij-monorepo-bot e6e401fbe1 Java: don't produce NUL characters in Convert to Markdown documentation output (IDEA-374488)
GitOrigin-RevId: b96d7cc559b0ffbc5130131961b8a530b9baba9c
2025-06-14 22:43:28 +00:00
Bas Leijdekkersandintellij-monorepo-bot 9ae32a8adb Java: better mutability check for record components (IDEA-371018)
GitOrigin-RevId: e4f351bcc297d41857406d177df00ff2696a7bfd
2025-06-09 14:24:43 +00:00
Bas Leijdekkersandintellij-monorepo-bot d461d596f7 Java: check for immutable types in records (IDEA-372966)
in "Assignment or return of field with mutable type" inspection

GitOrigin-RevId: 96e782484fde1ad2229b19b30cf928847b04d4ba
2025-06-09 14:24:43 +00:00
Bas Leijdekkersandintellij-monorepo-bot 3bf36654d0 Java: fix replacing tail recursion with iteration failure caused by conversion to ModCommand (IDEA-371968)
GitOrigin-RevId: 1d05dc8583221fb8583828847720b07be1d5bdd3
2025-06-05 08:58:24 +00:00
Bas Leijdekkersandintellij-monorepo-bot c24735c611 Java: fix "Add braces to 'else' statement" not showing before 'for' (IDEA-372262)
GitOrigin-RevId: c305cd5df439ea2c1ea6d796dc1b57a16a87ba36
2025-06-03 20:14:33 +00:00
Bart van Helvertandintellij-monorepo-bot 65c9a18685 [java] Fix if-to-switch conversion for unconditionals on user types
Fixes the problem that `SwitchUtils#createPatternFromExpression` erases all type information making the pattern check fail on any type that is not imported by default (like `Object`, `String` etc...) #IDEA-371624 Fixed

GitOrigin-RevId: 2de913b7d0f51fa30d85657f0f095a334eef0bf8
2025-05-27 18:18:01 +00:00
Nikolay Chashnikovandintellij-monorepo-bot d039e59e88 [java] report access to package-private members declared in production code from tests (IDEA-372858)
GitOrigin-RevId: 6f046186e0f0a587e1aaab31dd55b9f76a28db96
2025-05-19 10:03:24 +00:00
Mikhail Pyltsinandintellij-monorepo-bot cebd8c18cd [java-import] IDEA-369199 Preserve module imports even if they are not used
- new options
- don't highlight such imports as unused
- delete imports of nested modules
- preserve high-level modules during 'optimize import'

GitOrigin-RevId: 3728f41a934f320767caac0a643a5869ccc84bcc
2025-05-14 20:29:11 +00:00
Tagir Valeevandintellij-monorepo-bot 1cadb8a667 [java-refactoring] Inline delegating variable: an ability to keep the current variable name
Fixes IDEA-371649 Inline variable using the later name

GitOrigin-RevId: a31d332762af3721245af31841562ff48a0cb3a9
2025-05-09 18:02:40 +00:00
Mikhail Pyltsinandintellij-monorepo-bot 037958feaf [java-inspections] IDEA-360079 unused for main method modifiers
GitOrigin-RevId: 698a021a1c86d8365a113d2d1b47c085beec9489
2025-05-09 11:55:52 +00:00
Nikolay Chashnikovandintellij-monorepo-bot 52ee8d5d0f [java] move classes in 'java.impl' inheriting from classes from 'java.analysis.impl' to a different package (IJPL-149126)
This is needed to avoid IllegalAccessError if 'java.impl' and 'java.analysis.impl' are loaded by different classloaders. For example, EntryPointsManagerImpl inherits from EntryPointsManagerBase, and an anonymous class inside EntryPointsManagerImpl refers to a protected field EntryPointsManagerBase.myWriteAnnotations. Since the anonymous doesn't inherit from EntryPointsManagerBase, such access works via package-private visibility because both classes are located in the same package and loaded by the same classloader. Moving EntryPointsManagerImpl to a different package forces javac to generate an accessor method in EntryPointsManagerImpl and use it from the anonymous class to access the protected field.

GitOrigin-RevId: 8c7b92c473f490f48f4226f0ed49339ef83cd4c3
2025-05-02 08:05:38 +00:00
Bas Leijdekkersandintellij-monorepo-bot c4ac894375 Java: conserve whitespace inside pre-tags as is (IDEA-371810)
GitOrigin-RevId: 24998ca546ab9957260153af766f35fc04e7ad1a
2025-04-30 18:14:06 +00:00
Bas Leijdekkersandintellij-monorepo-bot a58f616609 Java: handle type parameters correct when converting javadoc to markdown (IDEA-371810)
GitOrigin-RevId: 8d4692fc69d59cedd36b00229815ae69121acae0
2025-04-30 18:14:06 +00:00
Tagir Valeevandintellij-monorepo-bot 5fd8eb4a09 [java-inspections] IDEA-371838 Convert SideEffectsMethodRefToLambdaFix to ModCommand
GitOrigin-RevId: 8e1fff8b05604adf5fe3e6dc853d8ac952b5a242
2025-04-29 13:01:39 +00:00
Bas Leijdekkersandintellij-monorepo-bot 3d6b0b432c Java: don't report redundant cast on primitive array argument to vararg method (IDEA-273298)
GitOrigin-RevId: 938943d615f628bffe7fe493cfc5f408ff3592d0
2025-04-12 16:28:13 +00:00
Bas Leijdekkersandintellij-monorepo-bot e24bcbd00c Java: improve inspection messages and fix replacement with tab character
in "Unnecessary Unicode escape sequence" inspection

GitOrigin-RevId: 53cd08d56aba3aa23ab4580ebbaf0c3807a7047b
2025-04-12 16:28:13 +00:00
Bas Leijdekkersandintellij-monorepo-bot e3ce040c5b java: don't warn on Combining Diacritical Marks and other combining characters (IDEA-350383)
in "Unnecessary Unicode escape sequence" inspection

GitOrigin-RevId: 0e76b6680df5ca6001d6ff249bc8246c11dd78a6
2025-04-12 16:28:13 +00:00
Bas Leijdekkersandintellij-monorepo-bot 3f2c02fb00 Java: fix NPE in "Call to native method while locked" inspection (IDEA-370235)
GitOrigin-RevId: c1c84d6ba917823680ecd9a0729ebc278c2c27d6
2025-04-09 16:34:52 +00:00
Ruslan Nabiullinandintellij-monorepo-bot 741a56017c [java-inspections] Refactor escape detection method, check multiple escapes in tests IDEA-370403
IJ-CR-159382

GitOrigin-RevId: c580bdd8ae549159c454c6b02c4b9c314c7eb68a
2025-04-09 15:46:32 +00:00
Ruslan Nabiullinandintellij-monorepo-bot a638838be6 [java] IDEA-370403 fix after review
IJ-CR-159382

GitOrigin-RevId: e69b13860ebe931e8eefbece0f293f320e23572d
2025-04-09 15:46:32 +00:00
Ruslan Nabiullinandintellij-monorepo-bot 63af2a7189 [java-inspections] IDEA-342420 add test data for markdown javadoc as well
IJ-CR-159382

GitOrigin-RevId: 79212360b56cf687574514cfaedace9bcd7d629d
2025-04-09 15:46:32 +00:00
Ruslan Nabiullinandintellij-monorepo-bot 0958703957 [java-inspections] IDEA-342420 "Unnecessary unicode escape sequence" false positive
IJ-CR-159382

GitOrigin-RevId: 4862cb53dcba5a72abbea61bc46dd831ebf068b4
2025-04-09 15:46:32 +00:00