Skip to content

IGNITE-24941 Remove unused code from IgniteUtils #11976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
Expand All @@ -49,7 +50,6 @@
import org.junit.Test;

import static org.apache.ignite.internal.processors.query.calcite.TestUtils.hasSize;
import static org.apache.ignite.internal.util.IgniteUtils.map;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.CoreMatchers.nullValue;
Expand Down Expand Up @@ -83,7 +83,7 @@ public void createTableSimpleCase() {
assertThat(
ent.getFields(),
equalTo(new LinkedHashMap<>(
map(
Map.of(
"ID", Integer.class.getName(),
"VAL", String.class.getName()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ public void testPutComplexObject() throws Exception {
*/
@Test
public void testPutJsonArray() throws Exception {
Map<String, int[]> map = U.map("1", new int[] {1, 2, 3});
Map<String, int[]> map = Map.of("1", new int[] {1, 2, 3});
putObject(DEFAULT_CACHE_NAME, "1", map, Map.class.getName());
assertTrue(Map.class.isAssignableFrom(jcache().get(1).getClass()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.io.ObjectOutput;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -104,7 +105,7 @@ private QueryEntity(org.apache.ignite.cache.QueryEntity q) {

qryFlds = new LinkedHashMap<>(qryFields);

aliases = U.copyMap(q.getAliases());
aliases = new HashMap<>(q.getAliases());

Collection<org.apache.ignite.cache.QueryIndex> qryIdxs = q.getIndexes();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMetrics;
import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO;
import org.apache.ignite.internal.util.GridUnsafe;
import org.apache.ignite.internal.util.IgniteUtils;
import org.apache.ignite.internal.util.OffheapReadWriteLock;
import org.apache.ignite.internal.util.offheap.GridOffHeapOutOfMemoryException;
import org.apache.ignite.internal.util.typedef.internal.U;
Expand Down Expand Up @@ -157,7 +156,7 @@ public class PageMemoryNoStoreImpl implements PageMemory {
/** Concurrency lvl. */
private final int lockConcLvl = IgniteSystemProperties.getInteger(
IGNITE_OFFHEAP_LOCK_CONCURRENCY_LEVEL,
IgniteUtils.nearestPow2(Runtime.getRuntime().availableProcessors() * 4)
U.nearestPow2(Runtime.getRuntime().availableProcessors() * 4, true)
);

/** */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1536,15 +1536,6 @@ private void setNext(@Nullable Entry<? extends K, ? extends V> val,
this.nextStoreOperation = storeOperation;
}

/**
* Awaits a signal on flush condition.
*
* @throws IgniteInterruptedCheckedException If thread was interrupted.
*/
private void waitForFlush() throws IgniteInterruptedCheckedException {
U.await(flushCond);
}

/**
* Signals flush condition.
*/
Expand Down
Loading