Opened 18 months ago

Last modified 15 months ago

#23752 new enhancement

Use Java 8 features in all of Metrics' Java products (Summary ticket)

Reported by: iwakeh Owned by: metrics-team
Priority: Medium Milestone:
Component: Metrics Version:
Severity: Normal Keywords: metrics-2018
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The new features of java 8 should be used. This ticket starts collecting the features and approaches we want to use and comments should add and discuss the various topics one per comment in order to have the tickets for the various products simply refer to a comment number (if possible).

Child Tickets

TicketTypeStatusOwnerSummary
#24870enhancementnewmetrics-teamUse java 8 date-time functionality in Onionoo
#25309enhancementnewmetrics-teamUse java8 datetime classes in bridgedesc module
#25442enhancementnewmetrics-teamUse java8 datetime classes throughout o.tp.metrics.stats
#28859enhancementclosedkarstenUse Java 8 date-time functionality in ExoneraTor

Change History (12)

comment:1 Changed 18 months ago by iwakeh

Use java.time.* classes for date and time parsing and processing. Some examples are in the patches for #22428 and #22983. More can be found in the java.time package description.
(See http://www.oracle.com/technetwork/articles/java/jf14-date-time-2125367.html and https://docs.oracle.com/javase/8/docs/api/java/time/package-summary.html#package.description)

comment:2 Changed 18 months ago by iwakeh

Use java.util.stream functionality (cf. https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html#package.description).
Here we should also think about where the parallelization would be most beneficial.

comment:3 Changed 18 months ago by iwakeh

Use java 8 methods from 'Files' wherever useful, e.g., lines, walk, newBufferedReader, readAllLines etc.

Last edited 18 months ago by iwakeh (previous) (diff)

comment:4 Changed 18 months ago by iwakeh

Use java.util.Base64 instead of other classes for de/encoding.

comment:5 Changed 18 months ago by iwakeh

Use Optional wherever appropriate instead of null values.

comment:6 Changed 18 months ago by iwakeh

Make use of new functionality in java.util.concurrent (for example in #21751 together with parallel streams).

comment:7 Changed 18 months ago by iwakeh

Keywords: metrics-2017 added

comment:8 Changed 17 months ago by iwakeh

Use java.util.Optional especially for optional values in metrics-lib api, for example, the problems in #24012 et al. could have been prevented. Optional (used in the right places) provides more maintainable and readable code.

comment:9 Changed 17 months ago by iwakeh

After implementing parallelization using streams check back with the improvements achieved resemble the data from ticket #21751.

comment:10 Changed 17 months ago by iwakeh

Removed, b/c this comment was meant for #24036.

Last edited 17 months ago by iwakeh (previous) (diff)

comment:11 Changed 16 months ago by iwakeh

For Onionoo see (as one example) #16553 comment:22 following.

comment:12 Changed 15 months ago by iwakeh

Keywords: metrics-2018 added; metrics-2017 removed

Will be completed in 2018.

Note: See TracTickets for help on using tickets.