Commit Graph

2466 Commits

Author SHA1 Message Date
Bas Leijdekkers
5fffff7b2c IG: introduce convenience methods and cleanup 2017-06-10 18:52:15 +02:00
Anna Kozlova
87d30cdd2c replace assignment with comparison for asserts (IDEA-CR-21652) 2017-06-09 18:33:07 +03:00
peter
8d52cffbb3 provide some text for unavailable SimplifyBooleanExpressionFix (EA-102794) 2017-06-09 08:57:01 +02:00
peter
0e938165ea fix contracts for junit5 assertions 2017-06-08 17:12:36 +02:00
Tagir Valeev
755dcc6044 BytecodeAnalysis: partial purity solution before serialization
All purity dependencies within current class are solved before serialization.
This reduces index space and solve complexity after reading (in particular for some methods complete solution could be found analyzing their declaring class only). Also this may reduce the necessity to load some dependencies. E.g. if X::a calls X::b and Y::c (in any order) and X::b is not pure then X::a is solved to be not pure and class Y could be not analyzed at all.
2017-06-08 15:24:11 +07:00
Tagir Valeev
fb6965b6b9 ExtractSideEffectsFix -> DeleteSideEffectsAwareFix; i18n
Now intention availability logic is moved from HighlightUtil to DeleteSideEffectsAwareFix
Review: IDEA-CR-21623
2017-06-08 12:15:20 +07:00
Anna Kozlova
d65ff6ad81 introduce functional: combine extract method & introduce
IDEA-174011; IDEA-174021
2017-06-07 19:04:04 +03:00
Tagir Valeev
535c113dba IDEA-172877 Provide a quick-fix on 'Not a statement' error message 2017-06-07 15:27:49 +07:00
Anna Kozlova
02c718aae8 replace assignment with comparison in condition exps (IDEA-173860) 2017-06-06 19:07:58 +03:00
peter
e5b892bd23 report when notnull type is instantiated with unknown nullity (IDEA-CR-21203) 2017-06-06 17:41:59 +02:00
peter
5f6ffaa7c6 rethrow PCE (EA-101552 - PCE: AbstractProgressIndicatorBase.checkCanceled) 2017-06-06 16:39:26 +02:00
Anna Kozlova
a19a52bf49 raw type to parameterized: warn about conflicts (IDEA-173770) 2017-06-06 14:54:07 +03:00
Tagir Valeev
6fbca226c9 UseCompareMethodInspection: members rearranged 2017-06-06 17:39:32 +07:00
Tagir Valeev
dbcddf5a4a BoxForComparisonInspection enhanced -> UseCompareMethodInspection
Suggests to use Integer.compare(), etc. instead if ternary operator or if chain. Fixes IDEA-173766.
2017-06-06 17:20:08 +07:00
Anna Kozlova
a5501a81c0 incompatible return types in hierarchy fixed (IDEA-173809)
take parameter bounds into account
2017-06-05 20:14:44 +03:00
Anna Kozlova
12c350758d Interface.super method calls: ensure valid qualifier (IDEA-173888)
forbid calls to super methods which are overridden in direct superinterfaces
2017-06-05 14:34:18 +03:00
Anna Kozlova
893f166226 log warning for invalid text e.g. with spaces 2017-06-05 14:34:18 +03:00
peter
473d383cbe dfa: prefer unknown nullity from super over scoped nullity default (IDEA-167062) 2017-06-03 18:07:11 +02:00
Tagir Valeev
a326c0617a Bytecode analysis: basic return value tracking 2017-06-01 13:38:06 +07:00
Tagir Valeev
19eb35d106 Bytecode analysis: index size stats; minor index compaction 2017-06-01 10:53:14 +07:00
Tagir Valeev
588d978362 OptionalIsPresentInspection: do not warn if map() part can be null
If we cannot determine the non-nullity of map expression, then info
level is used. Fixes IDEA-172609 "Replace Optional.isPresent() checks
with functional-style expressions" is broken.
2017-05-31 17:48:57 +07:00
Tagir Valeev
fd3dde8aa7 NullityInference: better handling of ternary, parentheses, casts 2017-05-31 17:45:18 +07:00
Tagir Valeev
f7f84838f4 BytecodeAnalysis: VERSION_MODIFIER_MAX removed
Review: IDEA-CR-21434
2017-05-31 14:32:59 +07:00
Tagir Valeev
f3eec8cc18 BytecodeAnalysis: allow to disable index and hashing for debug 2017-05-31 12:57:32 +07:00
Tagir Valeev
4fdf370011 ClassDataIndexer: hash non-deserialized equations
If equations were created in the same session, they were returned
non-hashed to the user code.
2017-05-31 12:57:31 +07:00
peter
f1466fd667 log when JavaNullMethodArgumentUtil takes significant time to find usages 2017-05-30 20:10:38 +02:00
Anna Kozlova
3f76ffa2f8 provide quick fix to qualify super call to default interface method from class (IDEA-172325) 2017-05-30 15:00:42 +03:00
Tagir Valeev
82da560c31 Introduced AggressiveHardCodedPurity under registry key (IDEA-CR-21434)
New key = java.annotations.inference.aggressive.hardcoded.purity (true
by default). Implies purity for Object.toString(), Iterable.iterator(),
Iterator.hasNext() and this-changing Iterator.next(). Parameter-changing
 mode supported for hardcoded purity.
