[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jdt-dev] CAUTION: IClassFile.getType() will no longer throw JavaModelException
|
There is currently an inconsistency on IClassFile#getType() method which
throws a JavaModelException although its implementation does not
(see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=154667).
This is also confusing for clients who may think that calling this method
will
populate the model although it does not (this is a handle-only method).
** We definitely want to fix this problem in next week integration build **
Note that, if this change has no impact on binary compatibility, it breaks
source compatibility! Clients of this API must remove unnecessary catch
block
in their code as it will become invalid and be flagged as error by the
compiler.
**********************************************************************
**** We plan to release this change in JDT/Core HEAD next Friday *****
**********************************************************************
Here are the 'Unreachable catch block' compiler errors got after having
applied the patch in an Eclipse full source workspace using I20070227-0800
build:
plugin org.eclipse.jdt.apt.core
===============================
- /src/org/eclipse/jdt/apt/core/internal/env
BaseProcessorEnv.java: line 587
plugin org.eclipse.jdt.debug.ui
===============================
- /src/org/eclipse/jdt/internal/debug/ui
TypeNameResolver.java: line 59
plugin org.eclipse.jdt.ui
=========================
- /src/org/eclipse/jdt/internal/corext/refactoring/rename
GenericRefactoringHandleTransplanter.java: line 122
- /src/org/eclipse/jdt/internal/ui/browsing
MembersView.java: line 264
- /src/org/eclipse/jdt/internal/ui/browsing
TypesView.java: line 135
- /src/org/eclipse/jdt/internal/ui/infoviews
JavadocView.java: line 505
- /src/org/eclipse/jdt/internal/ui/javaeditor
InternalClassFileEditorInput.java: line 83
- /src/org/eclipse/jdt/internal/ui/javaeditor
JavaOutlinePage.java: line 973
- /src/org/eclipse/jdt/internal/ui/text
JavaOutlineInformationControl.java: line 789
- /src/org/eclipse/jdt/internal/ui/typehierarchy
TypeHierarchyLifeCycle.java: line 239
- /src/org/eclipse/jdt/internal/ui/typehierarchy
TypeHierarchyViewPart.java: line 1608
- /src/org/eclipse/jdt/ui/actions
FindAction.java: line 201
JDT/APT, JDT/UI and JDT/Debug please confirm by answering to this post that
you
will be able to release corresponding change in HEAD on Friday and avoid
a failure in Saturday nightly build, thanks
Note that there are other references to this method in the workspace
but they won't be broken by this change as they do no catch the exception
(declaring method already throws the JME) or there's a call to another
method
which also throws the JME in the same try block...
I will also add an entry in 3.3 migration guide to document this change for
other potential clients of this API.
Cordialement/Regards,
Frédéric