Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-43507] Remove gratuitous use of generics in the SPI
Since every implementation needs to cast anyway, the generics signature was unnecessary. We could use generics at the class level to provide type safety, except that would basically force 5 or 6 generic type parameters which gets very ridicluous. Instead we just provide the guarantee that casting is always pre-checked and safe
- Loading branch information
Showing with 59 additions and 63 deletions.
- +20 −15 src/main/java/jenkins/scm/api/trait/SCMNavigatorTrait.java
- +24 −21 src/main/java/jenkins/scm/api/trait/SCMSourceTrait.java
- +1 −2 src/main/java/jenkins/scm/impl/trait/RegexSCMHeadFilterTrait.java
- +1 −2 src/main/java/jenkins/scm/impl/trait/RegexSCMSourceFilterTrait.java
- +1 −2 src/main/java/jenkins/scm/impl/trait/WildcardSCMHeadFilterTrait.java
- +1 −2 src/main/java/jenkins/scm/impl/trait/WildcardSCMSourceFilterTrait.java
- +3 −6 src/test/java/jenkins/scm/impl/mock/MockSCMDiscoverBranches.java
- +5 −7 src/test/java/jenkins/scm/impl/mock/MockSCMDiscoverChangeRequests.java
- +3 −6 src/test/java/jenkins/scm/impl/mock/MockSCMDiscoverTags.java