danysk

Java lambda indentation

Nov 30th, 2020
844
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // OK
  2. someCollectionWithAVeryLongName.stream()
  3.     .map(it -> it.toString())
  4.     .flatMap(it -> Arrays.stream(it.split("\\s+")))
  5.     .collect(Collectors.toList());
  6.  
  7. // Nope
  8. someCollectionWithAVeryLongName.stream()
  9.                                .map(it -> it.toString())
  10.                                .flatMap(it -> Arrays.stream(it.split("\\s+")))
  11.                                .collect(Collectors.toList());
  12.  
RAW Paste Data