From b7c6cd9c3e22aeaa8811130b93d2e1263de3a57e Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Wed, 9 Oct 2024 11:37:17 +0100 Subject: [PATCH] Java: Remove redundant getErasure overrides The root definition covers these cases already --- java/ql/lib/semmle/code/java/Generics.qll | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/java/ql/lib/semmle/code/java/Generics.qll b/java/ql/lib/semmle/code/java/Generics.qll index 507c3bb919ec..a50dcabe2245 100644 --- a/java/ql/lib/semmle/code/java/Generics.qll +++ b/java/ql/lib/semmle/code/java/Generics.qll @@ -330,13 +330,6 @@ class ParameterizedType extends ClassOrInterface { typeVars(_, _, _, this) } - /** - * The erasure of a parameterized type is its generic counterpart. - * - * For example, the erasure of both `X` and `X` is `X`. - */ - override RefType getErasure() { erasure(this, result) or this.(GenericType) = result } - /** * Gets the generic type corresponding to this parameterized type. * @@ -406,13 +399,6 @@ class ParameterizedInterface extends Interface, ParameterizedType { class RawType extends RefType { RawType() { isRaw(this) } - /** - * The erasure of a raw type is its generic counterpart. - * - * For example, the erasure of `List` is `List`. - */ - override RefType getErasure() { erasure(this, result) } - /** Holds if this type originates from source code. */ override predicate fromSource() { not any() }