mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 11:26:42 +00:00
Javadoc and Formatting fixes. (#619)
Javadoc and Formatting fixes. Also, extremely minor code changes which have been tested. This commit is only part one of two commits that aim to fix problems with formatting in our project. In part two I will modify the Google Java Style Guide (since it closely matches our code style) for our project so there is guidance on how to format and document. * Updated PlotSquared URL * Removed plugin acronyms * Fixed a typo * Fixed grammar * Use modern block id's * Update YouTube video URL
This commit is contained in:
@ -100,7 +100,9 @@ public class SingleThreadQueueExtent extends ExtentBatchProcessorHolder implemen
|
||||
* Resets the queue.
|
||||
*/
|
||||
protected synchronized void reset() {
|
||||
if (!this.initialized) return;
|
||||
if (!this.initialized) {
|
||||
return;
|
||||
}
|
||||
if (!this.chunks.isEmpty()) {
|
||||
for (IChunk chunk : this.chunks.values()) {
|
||||
chunk.recycle();
|
||||
@ -175,9 +177,9 @@ public class SingleThreadQueueExtent extends ExtentBatchProcessorHolder implemen
|
||||
|
||||
if (Fawe.isMainThread()) {
|
||||
V result = (V)chunk.call();
|
||||
if (result == null){
|
||||
if (result == null) {
|
||||
return (V) (Future) Futures.immediateFuture(null);
|
||||
}else{
|
||||
} else {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -285,7 +287,9 @@ public class SingleThreadQueueExtent extends ExtentBatchProcessorHolder implemen
|
||||
while (!submissions.isEmpty()) {
|
||||
Future future = submissions.poll();
|
||||
try {
|
||||
while (future != null) future = (Future) future.get();
|
||||
while (future != null) {
|
||||
future = (Future) future.get();
|
||||
}
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -294,7 +298,9 @@ public class SingleThreadQueueExtent extends ExtentBatchProcessorHolder implemen
|
||||
for (int i = 0; i < overflow; i++) {
|
||||
Future first = submissions.poll();
|
||||
try {
|
||||
while (first != null) first = (Future) first.get();
|
||||
while (first != null) {
|
||||
first = (Future) first.get();
|
||||
}
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
Reference in New Issue
Block a user