You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Java compiler now handles access restriction warnings different than before when calling inherited methods.
173
+
The Java compiler now handles access restriction warnings differently than before when calling inherited methods.
174
174
Previously, calling a public method on an accessible type would trigger an access restriction warning if that method was inherited from a restricted (non-API) parent class.
175
175
176
-
With this change, the compiler recognizes that inherited public methods accessed through an accessible type are legal and do not require access to the restricted parent class.
177
-
This behavior now more aligns with JPMS and OSGi semantics, where inherited public methods are accessible through the public subclass without requiring visibility to the parent class's package.
176
+
With this change, the compiler recognizes that inherited public methods accessed through an accessible type are legal and do not require access to the restricted parent class's package.
177
+
This behavior now aligns more closely with JPMS and OSGi semantics, where inherited public methods are accessible through the public subclass without requiring visibility to the parent class's package.
178
178
179
-
Implementers of `IClasspathConainer` are advised to revisit their usage of access restrictions to see if this new concepts still meets their expectations or possibly need adaption.
179
+
Implementers of `IClasspathContainer` are advised to revisit their usage of access restrictions to see if this new concept still meets their expectations or possibly needs adaptation.
@@ -188,25 +188,30 @@ Implementers of `IClasspathConainer` are advised to revisit their usage of acces
188
188
189
189
It was discovered that the Eclipse Compiler for Java (ECJ) was not conforming to JLS in several matters of deprecation warnings.
190
190
191
-
Therefore a significant overhaul in this area was performed. As a result you may experience fewer or more deprecation warnings in your code, depending on how `@Deprecated` and `@SuppressWarnings("deprecation")` are used in your code (in these regards the old javadoc tag `@deprecated` has the same effect as the annotation).
191
+
Therefore a significant overhaul in this area was performed.
192
+
As a result you may experience fewer or more deprecation warnings in your code, depending on how `@Deprecated` and `@SuppressWarnings("deprecation")` are used in your code (in these regards the old javadoc tag `@deprecated` has the same effect as the annotation).
192
193
193
-
#### Changes in problem reporting
194
-
* Previously, ECJ regarded all **members** (fields, methods, member types) of a deprecated type as **"implicitly deprecated"**. This concept is not backed by JLS and has been corrected, such that ECJ now reports fewer warnings.
194
+
#### Changes in Problem Reporting
195
+
196
+
* Previously, ECJ regarded all **members** (fields, methods, member types) of a deprecated type as **"implicitly deprecated"**.
197
+
This concept is not backed by JLS and has been corrected, such that ECJ now reports fewer warnings.
195
198
* In this situation deprecation warnings will only be raised against references to the deprecated type, not at locations where only its members are referenced.
196
199
* Invocations of a default constructor count as a reference to the type, i.e., those get a warning, too.
197
200
* If previously such warnings were suppressed in the code, then this `@SuppressWarnings` annotation may be flagged as unnecessary.
198
-
* If a deprecated type is extended or implemented by a non-deprecated type, clients of the subtype may now freely use its inherited members without triggering a warning. In this situation the `extends` or `implements` clauses are now the only location where deprecation will cause a warning (unless suppressed there).
199
-
* Previously, ECJ did not raise any deprecation warnings when using deprecated elements from **within the same compilation unit** (file). JLS specifies this slightly different: not a compilation unit is the point of reference, but declaration and use must be located within the same **top-level type** in order to be exempted from deprecation warnings.
201
+
* If a deprecated type is extended or implemented by a non-deprecated type, clients of the subtype may now freely use its inherited members without triggering a warning.
202
+
In this situation the `extends` or `implements` clauses are now the only location where deprecation will cause a warning (unless suppressed there).
203
+
* Previously, ECJ did not raise any deprecation warnings when using deprecated elements from **within the same compilation unit** (file).
204
+
JLS specifies this slightly differently: not a compilation unit is the point of reference, but declaration and use must be located within the same **top-level type** in order to be exempted from deprecation warnings.
200
205
* This will bring about more warnings in situations where you may have assumed that code within the same compilation unit is **"friendly"** and thus privileged to use deprecated elements.
201
206
* New warnings are also raised against usage of a deprecated **annotation element**.
202
207
* This is relevant when an annotation type itself is not deprecated, but the way how annotation details are specified is changing and deprecation is used for guiding users during migration.
203
208
204
209
205
-
#### New support for reacting to the above changes
210
+
#### New Support for Reacting to Problem Reporting Changes
206
211
207
212
You may have gotten used to warnings regarding "implicitly deprecated" members, and thus feel the correction of ECJ to be a loss in visibility of pending migration issues.
208
213
209
-
For this situation a new configurable warning (severity is `info` by default) has been implemented that will alert you when a deprecated type contains members that are not marked as deprecated (private members are exempted).
214
+
For this situation a new configurable warning (severity is `info` by default) has been implemented that will alert you when a deprecated type contains members that are not marked as deprecated (private members).
210
215
211
216
Along with the new warning a quickfix is provided that allows to mechanically add `@Deprecated` to all affected members, thus restoring warnings regarding the use of any of these members.
212
217
@@ -289,7 +294,7 @@ For more details on m2eclipse integration, see the [m2e-core release notes](http
289
294
<details>
290
295
<summary>Contributors</summary>
291
296
292
-
-[Sougandh S](https://github.com/SougandhS)
297
+
-[Sougandh S](https://github.com/SougandhS)
293
298
</details>
294
299
295
300
The Variables view now provides an option to compare a selected variable’s `toString()` value directly with the current clipboard content.
@@ -317,13 +322,13 @@ Comparison also works with `Arrays` and `Primitives` too.
317
322
318
323
319
324
320
-
### Breakpoint Support for In-line Chained Lambdas
The Java debugger now supports setting breakpoints on individual lambdas defined within single-line chained lambda expressions. When toggling a `Lambda Entry Breakpoint` on such an expression,
Copy file name to clipboardExpand all lines: news/4.38/pde.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,23 +18,24 @@ A special thanks to everyone who [contributed to PDE](acknowledgements.md#plug-i
18
18
---
19
19
## JUnit Plug-in Test Launch
20
20
21
-
### JUnit 5 and JUnit 6 conflicts in Eclipse 4.38+
22
-
23
-
Eclipse 4.38 supports JUnit 6 in parallel to JUnit 5. To achieve this, the platform contains both JUnit 5 and JUnit 6.
24
-
This can result in launch configuration and runtime problems in tests,
21
+
Eclipse 4.38 supports JUnit 6 in parallel to JUnit 5.
22
+
To achieve this, the platform contains both JUnit 5 and JUnit 6.
23
+
This can result in launch configuration and runtime problems in tests
25
24
when a plug-in does not correctly bound the version of JUnit Jupiter (JUnit 5 and JUnit 6) bundles.
26
25
27
26
The most common problem is running a JUnit 5 plug-in test launch with a `MANIFEST.MF` dependency to `junit-jupiter-api`.
28
-
This will result in no tests executed. To resolve the problem, either specify a version bound `junit-jupiter-api;bundle-version="[5.0.0,6.0.0)"`
29
-
or update the test launch to use JUnit 6. Other unbound dependencies to JUnit Jupiter bundles can likewise result in no executed tests.
27
+
This will result in no tests executed.
28
+
To resolve the problem, either specify a version bound `junit-jupiter-api;bundle-version="[5.0.0,6.0.0)"`
29
+
or update the test launch to use JUnit 6.
30
+
Other unbound dependencies to JUnit Jupiter bundles can likewise result in no executed tests.
30
31
31
-
A more difficult to analyze problem is when a transitive dependency of the plug-in has an unbound dependency to JUnit Jupiter.
32
-
The Plug-in Explorer view or the [Plug-in Dependencies](https://github.com/iloveeclipse/plugindependencies) view
32
+
A more difficult-to-analyze problem is when a transitive dependency of the test plug-in has an unbound dependency to JUnit Jupiter.
33
+
The `Plug-in Explorer` view or the [Plug-in Dependencies](https://github.com/iloveeclipse/plugindependencies) view
33
34
can be used to analyze unexpected dependencies to JUnit 6.
34
35
35
36
Example issues that indicate mixed JUnit 5 and 6 in the dependencies and/or package imports:
36
37
37
-
* Launch is executed by runs no tests or reports that no tests were found
38
-
* Launch configuration dialog shows validation error: `Cannot find class 'org.junit.platform.commons.annotation.Testable' on project build path`
39
-
* Runtime error: `Bundle "X" not found. Possible causes include missing dependencies, too restrictive version ranges, mixed JUnit versions, or a non-matching required execution environment.`
40
-
* Runtime error: `java.util.ServiceConfigurationError: org.junit.platform.engine.TestEngine: org.junit.jupiter.engine.JupiterTestEngine not a subtype`
38
+
* Launch is executed by runs no tests or reports that no tests were found.
39
+
* Launch configuration dialog shows validation error: `Cannot find class 'org.junit.platform.commons.annotation.Testable' on project build path`.
40
+
* Runtime error: `Bundle "X" not found.` Possible causes include missing dependencies, too restrictive version ranges, mixed JUnit versions, or a non-matching required execution environment.
41
+
* Runtime error: `java.util.ServiceConfigurationError: org.junit.platform.engine.TestEngine: org.junit.jupiter.engine.JupiterTestEngine not a subtype`.
0 commit comments