Changes

Summary

  1. Bug 574171 - Fix deadlock when updating meta index (details)
  2. Bug 574752 - [test] infinite hang in CompletionTests2.testBug281598() (details)
  3. Bug 574704 - [content assist] incomplete content assist before cast (details)
  4. Bug 574289 - [test] [performance] remove wait from tests.util.Util.zip (details)
  5. Bug 574699 - fixed warning on deprecated import (details)
  6. Bug 549446 - Incorrect IntersectionType inferring (details)
  7. Bug 574450 - ClosedFileSystemException in multi-threaded maven build (details)
  8. Bug 574603 - [null][external] offer more IDE options for specifying (details)
  9. Bug 574821 - [14] Use a constant for "yield" instead of the literal (details)
  10. Bug 574284 - [16] varargs record constructor not properly resolved (details)
  11. Bug 561726 - [dom ast] the ast target level not percolated down to (details)
  12. Bug 574791 - [16] Java 16 static initialization not working correctly (details)
  13. Bug 574791 - Adding more tests (details)
  14. Bug 574282 - Simple record fails with Internal compiler error: (details)
  15. Bug 574788 - Can't load JavaDoc for individual module jar with unique (details)
  16. Bug 574257 - fix NPE on hovering over records, where the 'fields' is not initialized (details)
Commit 6fd51ccf52d0a6c35917eb2f6119bf314b21a7fc by Andrey Loskutov
Bug 574171 - Fix deadlock when updating meta index

When meta index is tried to update from another thread through a
synchronized method on IndexManager, while the indexing thread which
holds the meta index RW lock tries to call a synchronize method on
IndexManager, they end up in a deadlock. This happens in situations
where files are requested to be removed from index.

To avoid this the fix tries to push such meta index updates which are
coming from non indexing threads into the indexing thread and run as
soon as possible to avoid ordering issues.

Change-Id: Ie7af1efd2f908f6f06c76f4b817e53247f2e95f7
Signed-off-by: Gayan Perera <gayanper@gmail.com>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/181878
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Andrey Loskutov <loskutov@gmx.de>
The file was modifiedorg.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AllJavaModelTests.java
The file was modifiedorg.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/RemoveFromIndex.java
The file was modifiedorg.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java
The file was modifiedorg.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/IndexManagerTests.java
Commit 9b9b0a6f7ff84b2e582ef1b27fab6389d874aec4 by Andrey Loskutov
Bug 574752 - [test] infinite hang in CompletionTests2.testBug281598()

Change-Id: Icb1c102e5391eace87fc975e5e1bd6b50deb5739
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182959
Tested-by: JDT Bot <jdt-bot@eclipse.org>
The file was modifiedorg.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests2.java
The file was modifiedorg.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests9.java
Commit 1131b538846df83fffb032675cb8fcf50e2ae90e by Stephan Herrmann
Bug 574704 - [content assist] incomplete content assist before cast

Change-Id: Ifb779371547dc6fcd6f5b1b3c6188417a1c8faa7
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182908
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Stephan Herrmann <stephan.herrmann@berlin.de>
The file was modifiedorg.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests3.java
The file was modifiedorg.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
The file was modifiedorg.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSendName.java
The file was modifiedorg.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
Commit 27c43f4f3cb029521a4502171c23ef756cd2ee4f by Manoj Palat
Bug 574289 - [test] [performance] remove wait from tests.util.Util.zip

wait 14sec less

Change-Id: I5ada66f044934153444e37853b2ac5cbc1b42d0e
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182147
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Manoj Palat <manpalat@in.ibm.com>
The file was modifiedorg.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/Util.java
Commit 3ed076edf214e243b6043276c0f9e90029f4c6ed by Andrey Loskutov
Bug 574699 - fixed warning on deprecated import

Change-Id: I4b8f59c64be57f2312742c9eacd4e3075230e848
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182974
Tested-by: JDT Bot <jdt-bot@eclipse.org>
The file was modifiedorg.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceSearchTests.java
Commit d47a2c18edd89fe4c60fe26ed41fddf623164d7a by Stephan Herrmann
Bug 549446 - Incorrect IntersectionType inferring

Change-Id: I2bc733eb9e9ae7f1f72199b0f5a9bb73a68033e8
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183019
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Stephan Herrmann <stephan.herrmann@berlin.de>
The file was modifiedorg.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IntersectionTypeBinding18.java
The file was modifiedorg.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
Commit 1b756cc2eb17dc864ba5965d33c28e97092e2796 by Andrey Loskutov
Bug 574450 - ClosedFileSystemException in multi-threaded maven build

- don't close ct.sym file system, it could be used in other threads
- re-try getFileSystem() after FileSystemAlreadyExistsException - the
file system could be created by other thread after the first check

