@@ -64,7 +64,7 @@ final class DisplayableSupport {
64
64
private static final DefaultProcessor DEFAULT_PROCESSOR = new DefaultProcessor ();
65
65
private static final DefaultFormat DEFAULT_FORMAT = new DefaultFormat ();
66
66
67
- private static final FormatProcessor [] FORMAT_PROCESSORS = new FormatProcessor [] {
67
+ private static final FormatProcessor <? extends Annotation > [] FORMAT_PROCESSORS = new FormatProcessor <?> [] {
68
68
new TimestampFormatProcessor (),
69
69
new TimespanFormatProcessor (),
70
70
new MemoryAddressFormatProcessor (),
@@ -79,7 +79,7 @@ final class DisplayableSupport {
79
79
new RecordedClassLoaderProcessor ()
80
80
};
81
81
82
- private static final Set <String > PRIMITIVE_NUMERIC = new HashSet (Arrays .asList (new String [] {
82
+ private static final Set <String > PRIMITIVE_NUMERIC = new HashSet <> (Arrays .asList (new String [] {
83
83
"byte" , "short" , "int" , "long" , "char" , "float" , "double" // char?
84
84
}));
85
85
@@ -164,7 +164,7 @@ static JFRDataDescriptor getDataDescriptor(ValueDescriptor descriptor) {
164
164
}
165
165
166
166
167
- static Comparable getDisplayValue (JFRJDK11Event event , ValueDescriptor descriptor ) {
167
+ static Comparable <?> getDisplayValue (JFRJDK11Event event , ValueDescriptor descriptor ) {
168
168
// List<AnnotationElement> annotations = descriptor.getAnnotationElements();
169
169
// for (AnnotationElement annotation : annotations) System.err.println(">>> ANNOTATION " + annotation.getTypeName() + " - " + annotation.getValues());
170
170
// System.err.println(">>> ContentType " + descriptor.getContentType());
@@ -232,7 +232,7 @@ Format createFormat(ValueDescriptor descriptor, A annotation) {
232
232
return null ;
233
233
}
234
234
235
- Comparable createValue (JFRJDK11Event event , ValueDescriptor descriptor , A annotation ) throws JFRPropertyNotAvailableException {
235
+ Comparable <?> createValue (JFRJDK11Event event , ValueDescriptor descriptor , A annotation ) throws JFRPropertyNotAvailableException {
236
236
Object value = event .getValue (descriptor .getName ());
237
237
return value instanceof Comparable ? (Comparable )value :
238
238
value != null ? value .toString () : null ;
@@ -258,7 +258,7 @@ Format createFormat(ValueDescriptor descriptor, Timestamp annotation) {
258
258
}
259
259
260
260
@ Override
261
- Comparable createValue (JFRJDK11Event event , ValueDescriptor descriptor , Timestamp annotation ) throws JFRPropertyNotAvailableException {
261
+ Comparable <?> createValue (JFRJDK11Event event , ValueDescriptor descriptor , Timestamp annotation ) throws JFRPropertyNotAvailableException {
262
262
return event .getInstant (descriptor .getName ());
263
263
}
264
264
@@ -290,7 +290,7 @@ Format createFormat(ValueDescriptor descriptor, Timespan annotation) {
290
290
}
291
291
292
292
@ Override
293
- Comparable createValue (JFRJDK11Event event , ValueDescriptor descriptor , Timespan annotation ) throws JFRPropertyNotAvailableException {
293
+ Comparable <?> createValue (JFRJDK11Event event , ValueDescriptor descriptor , Timespan annotation ) throws JFRPropertyNotAvailableException {
294
294
return event .getDuration (descriptor .getName ());
295
295
}
296
296
@@ -470,7 +470,7 @@ Format createFormat() {
470
470
return null ;
471
471
}
472
472
473
- Comparable createValue (JFRJDK11Event event , ValueDescriptor descriptor ) throws JFRPropertyNotAvailableException {
473
+ Comparable <?> createValue (JFRJDK11Event event , ValueDescriptor descriptor ) throws JFRPropertyNotAvailableException {
474
474
Object value = event .getValue (descriptor .getName ());
475
475
return value instanceof Comparable ? (Comparable )value :
476
476
value == null ? "" : value .toString ();
@@ -535,12 +535,12 @@ String createValue(JFRJDK11Event event, ValueDescriptor descriptor) throws JFRPr
535
535
536
536
private static class DefaultProcessor {
537
537
538
- Comparable createValue (JFRJDK11Event event , ValueDescriptor descriptor ) throws JFRPropertyNotAvailableException {
538
+ Comparable <?> createValue (JFRJDK11Event event , ValueDescriptor descriptor ) throws JFRPropertyNotAvailableException {
539
539
Object value = event .getValue (descriptor .getName ());
540
540
541
541
if (value == null ) return null ;
542
542
543
- if (value instanceof Comparable ) return (Comparable )value ;
543
+ if (value instanceof Comparable ) return (Comparable <?> )value ;
544
544
545
545
return value .toString (); // Also includes RecordedObject which needs to be handled separately!
546
546
}
0 commit comments