) o;
+ if (key == e.key) {
+ VALUE v1 = getValue();
+ VALUE v2 = e.getValue();
+ if (v1 == v2 || (v1 != null && v1.equals(v2))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public int hashCode() {
+ return hash(key) ^ (value == null ? 0 : value.hashCode());
+ }
+
+ public String toString() {
+ return String.valueOf(key) + "=" + getValue();
+ }
+
+ }
+
+ /**
+ * Add a new entry with the specified key, value and hash code to
+ * the specified bucket. It is the responsibility of this
+ * method to resize the table if appropriate.
+ *
+ * Subclass overrides this to alter the behavior of put method.
+ */
+ void addEntry(int hash, int key, VALUE value, int bucketIndex) {
+ table[bucketIndex] = new IntEntry<>(hash, key, value, table[bucketIndex]);
+ if (size++ >= threshold) {
+ resize(2 * table.length);
+ }
+ }
+
+ /**
+ * Like addEntry except that this version is used when creating entries
+ * as part of Map construction or "pseudo-construction" (cloning,
+ * deserialization). This version needn't worry about resizing the table.
+ *
+ * Subclass overrides this to alter the behavior of IntKeyMap(Map),
+ * clone, and readObject.
+ */
+ void createEntry(int hash, int key, VALUE value, int bucketIndex) {
+ table[bucketIndex] = new IntEntry<>(hash, key, value, table[bucketIndex]);
+ size++;
+ }
+
+ private abstract class HashIterator implements Iterator {
+ IntEntry next; // next entry to return
+ int expectedModCount; // For fast-fail
+ int index; // current slot
+ IntEntry current; // current entry
+
+ HashIterator() {
+ expectedModCount = modCount;
+ IntEntry[] t = table;
+ int i = t.length;
+ IntEntry n = null;
+ if (size != 0) { // advance to first entry
+ while (i > 0 && (n = t[--i]) == null)
+ ;
+ }
+ next = n;
+ index = i;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return next != null;
+ }
+
+ IntEntry nextEntry() {
+ if (modCount != expectedModCount) {
+ throw new ConcurrentModificationException();
+ }
+ IntEntry e = next;
+ if (e == null) {
+ throw new NoSuchElementException();
+ }
+
+ IntEntry n = e.next;
+ IntEntry[] t = table;
+ int i = index;
+ while (n == null && i > 0) {
+ n = t[--i];
+ }
+ index = i;
+ next = n;
+ return current = e;
+ }
+
+ @Override
+ public void remove() {
+ if (current == null) {
+ throw new IllegalStateException();
+ }
+ if (modCount != expectedModCount) {
+ throw new ConcurrentModificationException();
+ }
+ int k = current.key;
+ current = null;
+ IntKeyMap.this.removeEntryForKey(k);
+ expectedModCount = modCount;
+ }
+
+ }
+
+ private class ValueIterator extends HashIterator {
+ @Override
+ public VALUE next() {
+ return nextEntry().value;
+ }
+ }
+
+ private class KeyIterator extends HashIterator {
+ @Override
+ public Integer next() {
+ return nextEntry().key;
+ }
+
+ public int nextInt() {
+ return nextEntry().key;
+ }
+ }
+
+ private class EntryIterator extends HashIterator> {
+ @Override
+ public IntEntry next() {
+ return nextEntry();
+ }
+ }
+
+ // Subclass overrides these to alter behavior of views' iterator() method
+ Iterator newKeyIterator() {
+ return new KeyIterator();
+ }
+
+ Iterator newValueIterator() {
+ return new ValueIterator();
+ }
+
+ Iterator> newEntryIterator() {
+ return new EntryIterator();
+ }
+
+
+ // Views
+
+ private transient Set> entrySet = null;
+ transient volatile Set keySet = null;
+ transient volatile Collection values = null;
+
+ /**
+ * Returns a set view of the keys contained in this map. The set is
+ * backed by the map, so changes to the map are reflected in the set, and
+ * vice-versa. The set supports element removal, which removes the
+ * corresponding mapping from this map, via the Iterator.remove,
+ * Set.remove, removeAll, retainAll, and
+ * clear operations. It does not support the add or
+ * addAll operations.
+ *
+ * @return a set view of the keys contained in this map.
+ */
+ @Override
+ public Set keySet() {
+ Set ks = keySet;
+ return (ks != null ? ks : (keySet = new KeySet()));
+ }
+
+ private class KeySet extends AbstractSet {
+ @Override
+ public Iterator iterator() {
+ return newKeyIterator();
+ }
+
+ @Override
+ public int size() {
+ return size;
+ }
+
+ @Override
+ public boolean contains(Object o) {
+ if (o instanceof Number) {
+ return containsKey(((Number) o).intValue());
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public boolean remove(Object o) {
+ if (o instanceof Number) {
+ return IntKeyMap.this.removeEntryForKey(((Number) o).intValue()) != null;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public void clear() {
+ IntKeyMap.this.clear();
+ }
+ }
+
+ /**
+ * Returns a collection view of the values contained in this map. The
+ * collection is backed by the map, so changes to the map are reflected in
+ * the collection, and vice-versa. The collection supports element
+ * removal, which removes the corresponding mapping from this map, via the
+ * Iterator.remove, Collection.remove,
+ * removeAll, retainAll, and clear operations.
+ * It does not support the add or addAll operations.
+ *
+ * @return a collection view of the values contained in this map.
+ */
+ @Override
+ public Collection values() {
+ Collection vs = values;
+ return (vs != null ? vs : (values = new Values()));
+ }
+
+ private class Values extends AbstractCollection {
+ @Override
+ public Iterator iterator() {
+ return newValueIterator();
+ }
+
+ @Override
+ public int size() {
+ return size;
+ }
+
+ @Override
+ public boolean contains(Object o) {
+ return containsValue(o);
+ }
+
+ @Override
+ public void clear() {
+ IntKeyMap.this.clear();
+ }
+ }
+
+ @Override
+ public Set entrySet() {
+ Set> es = entrySet;
+ return (es != null ? es : (entrySet = new EntrySet()));
+ }
+
+ private class EntrySet extends AbstractSet> {
+ @Override
+ public Iterator> iterator() {
+ return newEntryIterator();
+ }
+
+ @Override
+ public boolean contains(Object o) {
+ if (!(o instanceof IntEntry)) {
+ return false;
+ }
+ IntEntry e = (IntEntry) o;
+ IntEntry candidate = getEntry(e.key);
+ return candidate != null && candidate.equals(e);
+ }
+
+ @Override
+ public boolean remove(Object o) {
+ return removeMapping(o) != null;
+ }
+
+ @Override
+ public int size() {
+ return size;
+ }
+
+ @Override
+ public void clear() {
+ IntKeyMap.this.clear();
+ }
+ }
+
+ // These methods are used when serializing HashSets
+ int capacity() {
+ return table.length;
+ }
+
+ float loadFactor() {
+ return loadFactor;
+ }
+}
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/LazyValue.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/LazyValue.java
similarity index 96%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/LazyValue.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/LazyValue.java
index 9dafb24f..4533d844 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/LazyValue.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/LazyValue.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2025 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/LongKeyMap.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/LongKeyMap.java
new file mode 100644
index 00000000..adb6518e
--- /dev/null
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/LongKeyMap.java
@@ -0,0 +1,844 @@
+/*
+ * DBeaver - Universal Database Manager
+ * Copyright (C) 2010-2026 DBeaver Corp and others
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jkiss.utils;
+
+import java.util.*;
+
+/**
+ * Map with long key.
+ */
+public class LongKeyMap implements Map {
+ /**
+ * The default initial capacity - MUST be a power of two.
+ */
+ static final int DEFAULT_INITIAL_CAPACITY = 16;
+
+ /**
+ * The maximum capacity, used if a higher value is implicitly specified
+ * by either of the constructors with arguments.
+ * MUST be a power of two <= 1<<30.
+ */
+ static final int MAXIMUM_CAPACITY = 1 << 30;
+
+ /**
+ * The load fast used when none specified in constructor.
+ **/
+ static final float DEFAULT_LOAD_FACTOR = 0.75f;
+
+ /**
+ * The table, resized as necessary. Length MUST Always be a power of two.
+ */
+ transient LongEntry[] table;
+
+ /**
+ * The number of key-value mappings contained in this identity hash map.
+ */
+ transient int size;
+
+ /**
+ * The next size value at which to resize (capacity * load factor).
+ *
+ * @serial
+ */
+ int threshold;
+
+ /**
+ * The load factor for the hash table.
+ *
+ * @serial
+ */
+ final float loadFactor;
+
+ /**
+ * The number of times this LongKeyMap has been structurally modified
+ */
+ transient volatile int modCount;
+
+ /**
+ * Constructs an empty LongKeyMap with the specified initial
+ * capacity and load factor.
+ *
+ * @param initialCapacity The initial capacity.
+ * @param loadFactor The load factor.
+ * @throws IllegalArgumentException if the initial capacity is negative
+ * or the load factor is nonpositive.
+ */
+ public LongKeyMap(int initialCapacity, float loadFactor) {
+ if (initialCapacity < 0) {
+ throw new IllegalArgumentException("Illegal initial capacity: " +
+ initialCapacity);
+ }
+ if (initialCapacity > MAXIMUM_CAPACITY) {
+ initialCapacity = MAXIMUM_CAPACITY;
+ }
+ if (loadFactor <= 0 || Float.isNaN(loadFactor)) {
+ throw new IllegalArgumentException("Illegal load factor: " +
+ loadFactor);
+ }
+
+ // Find a power of 2 >= initialCapacity
+ int capacity = 1;
+ while (capacity < initialCapacity) {
+ capacity <<= 1;
+ }
+
+ this.loadFactor = loadFactor;
+ threshold = (int) (capacity * loadFactor);
+ table = new LongEntry[capacity];
+ }
+
+ /**
+ * Constructs an empty LongKeyMap with the specified initial
+ * capacity and the default load factor (0.75).
+ *
+ * @param initialCapacity the initial capacity.
+ * @throws IllegalArgumentException if the initial capacity is negative.
+ */
+ public LongKeyMap(int initialCapacity) {
+ this(initialCapacity, DEFAULT_LOAD_FACTOR);
+ }
+
+ /**
+ * Constructs an empty LongKeyMap with the default initial capacity
+ * (16) and the default load factor (0.75).
+ */
+ public LongKeyMap() {
+ this.loadFactor = DEFAULT_LOAD_FACTOR;
+ threshold = DEFAULT_INITIAL_CAPACITY;
+ table = new LongEntry[DEFAULT_INITIAL_CAPACITY];
+ }
+
+ static int hash(long x) {
+ int h = (int) (x ^ (x >>> 32));
+ h += ~(h << 9);
+ h ^= (h >>> 14);
+ h += (h << 4);
+ h ^= (h >>> 10);
+ return h;
+ }
+
+ /**
+ * Returns index for hash code h.
+ */
+ static int indexFor(int h, int length) {
+ return h & (length - 1);
+ }
+
+ /**
+ * Returns the number of key-value mappings in this map.
+ *
+ * @return the number of key-value mappings in this map.
+ */
+ @Override
+ public int size() {
+ return size;
+ }
+
+ /**
+ * Returns true if this map contains no key-value mappings.
+ *
+ * @return true if this map contains no key-value mappings.
+ */
+ @Override
+ public boolean isEmpty() {
+ return size == 0;
+ }
+
+ @Override
+ public boolean containsKey(Object key) {
+ return containsKey(((Number) key).longValue());
+ }
+
+ /**
+ * Returns the value to which the specified key is mapped in this identity
+ * hash map, or null if the map contains no mapping for this key.
+ * A return value of null does not necessarily indicate
+ * that the map contains no mapping for the key; it is also possible that
+ * the map explicitly maps the key to null. The
+ * containsKey method may be used to distinguish these two cases.
+ *
+ * @param key the key whose associated value is to be returned.
+ * @return the value to which this map maps the specified key, or
+ * null if the map contains no mapping for this key.
+ * @see #put(long, Object)
+ */
+ public VALUE get(long key) {
+ int hash = hash(key);
+ int i = indexFor(hash, table.length);
+ LongEntry e = table[i];
+ while (true) {
+ if (e == null) {
+ return null;
+ }
+ if (e.hash == hash && key == e.key) {
+ return e.value;
+ }
+ e = e.next;
+ }
+ }
+
+ /**
+ * Returns true if this map contains a mapping for the
+ * specified key.
+ */
+ public boolean containsKey(long key) {
+ int hash = hash(key);
+ int i = indexFor(hash, table.length);
+ LongEntry e = table[i];
+ while (e != null) {
+ if (e.hash == hash && key == e.key) {
+ return true;
+ }
+ e = e.next;
+ }
+ return false;
+ }
+
+ /**
+ * Returns the entry associated with the specified key in the
+ * LongKeyMap. Returns null if the LongKeyMap contains no mapping
+ * for this key.
+ */
+ LongEntry getEntry(long key) {
+ int hash = hash(key);
+ int i = indexFor(hash, table.length);
+ LongEntry e = table[i];
+ while (e != null && !(e.hash == hash && key == e.key)) {
+ e = e.next;
+ }
+ return e;
+ }
+
+ /**
+ * Associates the specified value with the specified key in this map.
+ * If the map previously contained a mapping for this key, the old
+ * value is replaced.
+ *
+ * @param key key with which the specified value is to be associated.
+ * @param value value to be associated with the specified key.
+ * @return previous value associated with specified key, or null
+ * if there was no mapping for key. A null return can
+ * also indicate that the LongKeyMap previously associated
+ * null with the specified key.
+ */
+ public VALUE put(long key, VALUE value) {
+ int hash = hash(key);
+ int i = indexFor(hash, table.length);
+
+ for (LongEntry e = table[i]; e != null; e = e.next) {
+ if (e.hash == hash && key == e.key) {
+ VALUE oldValue = e.value;
+ e.value = value;
+ return oldValue;
+ }
+ }
+
+ modCount++;
+ addEntry(hash, key, value, i);
+ return null;
+ }
+
+ /**
+ * This method is used instead of put by constructors and
+ * pseudoconstructors (clone, readObject). It does not resize the table,
+ * check for comodification, etc. It calls createEntry rather than
+ * addEntry.
+ */
+ private void putForCreate(long key, VALUE value) {
+ int hash = hash(key);
+ int i = indexFor(hash, table.length);
+
+ /**
+ * Look for preexisting entry for key. This will never happen for
+ * clone or deserialize. It will only happen for construction if the
+ * input Map is a sorted map whose ordering is inconsistent w/ equals.
+ */
+ for (LongEntry e = table[i]; e != null; e = e.next) {
+ if (e.hash == hash && key == e.key) {
+ e.value = value;
+ return;
+ }
+ }
+
+ createEntry(hash, key, value, i);
+ }
+
+ void putAllForCreate(LongKeyMap m) {
+ for (Iterator> i = m.entrySet().iterator(); i.hasNext(); ) {
+ LongEntry e = i.next();
+ putForCreate(e.key, e.value);
+ }
+ }
+
+ /**
+ * Rehashes the contents of this map into a new LongKeyMap instance
+ * with a larger capacity. This method is called automatically when the
+ * number of keys in this map exceeds its capacity and load factor.
+ *
+ * @param newCapacity the new capacity, MUST be a power of two.
+ */
+ void resize(int newCapacity) {
+ // assert (newCapacity & -newCapacity) == newCapacity; // power of 2
+ LongEntry[] oldTable = table;
+ int oldCapacity = oldTable.length;
+
+ // check if needed
+ if (size < threshold || oldCapacity > newCapacity) {
+ return;
+ }
+
+ LongEntry[] newTable = new LongEntry[newCapacity];
+ transfer(newTable);
+ table = newTable;
+ threshold = (int) (newCapacity * loadFactor);
+ }
+
+ /**
+ * Transfer all entries from current table to newTable.
+ */
+ void transfer(LongEntry[] newTable) {
+ LongEntry[] src = table;
+ int newCapacity = newTable.length;
+ for (int j = 0; j < src.length; j++) {
+ LongEntry e = src[j];
+ if (e != null) {
+ src[j] = null;
+ do {
+ LongEntry next = e.next;
+ int i = indexFor(e.hash, newCapacity);
+ e.next = newTable[i];
+ newTable[i] = e;
+ e = next;
+ } while (e != null);
+ }
+ }
+ }
+
+ /**
+ * Copies all of the mappings from the specified map to this map
+ * These mappings will replace any mappings that
+ * this map had for any of the keys currently in the specified map.
+ *
+ * @param t mappings to be stored in this map.
+ * @throws NullPointerException if the specified map is null.
+ */
+ public void putAll(LongKeyMap t) {
+ // Expand enough to hold t's elements without resizing.
+ int n = t.size();
+ if (n == 0) {
+ return;
+ }
+ if (n >= threshold) {
+ n = (int) (n / loadFactor + 1);
+ if (n > MAXIMUM_CAPACITY) {
+ n = MAXIMUM_CAPACITY;
+ }
+ int capacity = table.length;
+ while (capacity < n) {
+ capacity <<= 1;
+ }
+ resize(capacity);
+ }
+
+ for (Iterator> i = t.entrySet().iterator(); i.hasNext(); ) {
+ LongEntry e = i.next();
+ put(e.key, e.value);
+ }
+ }
+
+ /**
+ * Removes the mapping for this key from this map if present.
+ *
+ * @param key key whose mapping is to be removed from the map.
+ * @return previous value associated with specified key, or null
+ * if there was no mapping for key. A null return can
+ * also indicate that the map previously associated null
+ * with the specified key.
+ */
+ public VALUE remove(long key) {
+ LongEntry e = removeEntryForKey(key);
+ return (e == null ? null : e.value);
+ }
+
+ /**
+ * Removes and returns the entry associated with the specified key
+ * in the LongKeyMap. Returns null if the LongKeyMap contains no mapping
+ * for this key.
+ */
+ LongEntry removeEntryForKey(long key) {
+ int hash = hash(key);
+ int i = indexFor(hash, table.length);
+ LongEntry prev = table[i];
+ LongEntry e = prev;
+
+ while (e != null) {
+ LongEntry next = e.next;
+ if (e.hash == hash && key == e.key) {
+ modCount++;
+ size--;
+ if (prev == e) {
+ table[i] = next;
+ } else {
+ prev.next = next;
+ }
+ return e;
+ }
+ prev = e;
+ e = next;
+ }
+
+ return e;
+ }
+
+ /**
+ * Special version of remove for EntrySet.
+ */
+ LongEntry removeMapping(Object o) {
+ if (!(o instanceof LongEntry)) {
+ return null;
+ }
+
+ LongEntry entry = (LongEntry) o;
+ int hash = hash(entry.key);
+ int i = indexFor(hash, table.length);
+ LongEntry prev = table[i];
+ LongEntry e = prev;
+
+ while (e != null) {
+ LongEntry next = e.next;
+ if (e.hash == hash && e.equals(entry)) {
+ modCount++;
+ size--;
+ if (prev == e) {
+ table[i] = next;
+ } else {
+ prev.next = next;
+ }
+ return e;
+ }
+ prev = e;
+ e = next;
+ }
+
+ return e;
+ }
+
+ /**
+ * Removes all mappings from this map.
+ */
+ @Override
+ public void clear() {
+ modCount++;
+ LongEntry tab[] = table;
+ for (int i = 0; i < tab.length; i++) {
+ tab[i] = null;
+ }
+ size = 0;
+ }
+
+ /**
+ * Returns true if this map maps one or more keys to the
+ * specified value.
+ *
+ * @param value value whose presence in this map is to be tested.
+ * @return true if this map maps one or more keys to the
+ * specified value.
+ */
+ @Override
+ public boolean containsValue(Object value) {
+ if (value == null) {
+ return containsNullValue();
+ }
+
+ LongEntry tab[] = table;
+ for (int i = 0; i < tab.length; i++) {
+ for (LongEntry e = tab[i]; e != null; e = e.next) {
+ if (value.equals(e.value)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public VALUE get(Object key) {
+ return get(((Number) key).longValue());
+ }
+
+ @Override
+ public VALUE put(Long key, VALUE value) {
+ return put(key.longValue(), value);
+ }
+
+ @Override
+ public VALUE remove(Object key) {
+ return remove(((Number) key).longValue());
+ }
+
+ @Override
+ public void putAll(Map extends Long, ? extends VALUE> t) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Special-case code for containsValue with null argument
+ **/
+ private boolean containsNullValue() {
+ LongEntry tab[] = table;
+ for (int i = 0; i < tab.length; i++) {
+ for (LongEntry e = tab[i]; e != null; e = e.next) {
+ if (e.value == null) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public static class LongEntry implements Entry {
+ final long key;
+ VALUE value;
+ final int hash;
+ LongEntry next;
+
+ /**
+ * Create new entry.
+ */
+ LongEntry(int h, long k, VALUE v, LongEntry n) {
+ value = v;
+ next = n;
+ key = k;
+ hash = h;
+ }
+
+ public long getLong() {
+ return key;
+ }
+
+ @Override
+ public Long getKey() {
+ return key;
+ }
+
+ @Override
+ public VALUE getValue() {
+ return value;
+ }
+
+ @Override
+ public VALUE setValue(VALUE newValue) {
+ VALUE oldValue = value;
+ value = newValue;
+ return oldValue;
+ }
+
+ public boolean equals(Object o) {
+ if (!(o instanceof LongEntry)) {
+ return false;
+ }
+ LongEntry e = (LongEntry) o;
+ if (key == e.key) {
+ VALUE v1 = getValue();
+ VALUE v2 = e.getValue();
+ if (v1 == v2 || (v1 != null && v1.equals(v2))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public int hashCode() {
+ return hash(key) ^ (value == null ? 0 : value.hashCode());
+ }
+
+ public String toString() {
+ return String.valueOf(key) + "=" + getValue();
+ }
+
+ }
+
+ /**
+ * Add a new entry with the specified key, value and hash code to
+ * the specified bucket. It is the responsibility of this
+ * method to resize the table if appropriate.
+ *
+ * Subclass overrides this to alter the behavior of put method.
+ */
+ void addEntry(int hash, long key, VALUE value, int bucketIndex) {
+ table[bucketIndex] = new LongEntry<>(hash, key, value, table[bucketIndex]);
+ if (size++ >= threshold) {
+ resize(2 * table.length);
+ }
+ }
+
+ /**
+ * Like addEntry except that this version is used when creating entries
+ * as part of Map construction or "pseudo-construction" (cloning,
+ * deserialization). This version needn't worry about resizing the table.
+ *
+ * Subclass overrides this to alter the behavior of LongKeyMap(Map),
+ * clone, and readObject.
+ */
+ void createEntry(int hash, long key, VALUE value, int bucketIndex) {
+ table[bucketIndex] = new LongEntry<>(hash, key, value, table[bucketIndex]);
+ size++;
+ }
+
+ private abstract class HashIterator implements Iterator {
+ LongEntry next; // next entry to return
+ int expectedModCount; // For fast-fail
+ int index; // current slot
+ LongEntry current; // current entry
+
+ HashIterator() {
+ expectedModCount = modCount;
+ LongEntry[] t = table;
+ int i = t.length;
+ LongEntry n = null;
+ if (size != 0) { // advance to first entry
+ while (i > 0 && (n = t[--i]) == null)
+ ;
+ }
+ next = n;
+ index = i;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return next != null;
+ }
+
+ LongEntry nextEntry() {
+ if (modCount != expectedModCount) {
+ throw new ConcurrentModificationException();
+ }
+ LongEntry e = next;
+ if (e == null) {
+ throw new NoSuchElementException();
+ }
+
+ LongEntry n = e.next;
+ LongEntry[] t = table;
+ int i = index;
+ while (n == null && i > 0) {
+ n = t[--i];
+ }
+ index = i;
+ next = n;
+ return current = e;
+ }
+
+ @Override
+ public void remove() {
+ if (current == null) {
+ throw new IllegalStateException();
+ }
+ if (modCount != expectedModCount) {
+ throw new ConcurrentModificationException();
+ }
+ long k = current.key;
+ current = null;
+ LongKeyMap.this.removeEntryForKey(k);
+ expectedModCount = modCount;
+ }
+
+ }
+
+ private class ValueIterator extends HashIterator {
+ @Override
+ public VALUE next() {
+ return nextEntry().value;
+ }
+ }
+
+ private class KeyIterator extends HashIterator {
+ @Override
+ public Long next() {
+ return nextEntry().key;
+ }
+
+ public long nextLong() {
+ return nextEntry().key;
+ }
+ }
+
+ private class EntryIterator extends HashIterator> {
+ @Override
+ public LongEntry next() {
+ return nextEntry();
+ }
+ }
+
+ // Subclass overrides these to alter behavior of views' iterator() method
+ Iterator newKeyIterator() {
+ return new KeyIterator();
+ }
+
+ Iterator newValueIterator() {
+ return new ValueIterator();
+ }
+
+ Iterator> newEntryIterator() {
+ return new EntryIterator();
+ }
+
+
+ // Views
+
+ private transient Set> entrySet = null;
+ transient volatile Set keySet = null;
+ transient volatile Collection values = null;
+
+ /**
+ * Returns a set view of the keys contained in this map. The set is
+ * backed by the map, so changes to the map are reflected in the set, and
+ * vice-versa. The set supports element removal, which removes the
+ * corresponding mapping from this map, via the Iterator.remove,
+ * Set.remove, removeAll, retainAll, and
+ * clear operations. It does not support the add or
+ * addAll operations.
+ *
+ * @return a set view of the keys contained in this map.
+ */
+ @Override
+ public Set keySet() {
+ Set ks = keySet;
+ return (ks != null ? ks : (keySet = new KeySet()));
+ }
+
+ private class KeySet extends AbstractSet {
+ @Override
+ public Iterator iterator() {
+ return newKeyIterator();
+ }
+
+ @Override
+ public int size() {
+ return size;
+ }
+
+ @Override
+ public boolean contains(Object o) {
+ if (o instanceof Number) {
+ return containsKey(((Number) o).longValue());
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public boolean remove(Object o) {
+ if (o instanceof Number) {
+ return LongKeyMap.this.removeEntryForKey(((Number) o).longValue()) != null;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public void clear() {
+ LongKeyMap.this.clear();
+ }
+ }
+
+ /**
+ * Returns a collection view of the values contained in this map. The
+ * collection is backed by the map, so changes to the map are reflected in
+ * the collection, and vice-versa. The collection supports element
+ * removal, which removes the corresponding mapping from this map, via the
+ * Iterator.remove, Collection.remove,
+ * removeAll, retainAll, and clear operations.
+ * It does not support the add or addAll operations.
+ *
+ * @return a collection view of the values contained in this map.
+ */
+ @Override
+ public Collection values() {
+ Collection vs = values;
+ return (vs != null ? vs : (values = new Values()));
+ }
+
+ private class Values extends AbstractCollection {
+ @Override
+ public Iterator iterator() {
+ return newValueIterator();
+ }
+
+ @Override
+ public int size() {
+ return size;
+ }
+
+ @Override
+ public boolean contains(Object o) {
+ return containsValue(o);
+ }
+
+ @Override
+ public void clear() {
+ LongKeyMap.this.clear();
+ }
+ }
+
+ @Override
+ public Set entrySet() {
+ Set> es = entrySet;
+ return (es != null ? es : (entrySet = new EntrySet()));
+ }
+
+ private class EntrySet extends AbstractSet> {
+ @Override
+ public Iterator> iterator() {
+ return newEntryIterator();
+ }
+
+ @Override
+ public boolean contains(Object o) {
+ if (!(o instanceof LongEntry)) {
+ return false;
+ }
+ LongEntry e = (LongEntry) o;
+ LongEntry candidate = getEntry(e.key);
+ return candidate != null && candidate.equals(e);
+ }
+
+ @Override
+ public boolean remove(Object o) {
+ return removeMapping(o) != null;
+ }
+
+ @Override
+ public int size() {
+ return size;
+ }
+
+ @Override
+ public void clear() {
+ LongKeyMap.this.clear();
+ }
+ }
+
+ // These methods are used when serializing HashSets
+ int capacity() {
+ return table.length;
+ }
+
+ float loadFactor() {
+ return loadFactor;
+ }
+}
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/MapUtils.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/MapUtils.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/MapUtils.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/MapUtils.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/MimeType.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/MimeType.java
similarity index 98%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/MimeType.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/MimeType.java
index 8732a66e..4373849a 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/MimeType.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/MimeType.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/Pair.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/Pair.java
similarity index 92%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/Pair.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/Pair.java
index 44435f06..278bc10f 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/Pair.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/Pair.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,14 +25,12 @@ public class Pair {
private T1 first;
private T2 second;
- public Pair(T1 first, T2 second)
- {
+ public Pair(T1 first, T2 second) {
this.first = first;
this.second = second;
}
- public T1 getFirst()
- {
+ public T1 getFirst() {
return first;
}
@@ -40,8 +38,7 @@ public void setFirst(T1 first) {
this.first = first;
}
- public T2 getSecond()
- {
+ public T2 getSecond() {
return second;
}
@@ -73,6 +70,7 @@ public boolean equals(Object o) {
/**
* Compute a hash code using the hash codes of the underlying objects
+ *
* @return a hashcode of the Pair
*/
@Override
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/ReaderWriterLock.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/ReaderWriterLock.java
similarity index 95%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/ReaderWriterLock.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/ReaderWriterLock.java
index 5209d637..00300c39 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/ReaderWriterLock.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/ReaderWriterLock.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -90,10 +90,12 @@ public void exec(
boolean writing,
ExceptableConsumer action
) throws EXCEPTION {
- this.compute(writing, m -> {
- action.accept(m);
- return null;
- });
+ this.compute(
+ writing, m -> {
+ action.accept(m);
+ return null;
+ }
+ );
}
/**
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/SecurityUtils.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/SecurityUtils.java
similarity index 98%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/SecurityUtils.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/SecurityUtils.java
index e72d1efb..0c8e06c2 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/SecurityUtils.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/SecurityUtils.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -126,7 +126,8 @@ public static String generateUniqueId() {
public static String makeDigest(
String userAlias,
- String userPassword) {
+ String userPassword
+ ) {
try {
if (userPassword == null) {
userPassword = "";
@@ -142,7 +143,8 @@ public static String makeDigest(
}
public static String makeDigest(
- String userPassword) {
+ String userPassword
+ ) {
try {
MessageDigest md5 =
MessageDigest.getInstance(ECRYPTION_ALGORYTHM);
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/StandardConstants.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/StandardConstants.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/StandardConstants.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/StandardConstants.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/StringUtils.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/StringUtils.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/StringUtils.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/StringUtils.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/WSClientUtils.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/WSClientUtils.java
similarity index 97%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/WSClientUtils.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/WSClientUtils.java
index 2b5fd5b7..4c4ce11f 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/WSClientUtils.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/WSClientUtils.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2025 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ public class WSClientUtils {
private static final String HTTP_PROXY_PORT = "http.proxyPort";
private static final String HTTPS_PROXY_HOST = "https.proxyHost";
private static final String HTTPS_PROXY_PORT = "https.proxyPort";
+
@Nullable
public static List getHeaders(@Nullable Map> allHeaders, @NotNull String headerName) {
if (allHeaders == null) {
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVParser.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVParser.java
similarity index 97%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVParser.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVParser.java
index 30b7bafb..daee266d 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVParser.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVParser.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -183,8 +183,10 @@ public CSVParser(char separator, char quotechar, char escape, boolean strictQuot
* @param ignoreLeadingWhiteSpace if true, white space in front of a quote in a field is ignored
* @param ignoreQuotations if true, treat quotations like any other character.
*/
- public CSVParser(char separator, char quotechar, char escape, boolean strictQuotes, boolean ignoreLeadingWhiteSpace,
- boolean ignoreQuotations) {
+ public CSVParser(
+ char separator, char quotechar, char escape, boolean strictQuotes, boolean ignoreLeadingWhiteSpace,
+ boolean ignoreQuotations
+ ) {
this(separator, quotechar, escape, strictQuotes, ignoreLeadingWhiteSpace, ignoreQuotations, DEFAULT_NULL_FIELD_INDICATOR);
}
@@ -201,8 +203,10 @@ public CSVParser(char separator, char quotechar, char escape, boolean strictQuot
* @param nullFieldIndicator which field content will be returned as null: EMPTY_SEPARATORS, EMPTY_QUOTES,
* BOTH, NEITHER (default)
*/
- CSVParser(char separator, char quotechar, char escape, boolean strictQuotes, boolean ignoreLeadingWhiteSpace,
- boolean ignoreQuotations, CSVReaderNullFieldIndicator nullFieldIndicator) {
+ CSVParser(
+ char separator, char quotechar, char escape, boolean strictQuotes, boolean ignoreLeadingWhiteSpace,
+ boolean ignoreQuotations, CSVReaderNullFieldIndicator nullFieldIndicator
+ ) {
if (anyCharactersAreTheSame(separator, quotechar, escape)) {
throw new UnsupportedOperationException("The separator, quote, and escape characters must be different!");
}
@@ -334,7 +338,7 @@ private String[] parseLine(String nextLine, boolean multi) throws IOException {
if (pending != null) {
String s = pending;
pending = null;
- return new String[]{s};
+ return new String[] {s};
} else {
return null;
}
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVParserBuilder.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVParserBuilder.java
similarity index 94%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVParserBuilder.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVParserBuilder.java
index b60a0bfe..5ed7acd0 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVParserBuilder.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVParserBuilder.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -61,7 +61,8 @@ public CSVParserBuilder() {
* @return The CSVParserBuilder
*/
public CSVParserBuilder withSeparator(
- final char separator) {
+ final char separator
+ ) {
this.separator = separator;
return this;
}
@@ -74,7 +75,8 @@ public CSVParserBuilder withSeparator(
* @return The CSVParserBuilder
*/
public CSVParserBuilder withQuoteChar(
- final char quoteChar) {
+ final char quoteChar
+ ) {
this.quoteChar = quoteChar;
return this;
}
@@ -87,7 +89,8 @@ public CSVParserBuilder withQuoteChar(
* @return The CSVParserBuilder
*/
public CSVParserBuilder withEscapeChar(
- final char escapeChar) {
+ final char escapeChar
+ ) {
this.escapeChar = escapeChar;
return this;
}
@@ -101,7 +104,8 @@ public CSVParserBuilder withEscapeChar(
* @return The CSVParserBuilder
*/
public CSVParserBuilder withStrictQuotes(
- final boolean strictQuotes) {
+ final boolean strictQuotes
+ ) {
this.strictQuotes = strictQuotes;
return this;
}
@@ -114,7 +118,8 @@ public CSVParserBuilder withStrictQuotes(
* @return The CSVParserBuilder
*/
public CSVParserBuilder withIgnoreLeadingWhiteSpace(
- final boolean ignoreLeadingWhiteSpace) {
+ final boolean ignoreLeadingWhiteSpace
+ ) {
this.ignoreLeadingWhiteSpace = ignoreLeadingWhiteSpace;
return this;
}
@@ -126,7 +131,8 @@ public CSVParserBuilder withIgnoreLeadingWhiteSpace(
* @return The CSVParserBuilder
*/
public CSVParserBuilder withIgnoreQuotations(
- final boolean ignoreQuotations) {
+ final boolean ignoreQuotations
+ ) {
this.ignoreQuotations = ignoreQuotations;
return this;
}
@@ -144,7 +150,8 @@ public CSVParser build() {
strictQuotes,
ignoreLeadingWhiteSpace,
ignoreQuotations,
- nullFieldIndicator);
+ nullFieldIndicator
+ );
}
/**
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVReader.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVReader.java
similarity index 94%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVReader.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVReader.java
index ca607285..209da26c 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVReader.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVReader.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -105,8 +105,10 @@ public CSVReader(Reader reader, char separator, char quotechar, boolean strictQu
* @param escape the character to use for escaping a separator or quote
*/
- public CSVReader(Reader reader, char separator,
- char quotechar, char escape) {
+ public CSVReader(
+ Reader reader, char separator,
+ char quotechar, char escape
+ ) {
this(reader, separator, quotechar, escape, DEFAULT_SKIP_LINES, CSVParser.DEFAULT_STRICT_QUOTES);
}
@@ -160,10 +162,20 @@ public CSVReader(Reader reader, char separator, char quotechar, char escape, int
* @param strictQuotes sets if characters outside the quotes are ignored
* @param ignoreLeadingWhiteSpace it true, parser should ignore white space before a quote in a field
*/
- public CSVReader(Reader reader, char separator, char quotechar, char escape, int line, boolean strictQuotes, boolean ignoreLeadingWhiteSpace) {
- this(reader,
+ public CSVReader(
+ Reader reader,
+ char separator,
+ char quotechar,
+ char escape,
+ int line,
+ boolean strictQuotes,
+ boolean ignoreLeadingWhiteSpace
+ ) {
+ this(
+ reader,
line,
- new CSVParser(separator, quotechar, escape, strictQuotes, ignoreLeadingWhiteSpace));
+ new CSVParser(separator, quotechar, escape, strictQuotes, ignoreLeadingWhiteSpace)
+ );
}
/**
@@ -178,10 +190,14 @@ public CSVReader(Reader reader, char separator, char quotechar, char escape, int
* @param ignoreLeadingWhiteSpace if true, parser should ignore white space before a quote in a field
* @param keepCR if true the reader will keep carriage returns, otherwise it will discard them.
*/
- public CSVReader(Reader reader, char separator, char quotechar, char escape, int line, boolean strictQuotes,
- boolean ignoreLeadingWhiteSpace, boolean keepCR) {
- this(reader, line,
- new CSVParser(separator, quotechar, escape, strictQuotes, ignoreLeadingWhiteSpace), keepCR, DEFAULT_VERIFY_READER);
+ public CSVReader(
+ Reader reader, char separator, char quotechar, char escape, int line, boolean strictQuotes,
+ boolean ignoreLeadingWhiteSpace, boolean keepCR
+ ) {
+ this(
+ reader, line,
+ new CSVParser(separator, quotechar, escape, strictQuotes, ignoreLeadingWhiteSpace), keepCR, DEFAULT_VERIFY_READER
+ );
}
/**
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVReaderBuilder.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVReaderBuilder.java
similarity index 82%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVReaderBuilder.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVReaderBuilder.java
index e576f6e0..a93fc5cb 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVReaderBuilder.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVReaderBuilder.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -58,18 +58,19 @@ public class CSVReaderBuilder {
private boolean verifyReader = CSVReader.DEFAULT_VERIFY_READER;
private CSVReaderNullFieldIndicator nullFieldIndicator = CSVReaderNullFieldIndicator.NEITHER;
- /**
- * Sets the reader to an underlying CSV source.
- *
- * @param reader the reader to an underlying CSV source.
- */
- public CSVReaderBuilder(
- final Reader reader) {
- if (reader == null) {
- throw new IllegalArgumentException("Reader may not be null");
- }
- this.reader = reader;
- }
+ /**
+ * Sets the reader to an underlying CSV source.
+ *
+ * @param reader the reader to an underlying CSV source.
+ */
+ public CSVReaderBuilder(
+ final Reader reader
+ ) {
+ if (reader == null) {
+ throw new IllegalArgumentException("Reader may not be null");
+ }
+ this.reader = reader;
+ }
/**
* Used by unit tests.
@@ -99,16 +100,17 @@ protected CSVParser getCsvParser() {
}
/**
- * Sets the line number to skip for start reading.
+ * Sets the line number to skip for start reading.
*
* @param skipLines the line number to skip for start reading.
* @return the CSVReaderBuilder with skipLines set.
- */
+ */
public CSVReaderBuilder withSkipLines(
- final int skipLines) {
- this.skipLines = (skipLines <= 0 ? 0 : skipLines);
- return this;
- }
+ final int skipLines
+ ) {
+ this.skipLines = (skipLines <= 0 ? 0 : skipLines);
+ return this;
+ }
/**
@@ -116,23 +118,25 @@ public CSVReaderBuilder withSkipLines(
*
* @param csvParser the parser to use to parse the input.
* @return the CSVReaderBuilder with the CSVParser set.
- */
+ */
public CSVReaderBuilder withCSVParser(
- final /*@Nullable*/ CSVParser csvParser) {
- this.csvParser = csvParser;
- return this;
- }
+ final /*@Nullable*/ CSVParser csvParser
+ ) {
+ this.csvParser = csvParser;
+ return this;
+ }
/**
* Creates the CSVReader.
+ *
* @return the CSVReader based on the set criteria.
*/
public CSVReader build() {
- final CSVParser parser =
- (csvParser != null ? csvParser : parserBuilder.withFieldAsNull(nullFieldIndicator).build());
- return new CSVReader(reader, skipLines, parser, keepCR, verifyReader);
- }
+ final CSVParser parser =
+ (csvParser != null ? csvParser : parserBuilder.withFieldAsNull(nullFieldIndicator).build());
+ return new CSVReader(reader, skipLines, parser, keepCR, verifyReader);
+ }
/**
* Sets if the reader will keep or discard carriage returns.
@@ -156,10 +160,10 @@ protected boolean keepCarriageReturn() {
/**
* Checks to see if the CSVReader should verify the reader state before reads or not.
- *
+ *
* This should be set to false if you are using some form of asynchronous reader (like readers created
* by the java.nio.* classes).
- *
+ *
* The default value is true.
*
* @param verifyReader true if CSVReader should verify reader before each read, false otherwise.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVReaderNullFieldIndicator.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVReaderNullFieldIndicator.java
similarity index 96%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVReaderNullFieldIndicator.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVReaderNullFieldIndicator.java
index 0966ebd6..03825f3b 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVReaderNullFieldIndicator.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVReaderNullFieldIndicator.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVWriter.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVWriter.java
similarity index 98%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVWriter.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVWriter.java
index 0afb172d..c7dd0ae7 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/CSVWriter.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/CSVWriter.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -235,7 +235,8 @@ public void writeNext(String[] nextLine) {
* @return true if the line contains the quote, escape, separator, newline or return.
*/
private boolean stringContainsSpecialCharacters(String line) {
- return line.indexOf(quotechar) != -1 || line.indexOf(escapechar) != -1 || line.indexOf(separator) != -1 || line.contains(DEFAULT_LINE_END) || line.contains("\r");
+ return line.indexOf(quotechar) != -1 || line.indexOf(escapechar) != -1 || line.indexOf(separator) != -1 || line.contains(
+ DEFAULT_LINE_END) || line.contains("\r");
}
/**
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/LineReader.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/LineReader.java
similarity index 97%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/csv/LineReader.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/LineReader.java
index d47e5a5c..98664059 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/csv/LineReader.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/csv/LineReader.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/function/ThrowableConsumer.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/function/ThrowableConsumer.java
similarity index 93%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/function/ThrowableConsumer.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/function/ThrowableConsumer.java
index 3cc4248d..521edec2 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/function/ThrowableConsumer.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/function/ThrowableConsumer.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2025 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/function/ThrowableFunction.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/function/ThrowableFunction.java
similarity index 95%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/function/ThrowableFunction.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/function/ThrowableFunction.java
index 52273e4c..2a876a3f 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/function/ThrowableFunction.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/function/ThrowableFunction.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/function/ThrowableSupplier.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/function/ThrowableSupplier.java
similarity index 95%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/function/ThrowableSupplier.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/function/ThrowableSupplier.java
index 952472a3..712c707c 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/function/ThrowableSupplier.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/function/ThrowableSupplier.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2025 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/io/BOMInputStream.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/io/BOMInputStream.java
similarity index 98%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/io/BOMInputStream.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/io/BOMInputStream.java
index 84b398f4..5a25f91f 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/io/BOMInputStream.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/io/BOMInputStream.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/io/ByteOrderMark.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/io/ByteOrderMark.java
similarity index 97%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/io/ByteOrderMark.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/io/ByteOrderMark.java
index 67c93bbf..46ea933b 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/io/ByteOrderMark.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/io/ByteOrderMark.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2025 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/oauth/IOAuthHandler.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/IOAuthHandler.java
similarity index 93%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/oauth/IOAuthHandler.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/IOAuthHandler.java
index 7dc3d000..8252a1df 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/oauth/IOAuthHandler.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/IOAuthHandler.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2025 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/oauth/OAuthConstants.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/OAuthConstants.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/oauth/OAuthConstants.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/OAuthConstants.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/oauth/OAuthTokens.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/OAuthTokens.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/oauth/OAuthTokens.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/OAuthTokens.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/oauth/OAuthUtils.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/OAuthUtils.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/oauth/OAuthUtils.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/OAuthUtils.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/oauth/client/OAuthClientCredentialsHandler.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/client/OAuthClientCredentialsHandler.java
similarity index 93%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/oauth/client/OAuthClientCredentialsHandler.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/client/OAuthClientCredentialsHandler.java
index 46a04e7d..b39e0f67 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/oauth/client/OAuthClientCredentialsHandler.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/client/OAuthClientCredentialsHandler.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2025 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -53,9 +53,9 @@ public class OAuthClientCredentialsHandler implements IOAuthHandler {
/**
* Constructs an OAuthHandler with required parameters.
*
- * @param clientId the OAuth client ID
- * @param secretId the OAuth client secret (nullable for PKCE-only flows)
- * @param authUrl the authorization endpoint URL
+ * @param clientId the OAuth client ID
+ * @param secretId the OAuth client secret (nullable for PKCE-only flows)
+ * @param authUrl the authorization endpoint URL
*/
public OAuthClientCredentialsHandler(
@NotNull String clientId,
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/oauth/client/OAuthRequestPostBuilder.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/client/OAuthRequestPostBuilder.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/oauth/client/OAuthRequestPostBuilder.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/client/OAuthRequestPostBuilder.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/oauth/code/IOAuthCodeResponseHandler.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/code/IOAuthCodeResponseHandler.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/oauth/code/IOAuthCodeResponseHandler.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/code/IOAuthCodeResponseHandler.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/oauth/code/OAuthCodeHandler.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/code/OAuthCodeHandler.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/oauth/code/OAuthCodeHandler.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/code/OAuthCodeHandler.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/oauth/code/OAuthCodeResponseHandler.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/code/OAuthCodeResponseHandler.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/oauth/code/OAuthCodeResponseHandler.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/code/OAuthCodeResponseHandler.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/oauth/code/OAuthRequestURLBuilder.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/code/OAuthRequestURLBuilder.java
similarity index 99%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/oauth/code/OAuthRequestURLBuilder.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/code/OAuthRequestURLBuilder.java
index 4cb26aaa..1ca1cc1c 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/oauth/code/OAuthRequestURLBuilder.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/oauth/code/OAuthRequestURLBuilder.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2025 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/process/ProcessNameUtils.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/process/ProcessNameUtils.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/process/ProcessNameUtils.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/process/ProcessNameUtils.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/HttpTransportInvocationHandler.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/HttpTransportInvocationHandler.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/rest/HttpTransportInvocationHandler.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/HttpTransportInvocationHandler.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RequestHandlerFactory.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RequestHandlerFactory.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/rest/RequestHandlerFactory.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RequestHandlerFactory.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RequestMapping.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RequestMapping.java
similarity index 95%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/rest/RequestMapping.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RequestMapping.java
index 669deb6c..6a1abf6f 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RequestMapping.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RequestMapping.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RequestParameter.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RequestParameter.java
similarity index 95%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/rest/RequestParameter.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RequestParameter.java
index aa9b2ed5..704d4faa 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RequestParameter.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RequestParameter.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestClient.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestClient.java
similarity index 100%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestClient.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestClient.java
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestEndpointResolver.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestEndpointResolver.java
similarity index 94%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestEndpointResolver.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestEndpointResolver.java
index eba77f2b..e1a18c35 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestEndpointResolver.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestEndpointResolver.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestEndpointResolverAdvanced.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestEndpointResolverAdvanced.java
similarity index 96%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestEndpointResolverAdvanced.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestEndpointResolverAdvanced.java
index 1b0b3df8..3f68e128 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestEndpointResolverAdvanced.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestEndpointResolverAdvanced.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestProxy.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestProxy.java
similarity index 93%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestProxy.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestProxy.java
index 097f5988..9b3b843c 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestProxy.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestProxy.java
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2024 DBeaver Corp and others
+ * Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestServer.java b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestServer.java
similarity index 99%
rename from modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestServer.java
rename to modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestServer.java
index 6eb84e47..e0bf71b6 100644
--- a/modules/org.jkiss.utils/src/org/jkiss/utils/rest/RestServer.java
+++ b/modules/org.jkiss.utils/src/main/java/org/jkiss/utils/rest/RestServer.java
@@ -37,11 +37,7 @@
import java.net.InetSocketAddress;
import java.net.URI;
import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.concurrent.*;
import java.util.function.Predicate;
import java.util.logging.Level;
@@ -204,7 +200,8 @@ private static RequestHandler createHandler(
return handlerFactory.createHandler(controller.cls, controller.instance, gson, filter, landingPage);
}
- private static final Type REQUEST_TYPE = new TypeToken