Skip to content

Commit 5d63a76

Browse files
authored
Merge pull request github#6797 from Marcono1234/marcono1234/remove-overwritten-NestedType-isStatic-qldoc
Java: Remove overwritten `NestedType.isStatic()` QLDoc
2 parents 40d98ad + 0bce823 commit 5d63a76

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

java/ql/lib/semmle/code/java/Type.qll

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -779,23 +779,15 @@ class NestedType extends RefType {
779779
getEnclosingType().isStrictfp()
780780
}
781781

782-
/**
783-
* Holds if this nested type is static.
784-
*
785-
* A nested type is static either if it is explicitly declared as such
786-
* using the modifier `static`, or if it is implicitly static
787-
* because one of the following holds:
788-
*
789-
* - it is a member type of an interface,
790-
* - it is a member interface, or
791-
* - it is a nested enum type.
792-
*
793-
* See JLS v8, section 8.5.1 (Static Member Type Declarations),
794-
* section 8.9 (Enums) and section 9.5 (Member Type Declarations).
795-
*/
796782
override predicate isStatic() {
797783
super.isStatic()
798784
or
785+
/*
786+
* Note: The following is most likely redundant because `isStatic()` of the superclass
787+
* holds for implicitly static types, but keep the special casing below for now to be
788+
* on the safe side
789+
*/
790+
799791
// JLS 8.5.1: A member interface is implicitly static.
800792
this instanceof Interface
801793
or

java/ql/src/Advisory/Documentation/SpuriousJavadocParam.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public <T> void parameterized(T parameter){ ... }
4444
*
4545
* @param <X> The type of the elements.
4646
*/
47-
class Generic<T> { ...}
47+
class Generic<T> { ... }
4848

4949
/**
5050
* GOOD: A proper Javadoc comment.

0 commit comments

Comments
 (0)