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

Add serialVersionUID to generated classes that implement Serializable #810

Closed
rolevinks opened this issue Sep 14, 2021 · 1 comment
Closed
Milestone

Comments

@rolevinks
Copy link
Contributor

We use the maven-compiler-plugin in our project, and this gives us warnings on generated classes that implement Serializable.

serializable class [...] has no definition of serialVersionUID

There is a simple, solution, to add this to the template:

    @java.io.Serial
    private static final long serialVersionUID = 1L;

Can this be implemented? I would do it myself, but when I check out and build the project, a lot of tests fail because of an UnableToDeleteDirectoryException.

Unable to delete directory
com.kobylynskyi.graphql.codegen.model.exception.UnableToDeleteDirectoryException: Unable to delete directory

Caused by: java.nio.file.FileSystemException: build\generated\com\kobylynskyi\graphql\test1\CreateEventMutationResolver.java: The process cannot access the file because it is being used by another process
	at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:274)
	at java.base/sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105)
	at java.base/java.nio.file.Files.delete(Files.java:1146)
	at com.kobylynskyi.graphql.codegen.utils.Utils.deleteDir(Utils.java:161)
	... 101 more 
@rolevinks
Copy link
Contributor Author

Is resolved with #811

@kobylynskyi kobylynskyi added this to the 5.4.0 milestone Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants