Skip to content

Commit

Permalink
Minor warnings removal; add constraints accessor in TokenBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Dec 3, 2022
1 parent 3f29ef4 commit 1016dc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,13 @@ public JacksonFeatureSet<StreamReadCapability> getReadCapabilities() {
return DEFAULT_READ_CAPABILITIES;
}

// 03-Dec-2022, tatu: Not 100% sure what to do here; could probably instead
// pass from somewhere?
@Override
public StreamReadConstraints streamReadConstraints() {
return StreamReadConstraints.defaults();
}

/*
/**********************************************************
/* Extended API beyond JsonParser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Objects;
import java.util.Queue;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
Expand Down Expand Up @@ -201,7 +202,7 @@ private static int readBufferIndex(int bufferIndex, int entryIndex) {
* Creates an instance based on the builder's configuration.
*/
@SuppressWarnings({"unchecked", "cast"})
private PrivateMaxEntriesMap(Builder<K, V> builder) {
PrivateMaxEntriesMap(Builder<K, V> builder) {
// The data store and its maximum capacity
concurrencyLevel = builder.concurrencyLevel;
capacity = new AtomicLong(Math.min(builder.capacity, MAXIMUM_CAPACITY));
Expand Down Expand Up @@ -1161,7 +1162,6 @@ public static final class Builder<K, V> {
int initialCapacity;
long capacity;

@SuppressWarnings("unchecked")
public Builder() {
capacity = -1;
initialCapacity = DEFAULT_INITIAL_CAPACITY;
Expand Down

0 comments on commit 1016dc5

Please sign in to comment.