equal
deleted
inserted
replaced
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package jdk.jfr.api.metadata.annotations; |
26 package jdk.jfr.api.metadata.annotations; |
27 |
27 |
28 import java.nio.file.Files; |
|
29 import java.nio.file.Path; |
28 import java.nio.file.Path; |
30 import java.util.Collections; |
29 import java.util.Collections; |
31 import java.util.HashMap; |
30 import java.util.HashMap; |
32 import java.util.List; |
31 import java.util.List; |
33 import java.util.Map; |
32 import java.util.Map; |
43 import jdk.jfr.StackTrace; |
42 import jdk.jfr.StackTrace; |
44 import jdk.jfr.Threshold; |
43 import jdk.jfr.Threshold; |
45 import jdk.jfr.consumer.RecordedEvent; |
44 import jdk.jfr.consumer.RecordedEvent; |
46 import jdk.jfr.consumer.RecordingFile; |
45 import jdk.jfr.consumer.RecordingFile; |
47 import jdk.test.lib.Asserts; |
46 import jdk.test.lib.Asserts; |
|
47 import jdk.test.lib.Utils; |
48 import jdk.test.lib.jfr.EventNames; |
48 import jdk.test.lib.jfr.EventNames; |
49 import jdk.test.lib.jfr.Events; |
49 import jdk.test.lib.jfr.Events; |
50 |
50 |
51 /* |
51 /* |
52 * @test |
52 * @test |
108 a.commit(); |
108 a.commit(); |
109 CousineEvent c = new CousineEvent(); |
109 CousineEvent c = new CousineEvent(); |
110 c.commit(); |
110 c.commit(); |
111 |
111 |
112 r.stop(); |
112 r.stop(); |
113 Path p = Files.createTempFile("temp", ".jfr"); |
113 Path p = Utils.createTempFile("inherited-annotations", ".jfr"); |
114 r.dump(p); |
114 r.dump(p); |
115 List<RecordedEvent> events = RecordingFile.readAllEvents(p); |
115 List<RecordedEvent> events = RecordingFile.readAllEvents(p); |
116 assertNoGrandFather(events); |
116 assertNoGrandFather(events); |
117 assertUncle(events); |
117 assertUncle(events); |
118 assertNoFather(events); |
118 assertNoFather(events); |