1
2
3
4
5
6
7
8
9 package com.puppycrawl.tools.checkstyle.checks.whitespace.nowhitespacebefore;
10
11 import java.util.function.Supplier;
12
13 public class InputNoWhitespaceBeforeMethodRef {
14 public static class SomeClass {
15 public static class Nested<V> {
16 private Nested() {
17 }
18 }
19 }
20
21 public static class Nested2<V> {
22 }
23
24 public <V> void methodName(V value) {
25 Supplier<?> t = Nested2<V> ::new;
26 Supplier<SomeClass.Nested<V>> passes = SomeClass.Nested ::new;
27 Supplier<SomeClass.Nested<V>> fails = SomeClass.Nested<V>::new;
28 }
29 }