commit | 4660e32eca67ecb827126d309213e16a72cf15c4 | [log] [tgz] |
---|---|---|
author | Simeon Andreev <simeon.danailov.andreev@gmail.com> | Wed May 06 15:33:21 2020 +0200 |
committer | Andrey Loskutov <loskutov@gmx.de> | Tue Jun 09 15:41:37 2020 -0400 |
tree | a08f38e2bc9a2dc6d647c6b0d853e9760edba4ab | |
parent | 66e28a4cdde7ad38f8bbf4da340b280bc8930555 [diff] |
Bug 562436 - ASTParser.createBindings fails if Editor opens concurrently CompilationUnit.getContents() and CompilationUnit.discardWorkingCopy() can be called concurrently, causing the getContents() method to throw an exception. This in turn can cause ASTParser.createBindings() to fail. In particular, its possible for CompilationUnit.getContents() to retrieve an open buffer via BufferManager.getBuffer(). This buffer can then be closed, before CompilationUnit.getContents() calls IBuffer.getCharacters(). As a result, getCharacters() returns null and CompilationUnit.getContents() throws an exception. With this change CompilationUnit.getContents() resorts to reading the compilation unit file directly, in case the compilation unit buffer was closed after obtaining it, but before the buffers characters were retrieved. Change-Id: I01772e638bf4160defc63196629a710f214181c5 Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
This is the core part of Eclipse's Java development tools. It contains the non-UI support for compiling and working with Java code, including the following:
For more information and important links, refer to the [JDT wiki page] 1 or the [JDT project overview page] 2.