blob: 299a9930215adc8fdbaacf49adb82d4eee86b429 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package com.yahoo.container.plugin.classanalysis.sampleclasses;
import com.google.common.collect.ImmutableList;
import java.util.List;
/**
* Input for class analysis test verifying Java 15 records,
* plus Java 16 pattern matching for instanceof.
*
* @author gjoranv
*/
public record RecordWithOverride(List<Byte> list) {
public RecordWithOverride {
if (list instanceof ImmutableList<Byte> l) {
throw new IllegalArgumentException(l.toString());
}
}
}
|