Change-Id: I172e48b055ddbf66f0b5f2e2372b8f90abe0c3fc
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183030
Tested-by: JDT Bot <jdt-bot@eclipse.org>
The file was modifiedorg.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJep247.java
Commit 97914430adc6214834979df1beecb552ca9947e0 by Stephan Herrmann
Bug 574603 - [null][external] offer more IDE options for specifying
external annotation locations

Change-Id: I91e8cae233e279b4cfa16dab2c6a7bb99df3e299
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182708
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Stephan Herrmann <stephan.herrmann@berlin.de>
The file was modifiedorg.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/StateTest.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaCorePreferenceInitializer.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SearchableEnvironment.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrtWithReleaseOption.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiReleaseJar.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathDirectory.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJMod.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java
The file was modifiedorg.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/JavaSearchNameEnvironment.java
The file was modifiedorg.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations18Test.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrt.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/NameEnvironment.java
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/State.java
Commit 27b82ba28ad8b5d6dc509c7a2667cc3a62f8834e by Jay Arthanareeswaran
Bug 574821 - [14] Use a constant for "yield" instead of the literal
String

Change-Id: I604647c8b60c6f3fb6dfe7864b82fe331a5264ae
Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183017
Tested-by: JDT Bot <jdt-bot@eclipse.org>
The file was modifiedorg.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java
The file was modifiedorg.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/JavaFeature.java
The file was modifiedorg.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Messages.java
The file was modifiedorg.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/messages.properties
The file was modifiedorg.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionsYieldTest.java
The file was modifiedorg.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
The file was modifiedorg.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
The file was modifiedorg.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
Commit babe1983d5525af86b2460b0c142367cad3f520c by Manoj Palat
Bug 574284 - [16] varargs record constructor not properly resolved

Change-Id: I2e7ceed8941079236498a83989b9224172b3d416
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182995
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Manoj Palat <manpalat@in.ibm.com>
The file was modifiedorg.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
The file was modifiedorg.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RecordsRestrictedClassTest.java
Commit 116ed6cb44112f8c908e57c892e72c14c096284d by Sarika Sinha
Bug 561726 - [dom ast] the ast target level not percolated down to
codegen

Change-Id: Id61af9dbcc2334a2b9ac1322ea7e91fb46853bd4
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182929
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Sarika Sinha <sarika.sinha@in.ibm.com>
The file was modifiedorg.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
The file was modifiedorg.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java
The file was modifiedorg.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java
The file was modifiedorg.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java
Commit b04e20e40446386317666161bc1c978cba3d876a by Jay Arthanareeswaran
Bug 574791 - [16] Java 16 static initialization not working correctly
with enums

Change-Id: I0694251a0154467c81a6c908c5ea6156be48a607
Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183045
Tested-by: JDT Bot <jdt-bot@eclipse.org>
The file was modifiedorg.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest.java
The file was modifiedorg.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
Commit fbbb12bb2df5ce337355a243aa168bdf81da05dc by Jay Arthanareeswaran
Bug 574791 - Adding more tests

Change-Id: Ic299fb050eedcdfdfd180ca149b2218764a4febd
Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183054
The file was modifiedorg.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest.java
Commit 7c424c0f2a8b732b21519cf0d05f1a015f645719 by Manoj Palat
Bug 574282 - Simple record fails with Internal compiler error:
java.lang.ArrayIndexOutOfBoundsException

Because we add methods and remove duplicate methods during compilation
we end up having holes(missing some index entries) in the synthetic
method bindings sequence. This causes Out of bounds problems when we
depend on synthetic methods count as new index.

Removal of duplicates got added with Record feature.

To fix two changes have been done
1. Reworked sorting of synthetic methods in syntheticMethods() method.
We are directly placing bindings using index. But with missing bindings
in sequence, we end up having AIOOB issue. This sorting algorithm has
been reworked.
2. When we are creating new sythetic methods we are using count of
existing methods as new index. But with removals this is not correct
anymore. Reworked this max index in the existing synthetic methods + 1.


Conflicts:
org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RecordsRestrictedClassTest.java

Change-Id: If370e3219420893a67372509f4d3f99b789decbb
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182667
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Manoj Palat <manpalat@in.ibm.com>
The file was modifiedorg.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
The file was modifiedorg.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RecordsRestrictedClassTest.java
The file was modifiedorg.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java
Commit 1decb6debdabfa48e0909ab5268c8f362d9e8c65 by Jay Arthanareeswaran
Bug 574788 - Can't load JavaDoc for individual module jar with unique
site

Change-Id: I7fd26895b09aa76fe54ca436f82643ef9798d5c7
Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183086
Tested-by: JDT Bot <jdt-bot@eclipse.org>
The file was modifiedorg.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryType.java
The file was modifiedorg.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java
Commit f62b368d8792511661acaee2de3982eb534567e0 by Manoj Palat
Bug 574257 - fix NPE on hovering over records, where the 'fields' is not initialized

Change-Id: If7ec9e9b501263971d5518b0eeaf6296eff75a58
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182107
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Manoj Palat <manpalat@in.ibm.com>
The file was modifiedorg.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java