Here you can find the source of isInfPositive(Duration duration)
public static boolean isInfPositive(Duration duration)
//package com.java2s; //License from project: Open Source License import java.time.Duration; import java.time.temporal.ChronoUnit; public class Main { public static final Duration INF_POSITIVE = ChronoUnit.FOREVER.getDuration(); public static boolean isInfPositive(Duration duration) { return INF_POSITIVE.equals(duration); }/*from ww w.ja v a2 s . c o m*/ }