Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix eclipse warnings and add java documentation, part 3 (#1670) #1698

Merged

Conversation

speckyspooky
Copy link
Contributor

@speckyspooky speckyspooky commented May 19, 2024

Fix eclipse warnings and add java documentation, part 3 (#1670)
and warnings of JavaScript ECMAScript 6 (#1574)

@speckyspooky speckyspooky self-assigned this May 19, 2024
@speckyspooky speckyspooky added Enhancement Small change to improve the current supported functionality Documentation labels May 19, 2024
@speckyspooky speckyspooky added this to the 4.16 milestone May 19, 2024
@speckyspooky
Copy link
Contributor Author

@wimjongman

Hello Wim,
this PR includes changed to solve warnings and add missing documentation.

To solve warnings I changed 2 interfaces and 1 abstract class.
The method-signature is changed on the Return-Value. The return-value is changed from Collection to Collection<IContent>

With this change we are more safty at side of data type casting
but I also know that the interface-method-signature is changed.

What is your opinion on it? I would keep it changed but I will wait for your recommedation of the change.

Details of the interface changes:

class/interface: public interface IElement

=> changed:

Method
- from:		Collection getChildren();
- to:		Collection<IContent> getChildren();

class/interface: public class AbstractElement implements IElement

=> changed:

Property
- from:		transient protected Collection<?> children;
- to:		transient protected Collection<IContent> children;

Method
- from:		public Collection getChildren() {
- to:		public Collection<IContent> getChildren() {

class/interface: public interface IPageContent extends IContainerContent

=> changed:

Method
- from:		Collection getHeader();
- to:		Collection<IContent> getHeader();

Method
- from:		Collection getFooter();
- to:		Collection<IContent> getFooter();

@wimjongman
Copy link
Contributor

Yes, if this is a breaking interface change then we can probably not do that without a proper process.

https://github.com/eclipse-platform/eclipse.platform/blob/master/docs/Evolving-Java-based-APIs-2.md

@speckyspooky
Copy link
Contributor Author

speckyspooky commented May 20, 2024

I have not changed parameter-signatures of methods and I have also not added or removed parameters.

I have changed the return-value from raw type "Collection" to "Collection".
So I have changed the raw type to more precision, can this break compatibility?

It is little bit a kind of mixture like your linked documentation and the marked line at my screen.

grafik

I figured out this sequence of the description which shows me like my change of a raw-type
and based on this section we should get no problem with it:

grafik

@merks
Copy link
Contributor

merks commented May 21, 2024

Parameterizing a raw type is not binary in compatible so this looks fine.

It's a little odd that the only implementation of this method is deprecated:

image

There's not even an explanation why, and what good does the deprecation do if its' not deprecated in the interface?

Copy link
Contributor

@wimjongman wimjongman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏🙏

@speckyspooky speckyspooky merged commit 92cf048 into eclipse-birt:master May 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Enhancement Small change to improve the current supported functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants