question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature request] Add a `codeAction` to generate the serialVersionUID field

See original GitHub issue

Problem Statement

As the Eclipse IDE: Which class implements the Serializable, we need to put a field: private static final long serialVersionUID = X;. Where X is a number type long be generated by the tool serialver of Java.

Ideas or possible solutions

Reference: Java – How to generate serialVersionUID

Conclusion

Thank you for the hard-working to make this LS for Java, I really appreciate it.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
baobaoitcommented, Oct 1, 2021

@snjeza today, I make it works with a little tweak like the picture below (includes your patch or without it): image

So this issue is resolved. I want to give to you huge respect.

A ridiculous that, when I test in Lua demo the format:

local settings = {
  java = {
    settings = {
      url = "/path"
    }
  }
}

print(settings.java.settings.url)
-- Output: /path

But with that format in nvim-jdtls it doesn’t work. I need to explicit it for the key of table settings:

local settings = {
  ["java.settings.url"] = "/path"
}
1reaction
testforstephencommented, Sep 29, 2021

One improvement is to show this quick fix suggestion at the light bulb regardless of whether the “missingSerialVersion” flag is enabled or not.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Feature request] Add a `codeAction` to generate the ... - GitHub
Problem Statement Which class implements the Serializable, we need to put a field: private static final long serialVersionUID = X;.
Read more >
How to generate a serialVersionUID in IntelliJ IDEA - Marc Nuri
You can then press Alt+Enter and select the Add 'serialVersionUID' field option.
Read more >
Auto-generate serialVersionUID data member and value
I am expecting a quick-fix to generate serialVersionUID with a value ... to break Serialization compatibility (e.g. by adding new fields).
Read more >
Java - How to generate serialVersionUID - Mkyong.com
This article shows you a few ways to generate the serialVersionUID for serialization class. 1. serialver.
Read more >
Welcome - Drools Documentation - JBoss.org
Bug reports, bug fixes, feature requests and feature submissions should all go here. ... A simple way to get started is to download...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found