We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
spotless/lib/src/main/java/com/diffplug/spotless/java/ImportOrderStep.java
Lines 56 to 59 in 995b6a9
It shouldn't read the file until its state is calculated. First discovered in #217.
I suspect the easiest fix would be to make getImportOrder return a lazy Supplier<List<String>>.
getImportOrder
Supplier<List<String>>
...and then memoize the result of this supplier somehow.
FormatterStep.createLazy handles the memoization for you.
FormatterStep.createLazy
Fix #218 - `ImportOrderStep.createFromFile` is now lazy.
Cheers for tackling this, @nedtwigg. :)
Published in 3.18.0
Activity
jbduncan commentedon Mar 7, 2018
I suspect the easiest fix would be to make
getImportOrder
return a lazySupplier<List<String>>
.jbduncan commentedon Mar 7, 2018
...and then memoize the result of this supplier somehow.
nedtwigg commentedon Mar 8, 2018
FormatterStep.createLazy
handles the memoization for you.Fix #218 - `ImportOrderStep.createFromFile` is now lazy.
jbduncan commentedon Feb 11, 2019
Cheers for tackling this, @nedtwigg. :)
nedtwigg commentedon Feb 12, 2019
Published in 3.18.0