Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am dariodariodario on github.
  • I am dariodariodario (https://keybase.io/dariodariodario) on keybase.
  • I have a public key ASCL9049AsppjeG61OmSCxh7QmX7H3BTmkePapMb4NqnHQo

To claim this, I am signing this object:

@dariodariodario
dariodariodario / gist:5926e97e0786995af1c806c8769c39ed
Created February 9, 2020 16:22
Is this behaviour of retry and groupBy expected in Reactor?
var flux = Flux.range(0, 10);
var errorDone = new AtomicBoolean(false);
var count = flux.groupBy(i -> i % 2).flatMap(groupedFlux -> {
if (groupedFlux.key() == 0) {
return groupedFlux.flatMap(x -> {
if (x == 4 && !errorDone.get()) {
errorDone.set(true);
return Mono.error(() -> new RuntimeException());
} else {
@dariodariodario
dariodariodario / PrettyPrint.java
Last active December 22, 2022 10:44
Handy pretty printer
package com.dariodario.experiments;
import java.lang.reflect.Field;
import java.lang.reflect.InaccessibleObjectException;
import java.util.Collection;
import java.util.Map;
import org.apache.commons.lang3.reflect.FieldUtils;
/* Pretty printer I created on the fly for testing purposes, it recursively prints an object hierarchy by showing the fields, all of them. Won't handle circular references. Java 17, Commons Lang 3 */