private static MonetaryRoundingsSingletonSpi monetaryRoundingsSingletonSpi() {
        try {
            return Optional.ofNullable(Bootstrap
                    .getService(MonetaryRoundingsSingletonSpi.class))
                    .orElseGet(DefaultMonetaryRoundingsSingletonSpi::new);
        } catch (Exception e) {
            Logger.getLogger(Monetary.class.getName())
                    .log(Level.SEVERE, "Failed to load MonetaryCurrenciesSingletonSpi, using default.", e);
            return new DefaultMonetaryRoundingsSingletonSpi();
        }
    }
private static MonetaryRoundingsSingletonSpi monetaryRoundingsSingletonSpi ( ) { try { return Optional . ofNullable ( Bootstrap . getService ( MonetaryRoundingsSingletonSpi . class ) ) . orElseGet ( DefaultMonetaryRoundingsSingletonSpi :: new ) ; } catch ( Exception e ) { Logger . getLogger ( Monetary . class . getName ( ) ) . log ( Level . SEVERE , "Failed to load MonetaryCurrenciesSingletonSpi, using default." , e ) ; return new DefaultMonetaryRoundingsSingletonSpi ( ) ; } }
The used {@link javax.money.spi.MonetaryCurrenciesSingletonSpi} instance.