2017-05-30 17:38:23 +07:00
Tagir Valeev
c8633ffc7c BytecodeAnalysis refactoring: hashing in single place; cosmetics 2017-05-30 13:47:05 +07:00
Tagir Valeev
97eaee737b BytecodeAnalysis refactoring: HKey and Key merged to EKey; hashing is encapsulated inside HMethod/Method pair 2017-05-30 13:17:05 +07:00
Tagir Valeev
60e8eb5948 PurityAnalysis: Object.toString hardcoded pure 2017-05-29 15:14:46 +07:00
Tagir Valeev
5b3d50273c ValueConstraint#negate throw if cannot be negated; canBeNegated added (IDEA-CR-21320) 2017-05-29 14:53:31 +07:00
Tagir Valeev
b008febf87 Revert: erroneously committed files from b209ade 2017-05-29 13:52:16 +07:00
Tagir Valeev
b209ade15d TrivialFunctionalExpressionUsageInspection: disable for multi-statement lambda in "for" init/update 2017-05-29 12:19:05 +07:00
Tagir Valeev
7bb6ff8ff4 DfaMemoryStateImpl: tryMergeClassByQualifier extracted and documented (IDEA-CR-21388) 2017-05-29 11:06:50 +07:00
Dmitry Batkovich
d4c7250929 inspection view: batch inspection results displays "anonymous (null)" IDEA-173518 2017-05-27 19:49:40 +03:00
Roman Shevchenko
2aebda8546 Cleanup (typo) 2017-05-26 17:08:52 +03:00
Tagir Valeev
c5ea3f1144 DfaMemoryStateImpl: fix internal structures 2017-05-26 14:51:04 +07:00
Tagir Valeev
514b33e771 DfaMemoryStateImpl: removed obsolete code 2017-05-26 13:07:59 +07:00
Tagir Valeev
0362af634a DFA: Qualifier equality implies qualified values equality 2017-05-26 12:51:00 +07:00
Roman Shevchenko
b0b6bb27bf [java] "dependency on an automatic module" inspection 2017-05-25 20:45:31 +03:00
Dmitry Batkovich
dedd951e39 fix jsp suppressions:
1. fix "suppress for file" inside a jsp file
2. allow "suppress for statement" if it's possible
3. forbid "suppress for member" if a member is synthetic
2017-05-25 15:44:00 +03:00
Roman Shevchenko
d46028e687 [java] drops module naming inspection
http://openjdk.java.net/projects/jigsaw/spec/issues/#VersionsInModuleNames
2017-05-25 13:34:37 +03:00
Tagir Valeev
668fcdd985 PurityAnalysis: more native methods hardcoded 2017-05-25 15:22:20 +07:00
Anna Kozlova
34c6cbcdd9 external annotations: ensure runtime annotations are inserted in code (IDEA-170720) 2017-05-25 10:42:45 +03:00
Tagir Valeev
d235bc08ae HardcodedContracts#isHardcodedPure: Arrays methods properly marked 2017-05-25 14:36:22 +07:00
Tagir Valeev
445846597a InferredAnnotationsManagerImpl: fix displaying hardcoded annotations 2017-05-25 12:43:27 +07:00
Tagir Valeev
68dd38bbca ContractInferenceInterpreter#negateConstraint -> ValueConstraint#negate, used in BytecodeAnalysisConverter. Test01.java: checkTrueFail (IDEA-CR-21320) 2017-05-25 11:02:12 +07:00
Anna Kozlova
617e93f6a7 external annotations: check suppressions externally (IDEA-170717) 2017-05-24 17:12:22 +03:00
Tagir Valeev
d24253e47d BytecodeAnalysis: cosmetics in Direction class 2017-05-24 12:51:08 +07:00