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

Disable Compiler Warning for missing serialVersionUID #473

Closed
hohwille opened this issue Sep 25, 2020 · 0 comments
Closed

Disable Compiler Warning for missing serialVersionUID #473

hohwille opened this issue Sep 25, 2020 · 0 comments
Labels
eclipse related to Eclipse IDE enhancement New feature or request help wanted Extra attention is needed settings ide-settings repo and replated processes and features
Milestone

Comments

@hohwille
Copy link
Member

hohwille commented Sep 25, 2020

Java Serialization is a dying feature. While it still might be used by some legacy application servers to store session data it should be considered dead. With devonfw we are proposing a stateless server concept and even when you are using a session, there is no need to store it and exchange it in cluster nodes (simply use session stickyness - if state must be presumed if a node dies enforce stateless servers).

Using Java serialization as data transport format for services (e.g. via springs HttpInvoker) is causing serious security issues. Therefore JSON has established and in some other cases XML is used (what needs to be secured for external entity inclusion).

So why bother about serialVersionUID? We could even consider removing java.io.Serializable from devon4j but we do not want to break compatiblity with existing projects using devon4j:

https://github.com/devonfw/devon4j/blob/c8f25cb073909db78d0329eda7ce44d93c9e9bae/modules/basic/src/main/java/com/devonfw/module/basic/common/api/to/AbstractTo.java#L13

https://github.com/devonfw/devon4j/blob/c8f25cb073909db78d0329eda7ce44d93c9e9bae/modules/basic/src/main/java/com/devonfw/module/basic/common/api/entity/GenericEntity.java#L34

So in the end my suggestion is to disable the compiler warning in Eclipse complaining about a missing serialVersionUID by default to avoid waste (if developers start thinking about this and taking action in every TO and entity class). Projects that for whatever reason still want to have this, are free to enable this but we should change this for new projects by default.

@hohwille hohwille added enhancement New feature or request settings ide-settings repo and replated processes and features eclipse related to Eclipse IDE labels Sep 25, 2020
@hohwille hohwille added the help wanted Extra attention is needed label Sep 28, 2020
@maybeec maybeec closed this as completed Nov 4, 2020
@hohwille hohwille added this to the settings milestone Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eclipse related to Eclipse IDE enhancement New feature or request help wanted Extra attention is needed settings ide-settings repo and replated processes and features
Projects
None yet
Development

No branches or pull requests

2 participants