View Javadoc
1   /*
2   SuperFinalize
3   
4   
5   */
6   
7   package com.puppycrawl.tools.checkstyle.checks.coding.superfinalize;
8   
9   public class InputSuperFinalizeMethodReference extends ClassWithFinalizer {
10  
11      public interface CheckedConsumer<E extends Throwable> {
12          void get() throws E;
13      }
14  
15      @Override
16      protected void finalize() throws Throwable {
17          CheckedConsumer<Throwable> r = super::finalize;
18          r.get();
19      }
20  }
21  
22  class ClassWithFinalizer {
23      protected void finalize() throws Throwable { // violation
24      }
25  }