AsciidocFX
AsciidocFX copied to clipboard
Code quality - drop while(true)
trafficstars
Fix #524 and added comments on the loops where a while(true) seemed legitimate to justify them.
Note that:
- The file watcher now resets right after polling to avoid useless consecutive calls
- In
FileBrowseServiceImpl.searchDownAndSelect, I replaced the use of previous by next inif (Objects.isNull(searchFoundItem))as I could not make sense of the code the way it was.
Other than that, old and new code should be strictly equivalent
Updated the while loop to a for in DirectoryServiceImpl as it is more accurate to what the code does.
Also removed the class' constructor as well as some attributes that were not used. Dropped a lambda instantiation as the raw value it returned could be used instead and avoided the use of a stream to create a list where the list could directly be instantiated instead.