Skip to content
Snippets Groups Projects
Commit b65b71f6 authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

utility classes changed to final

marked error in CRAQ as seen, because this will never cause an error
parent 5c7fee66
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ import org.slf4j.LoggerFactory; ...@@ -14,7 +14,7 @@ import org.slf4j.LoggerFactory;
import teetime.framework.FileSearcher; import teetime.framework.FileSearcher;
public class PipeFactoryLoader { public final class PipeFactoryLoader {
private static final Logger LOGGER = LoggerFactory.getLogger(PipeFactoryLoader.class); private static final Logger LOGGER = LoggerFactory.getLogger(PipeFactoryLoader.class);
......
...@@ -3,7 +3,7 @@ package teetime.util; ...@@ -3,7 +3,7 @@ package teetime.util;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
public class ListUtil { public final class ListUtil {
private ListUtil() { private ListUtil() {
// utility class // utility class
......
...@@ -22,7 +22,7 @@ import java.util.List; ...@@ -22,7 +22,7 @@ import java.util.List;
* *
* @since 1.10 * @since 1.10
*/ */
public class MathUtil { public final class MathUtil {
private MathUtil() { private MathUtil() {
// utility class // utility class
......
...@@ -2,7 +2,7 @@ package teetime.util.list; ...@@ -2,7 +2,7 @@ package teetime.util.list;
public class CommittableResizableArrayQueue<T> implements CommittableQueue<T> { public class CommittableResizableArrayQueue<T> implements CommittableQueue<T> {
private final int MIN_CAPACITY; // private final int MIN_CAPACITY;
private final ArrayPool<T> arrayPool; private final ArrayPool<T> arrayPool;
private T[] elements; private T[] elements;
...@@ -13,11 +13,11 @@ public class CommittableResizableArrayQueue<T> implements CommittableQueue<T> { ...@@ -13,11 +13,11 @@ public class CommittableResizableArrayQueue<T> implements CommittableQueue<T> {
public CommittableResizableArrayQueue(final Object emptyObject, final int initialCapacity) { public CommittableResizableArrayQueue(final Object emptyObject, final int initialCapacity) {
super(); super();
this.arrayPool = new ArrayPool<T>(); this.arrayPool = new ArrayPool<T>();
this.MIN_CAPACITY = initialCapacity + 1; // this.MIN_CAPACITY = initialCapacity + 1;
this.elements = this.arrayPool.acquire(initialCapacity + 1); this.elements = this.arrayPool.acquire(initialCapacity + 1);
this.elements[0] = (T) emptyObject; // optimization: avoids the use of an index out-of-bounds check this.elements[0] = (T) emptyObject; // optimization: avoids the use of an index out-of-bounds check
this.clear(); this.clear(); // NOPMD
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment