Affects PMD Version:
6.7.0
Rule:
MissingSerialVersionUID
Description:
I have an interface that extends Serializable
- PMD complains that the interface is missing the required serialVersionUID. Obviously, only classes are required to have it.
Code Sample demonstrating the issue:
public interface IDomainObject<ID extends Serializable & Comparable<? super ID>> extends MutablePrimaryIdentifier<ID>, Serializable { }
Running PMD through: [Maven]
[INFO] --- maven-pmd-plugin:3.9.0:check (pmd-checker) @ cb4-commons-core-persistence ---
[INFO] PMD Failure: com.cb4.commons.persistence.IDomainObject:17 Rule:MissingSerialVersionUID Priority:3 Classes implementing Serializable should set a serialVersionUID.
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T21:33:14+03:00)
Maven home: /home/lyor/Software/apache-maven-3.5.4
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.fc27.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.17.19-100.fc27.x86_64", arch: "amd64", family: "unix"
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4