Commit Graph

292 Commits

Author SHA1 Message Date
Tagir Valeev
26e3be308e [jdk-annotations] IDEA-309980 Incorrect java contract for Boolean.logicalXor
GitOrigin-RevId: 290f5e31786fe8a683c052dc15ba65cda001187d
2023-01-09 14:57:10 +00:00
Alexey Kudravtsev
22eb86abd3 annotate with correct Event constants
GitOrigin-RevId: 375f75e3c38532f993422727ff366935a32609a8
2022-12-16 16:51:08 +00:00
pyltsin
561e2d81d0 [java-dfa] IDEA-300181 Report when the same stream is consumed more than once.
Co-authored-by: Tagir Valeev <tagir.valeev@jetbrains.com>

GitOrigin-RevId: 929f69d8e22285cae8906761df6b39ec46ce985c
2022-09-30 12:10:32 +00:00
Tagir Valeev
f8bd662378 [java-inspections] Mark standard collection constructors as pure
IDEA-299423 NPE false positive in static analysis involving collection emptiness check

GitOrigin-RevId: c15b5117e0c58ebbe5617d221db66ecf969f5204
2022-08-08 14:16:01 +00:00
pyltsin-m
105b015e65 [java-inspections] IDEA-299009 add new annotations for dates
GitOrigin-RevId: fc7e2e0076fa9666657272da64864a04373636a4
2022-08-02 18:40:28 +00:00
Tagir Valeev
72418bf470 [jdk-annotations] Remove NotNull from Node.getAttributes() (may legally return null)
Fixes IDEA-297812 org.w3c.dom.Node#getAttributes() is erroneous annotated as 'NotNull'

GitOrigin-RevId: ead3485f11991bab33358437c845995272a48b3f
2022-07-13 19:29:02 +00:00
Tagir Valeev
2aba234a85 [annotations] System.arraycopy mutation contract
GitOrigin-RevId: bb513f66a360f52fec85d3713d9447d368a96d3e
2022-06-28 09:42:06 +00:00
Tagir Valeev
340a56e8af [java-dfa] Optional.orElse parameter is nullable (IDEA-291604)
GitOrigin-RevId: 1f352520c9e231004f06b6724bba2e00d5377ff4
2022-04-22 10:22:42 +00:00
Tagir Valeev
d835f029d4 [jdk-annotations] Reformat XML
GitOrigin-RevId: 2dd72ef3be73e433513854e777bd75844d6f4879
2022-02-16 14:32:14 +00:00
Tagir Valeev
ad43f22e41 [jdk-annotations] Ranges for java.time APIs
Fixes IDEA-288868 Check date time parameters validness in java.time API

GitOrigin-RevId: bd2ceb20b19d84a082c7e1ad154665f63eeacc7a
2022-02-16 14:32:11 +00:00
Tagir Valeev
473f0998cc [annotations] Map.size() is pure
GitOrigin-RevId: d0fde0e37b70902281285eec890a1a3b73d0835a
2022-02-10 14:48:54 +00:00
Tagir Valeev
d2e2a474ad [java-dfa] First class support for Collection.removeIf()
Fixes IDEA-286737 Side-effects from removeIf predicate are not taken into account

GitOrigin-RevId: 6efc71f98d10824a288e4510a209da34ad381bbb
2022-01-18 15:44:01 +00:00
Bas Leijdekkers
fc0f9fd6fa Annotate JPassWordField.setText() argument as @NonNls
GitOrigin-RevId: a54363b3d51e566eff8e268e4f5f733f96720bdd
2021-12-14 08:32:51 +00:00
Ivan Semenov
e582c728e0 [jdk-annotations] do not allow nulls in StyleSheet.addStyleSheet and StyleSheet.removeStyleSheet
Adding null stylesheet throws NPE later when the rule is retrieved in StyleSheet.createResolvedStyle

This is not an issue in JBR, but it is in coretto, so debugging could be a huge pain

IJ-MR-17903

GitOrigin-RevId: 66efd3936c178903ff9dcd11594ecde115d29b3c
2021-11-29 15:01:30 +00:00
Alexey Kudravtsev
6f791ba57c annotate AbstractCollection.*All methods notnull to avoid warnings when override AbstractCollection and Collection at the same time
GitOrigin-RevId: 7f132298b9cfc3edee2ba881192f60bd7109bc0a
2021-11-06 23:39:49 +00:00
Tagir Valeev
05243fc065 Annotations for org.w3c.dom Node/Element
GitOrigin-RevId: b8d3d679f309d7dede6d72f35d3bf6e5d839e3fd
2021-09-27 14:15:55 +00:00
Tagir Valeev
528416102b [java-dfa] Support explanation for constructor contracts; ArrayBlockingQueueContract constructor contracts
GitOrigin-RevId: 641b8569630c8f22d0bfa806f3cd5a54c3290ba4
2021-09-14 15:25:04 +00:00
Tagir Valeev
4262da61f8 Annotate URL.toString and URI.toString as Nls (can be displayed in UI)
Fixes IDEA-271658 Hardcoded string false positive for toString() method

GitOrigin-RevId: 2eef86abf72d4b858b6443ae5eb8a200222f5b33
2021-08-17 10:37:48 +00:00
Tagir Valeev
f817697bce Objects.equals: annotate parameters as nullable (IDEA-273923)
GitOrigin-RevId: 9b52e441a0a08bae3562b4ae40e0cf59b2c3fc2d
2021-08-06 11:01:59 +00:00
Sergey Malenkov
51f94218c1 Fix I18nInspectionsTest for DefaultTreeUI.java and DialogWrapper.java
GitOrigin-RevId: e90e207039305c2e51a33d91915e6091bdedf414
2021-07-06 20:57:00 +00:00
Dmitry Jemerov
312dd6a347 Annotate propertyName parameter in firePropertyChange as @NonNls
GitOrigin-RevId: 3b0ffa106ee86f2d2c09d5549c65e91e98e95013
2021-06-30 16:56:13 +00:00
Tagir Valeev
0f0932c3f8 Thread.sleep parameter ranges (IDEA-271027)
GitOrigin-RevId: 51c7bdb5428f7dbcd57b8354357046fad0bc1a9c
2021-06-09 09:56:28 +00:00
Tagir Valeev
d39f35d50e Range for TreePath.getPathCount
GitOrigin-RevId: 4498ee4913c8ec32fb91d3f7ce3c8cc2bbd85cfa
2021-05-24 07:24:17 +00:00
Alexey Kudravtsev
bdc8f82c89 call hierarchy: cleanup
GitOrigin-RevId: b011f25e47f0d6c7a28927baaa3913ef961627ba
2021-05-20 16:05:20 +00:00
Tagir Valeev
24247092cf [java] External annotations for java.nio.file.Path (IDEA-151375)
GitOrigin-RevId: 6f766846282ad83f1671c592ced2776aee001a95
2021-04-23 08:39:05 +03:00
Tagir Valeev
a866093918 [java-slice] See through unmodifiable list and friends (IDEA-194774)
GitOrigin-RevId: bd16ad8947c86e8d2b17cc230544ca66203c1d2d
2021-04-12 10:56:58 +00:00
Tagir Valeev
aa5d05cb34 [java-slice] Support Optional tracking (IDEA-189788)
GitOrigin-RevId: b2df50d27bc69c3d01059a0fc2dba6fb1926891a
2021-04-12 10:56:56 +00:00
Tagir Valeev
7dad86ea9d Ranges for toUnsignedXyz methods
GitOrigin-RevId: 6fbdafbb5e66f633c24615915bf69d875f9945c1
2021-04-07 02:23:50 +00:00
Tagir Valeev
e44f722d03 Enumeration.hasMoreElements annotated as pure
GitOrigin-RevId: 9c3738e73d93a65bc271ff25a7836bbfed8e7032
2021-03-31 07:47:23 +00:00
Tagir Valeev
1f55c80364 [java-dfa] More precise date ranges; precise return type for toArray()
GitOrigin-RevId: 98c2883ac4048827ab2e0b69cf75cd1c8f22755b
2021-03-31 07:47:22 +00:00
Tagir Valeev
aeb8708357 Semaphor constructor: pure
GitOrigin-RevId: f13bc158338d5ae3b490b15b6452ef86ab453b81
2021-03-30 09:42:21 +00:00
Tagir Valeev
7f950fc4b2 Annotations for executors
GitOrigin-RevId: 285ba60e4b3c0dba5fff5e4071fdd5a960297916
2021-03-29 12:53:15 +00:00
Tagir Valeev
ce8f444bb6 Annotations for java.util.Collections
Removed -> new contracts for checked* and synchronized* because derived collections should not be considered local (see ContractReturnValue.NEW_VALUE.getDfaValue), as their size could be changed from another object (well, there's a hole in our model)

GitOrigin-RevId: f64ef63612d4ae4fdc45d130d4f461f8cc0a6560
2021-03-22 07:11:05 +00:00
Tagir Valeev
52bd61c00a Annotations for CharSequence
GitOrigin-RevId: d28e07808c8edc9604c23d832a013a975ca4848c
2021-03-09 10:26:22 +00:00
Tagir Valeev
125e80de25 [java-dfa] Fixes in locality checks
1. ConstructionUtils.isCollectionConstructor checks whether an argument method is actually a constructor
2. HardcodedContracts.NO_PARAMETER_LEAK_METHODS: add putAll, removeAll, retainAll
3. Purity contract for contains/containsAll

GitOrigin-RevId: 00b68f68ef1c69ab996ff9a04d50ea5228ac629e
2021-03-05 13:31:19 +00:00
Tagir Valeev
df997e8144 String.repeat annotations
GitOrigin-RevId: f17c9a28783aae2d01deb321107c8db5a38fb767
2021-02-12 09:09:52 +00:00
Tagir Valeev
c3efd7eb7d [java-inspections] IDEA-260407 First-class support for Collection.toArray in DFA
GitOrigin-RevId: d11677e1b70f4c2e6117767b22fe707912b606ca
2021-01-27 06:42:37 +00:00
Dmitry.Krasilschikov
832158f43d i18n @Nls external annotation for java.text.DateFormat.format(java.util.Date) - apply to return type
GitOrigin-RevId: 966c0a194cf5f3ffe2ab0a8a322d5a193f66355e
2020-11-25 15:25:44 +00:00
Dmitry.Krasilschikov
e717a479cd i18n @Nls external annotation for java.text.DateFormat.format(java.util.Date)
GitOrigin-RevId: c09d86c6b894078ee8510055e34a76e017c06002
2020-11-24 15:31:24 +00:00
Tagir Valeev
ee0c34979e Range annotation for ArrayList, HashSet and HashMap constructors
GitOrigin-RevId: 60450ea48dd79df75417b9c037d2858930a5129a
2020-11-20 03:05:28 +00:00
Tagir Valeev
12e53f141f [java-dfa] IDEA-255527 Recognize Arrays.copyOf method in dataflow analysis
GitOrigin-RevId: 756cf62aa5d63f8284596047f8b270cac66dde15
2020-11-17 07:32:49 +00:00
Nikolay Chashnikov
658e40449b [jdk annotations] annotate parameters of methods in AccessibleContext with @Nls
GitOrigin-RevId: aa319e11f201995c516bfc9f2df11fdf4ae4e80d
2020-11-06 09:13:14 +00:00
Nikolay Chashnikov
121797640b [jdk annotations] add @Nls annotation to fields in AccessibleContext
GitOrigin-RevId: 51107e03e6875b512651333fc4526958d700a2a5
2020-10-28 16:08:43 +00:00
Tagir Valeev
3a7c7a82e2 Class.getResource and getResourceAsStream annotated as Nullable (IDEA-253756)
GitOrigin-RevId: b783c8e8368f4b87289a6a5d9eacbfaade80f23a
2020-10-27 06:32:37 +00:00
Kirill Kirichenko
88cc372186 Fix I18nInspectionsTest
GitOrigin-RevId: f156baf702c3f64c12a98ae78cc29dbfc4c676bb
2020-10-23 13:19:02 +00:00
Tagir Valeev
ccf1adac67 Remove NotNull from java.io.FilterOutputStream constructor parameter
According to JavaDoc, it's valid to create the instance with initial null value

GitOrigin-RevId: 717a09ade7b7804e7759e488a63f52ece4f6e27c
2020-10-21 03:49:13 +00:00
Tagir Valeev
8db9e3f6ab Annotate java.util.zip APIs
GitOrigin-RevId: d77870490b9710d869db2c9f982641884b77e77e
2020-10-21 03:47:51 +00:00
Nikolay Chashnikov
0c2eb32e94 [jdk annotations] add @NonNls annotations to some Swing elements
To fix "Hard coded string" warnings in intellij sources.

GitOrigin-RevId: 5972d9ed079824c4fd68c840857e8b77c890203c
2020-10-16 14:10:24 +00:00
Tagir Valeev
d6f6990fc3 Remove erroneous external annotation
GitOrigin-RevId: 5dc6b1656abc52e49916be810ff784942b29e5d0
2020-09-08 03:42:54 +00:00
Roman Shevchenko
3abd4f92dd [ui] status bar and tool window code i18n (IDEA-249730)
GitOrigin-RevId: dbf9396c82133e9f7bb06556381768f73b6b10b9
2020-09-07 20:59:30 +00:00