RFR: 8312259: StatusResponseManager unused code clean up

Xue-Lei Andrew Fan xuelei at openjdk.org
Wed Jul 19 03:59:57 UTC 2023


On Tue, 18 Jul 2023 21:54:07 GMT, Mark Powers <mpowers at openjdk.org> wrote:

>> Hi,
>> 
>> May I have the code cleanup update reviewed?  With this update, the unused code in StatusResponseManager.java will be removed.
>> 
>> Thanks,
>> Xuelei
>
> src/java.base/share/classes/sun/security/ssl/StatusResponseManager.java line 584:
> 
>> 582:     }
>> 583: 
>> 584:     static StaplingParameters processStapling(
> 
> Even though a static method is implicitly final, the final keyword does prevent subclasses from inadvertently using the same method signature.

Did you mean a subclass can declare a static method with the same signature?  I tried an example and the compiling failed.  Did I miss something?


class Base {	
	public static void display() {
		System.out.println();
	}
	
	public void print() {
		System.out.println();
	}
}

class Derived extends Base {
//	public void display() {
         public static void display() {
		System.out.println();
	}
	
	public void print() {
		System.out.println();
        }
}




XXX: error: display() in Derived cannot override display() in Base
	public void display() {
	            ^
  overridden method is static

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14924#discussion_r1267510020



More information about the security-dev mailing list