update to OpenJDK 21, Grdle 8.4-rc-1
This commit is contained in:
parent
7d025d5002
commit
36bfe25796
37 changed files with 104 additions and 156 deletions
|
@ -4,9 +4,9 @@ plugins {
|
||||||
id "pmd"
|
id "pmd"
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'signing'
|
id 'signing'
|
||||||
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
|
id "io.github.gradle-nexus.publish-plugin" version "2.0.0-rc-1"
|
||||||
id "com.github.spotbugs" version "5.0.14"
|
id "com.github.spotbugs" version "6.0.0-beta.3"
|
||||||
id "org.cyclonedx.bom" version "1.7.2"
|
id "org.cyclonedx.bom" version "1.7.4"
|
||||||
id "org.xbib.gradle.plugin.asciidoctor" version "3.0.0"
|
id "org.xbib.gradle.plugin.asciidoctor" version "3.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ subprojects {
|
||||||
apply from: rootProject.file('gradle/documentation/asciidoc.gradle')
|
apply from: rootProject.file('gradle/documentation/asciidoc.gradle')
|
||||||
apply from: rootProject.file('gradle/quality/checkstyle.gradle')
|
apply from: rootProject.file('gradle/quality/checkstyle.gradle')
|
||||||
apply from: rootProject.file('gradle/quality/pmd.gradle')
|
apply from: rootProject.file('gradle/quality/pmd.gradle')
|
||||||
apply from: rootProject.file('gradle/quality/spotbugs.gradle')
|
//apply from: rootProject.file('gradle/quality/spotbugs.gradle')
|
||||||
apply from: rootProject.file('gradle/publish/maven.gradle')
|
apply from: rootProject.file('gradle/publish/maven.gradle')
|
||||||
}
|
}
|
||||||
apply from: rootProject.file('gradle/publish/sonatype.gradle')
|
apply from: rootProject.file('gradle/publish/sonatype.gradle')
|
||||||
|
|
|
@ -8,6 +8,9 @@ public final class Token {
|
||||||
|
|
||||||
boolean isReady;
|
boolean isReady;
|
||||||
|
|
||||||
|
public Token() {
|
||||||
|
}
|
||||||
|
|
||||||
public void reset() {
|
public void reset() {
|
||||||
content.setLength(0);
|
content.setLength(0);
|
||||||
type = TokenType.INVALID;
|
type = TokenType.INVALID;
|
||||||
|
|
|
@ -4,6 +4,9 @@ public class Json {
|
||||||
|
|
||||||
public static final String DEFAULT_INDENT = " ";
|
public static final String DEFAULT_INDENT = " ";
|
||||||
|
|
||||||
|
public Json() {
|
||||||
|
}
|
||||||
|
|
||||||
public static Node parse(String raw) throws ParseException {
|
public static Node parse(String raw) throws ParseException {
|
||||||
return create(new Parser(raw), 0);
|
return create(new Parser(raw), 0);
|
||||||
}
|
}
|
||||||
|
@ -20,23 +23,13 @@ public class Json {
|
||||||
|
|
||||||
public static Node create(Parser parser, int element) {
|
public static Node create(Parser parser, int element) {
|
||||||
Type type = parser.getType(element);
|
Type type = parser.getType(element);
|
||||||
switch (type) {
|
return switch (type) {
|
||||||
case NULL:
|
case NULL -> new NullLiteral();
|
||||||
return new NullLiteral();
|
case TRUE, FALSE -> new BoolLiteral(Boolean.parseBoolean(parser.getJson(element)));
|
||||||
case TRUE:
|
case NUMBER -> new NumberLiteral(parser.getJson(element));
|
||||||
case FALSE:
|
case STRING_ESCAPED, STRING -> new ParsedString(parser, element);
|
||||||
return new BoolLiteral(Boolean.parseBoolean(parser.getJson(element)));
|
case ARRAY -> new ParsedList(parser, element);
|
||||||
case NUMBER:
|
case OBJECT -> new ParsedMap(parser, element);
|
||||||
return new NumberLiteral(parser.getJson(element));
|
};
|
||||||
case STRING_ESCAPED:
|
|
||||||
case STRING:
|
|
||||||
return new ParsedString(parser, element);
|
|
||||||
case ARRAY:
|
|
||||||
return new ParsedList(parser, element);
|
|
||||||
case OBJECT:
|
|
||||||
return new ParsedMap(parser, element);
|
|
||||||
default:
|
|
||||||
throw new IllegalStateException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.xbib.datastructures.json.flat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
class JsonList<E> extends ArrayList<E> {
|
class JsonList<E> extends ArrayList<E> {
|
||||||
|
|
||||||
public JsonList() {
|
public JsonList() {
|
||||||
|
@ -12,20 +13,4 @@ class JsonList<E> extends ArrayList<E> {
|
||||||
public JsonList(List<E> values) {
|
public JsonList(List<E> values) {
|
||||||
super(values);
|
super(values);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@Override
|
|
||||||
public String toString() {
|
|
||||||
boolean append = false;
|
|
||||||
StringBuilder result = new StringBuilder("[");
|
|
||||||
for (E e : this) {
|
|
||||||
if (append) {
|
|
||||||
result.append(",");
|
|
||||||
}
|
|
||||||
result.append(e);
|
|
||||||
append = true;
|
|
||||||
}
|
|
||||||
result.append("]");
|
|
||||||
return result.toString();
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,7 @@
|
||||||
package org.xbib.datastructures.json.flat;
|
package org.xbib.datastructures.json.flat;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
class JsonMap<K, V> extends LinkedHashMap<K, V> {
|
class JsonMap<K, V> extends LinkedHashMap<K, V> {
|
||||||
|
|
||||||
/*@Override
|
|
||||||
public String toString() {
|
|
||||||
StringBuilder result = new StringBuilder("{");
|
|
||||||
int count = 0;
|
|
||||||
for (Map.Entry entry : entrySet()) {
|
|
||||||
if (count > 0) {
|
|
||||||
result.append(",");
|
|
||||||
}
|
|
||||||
String key = StringUtil.escape((String) entry.getKey());
|
|
||||||
result.append(String.format("\"%s\":%s", key, entry.getValue()));
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
result.append("}");
|
|
||||||
return result.toString();
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package org.xbib.datastructures.json.flat;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
public class ParseException extends IOException {
|
public class ParseException extends IOException {
|
||||||
|
|
||||||
public ParseException(String message) {
|
public ParseException(String message) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package org.xbib.datastructures.json.flat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
class Parser {
|
public class Parser {
|
||||||
|
|
||||||
private static final int TYPE = 0;
|
private static final int TYPE = 0;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class Parser {
|
||||||
|
|
||||||
private int element;
|
private int element;
|
||||||
|
|
||||||
Parser(String input) throws ParseException {
|
public Parser(String input) throws ParseException {
|
||||||
if (input == null) {
|
if (input == null) {
|
||||||
throw new ParseException("cannot parse null");
|
throw new ParseException("cannot parse null");
|
||||||
}
|
}
|
||||||
|
|
|
@ -854,7 +854,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
*/
|
*/
|
||||||
private TrieEntry<K, V> nextEntry(TrieEntry<K, V> node) {
|
private TrieEntry<K, V> nextEntry(TrieEntry<K, V> node) {
|
||||||
if (node == null) {
|
if (node == null) {
|
||||||
return firstEntry();
|
return trieFirstEntry();
|
||||||
} else {
|
} else {
|
||||||
return nextEntryImpl(node.predecessor, node, null);
|
return nextEntryImpl(node.predecessor, node, null);
|
||||||
}
|
}
|
||||||
|
@ -869,7 +869,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
*/
|
*/
|
||||||
private TrieEntry<K, V> nextEntryInSubtree(TrieEntry<K, V> node, TrieEntry<K, V> parentOfSubtree) {
|
private TrieEntry<K, V> nextEntryInSubtree(TrieEntry<K, V> node, TrieEntry<K, V> parentOfSubtree) {
|
||||||
if (node == null) {
|
if (node == null) {
|
||||||
return firstEntry();
|
return trieFirstEntry();
|
||||||
} else {
|
} else {
|
||||||
return nextEntryImpl(node.predecessor, node, parentOfSubtree);
|
return nextEntryImpl(node.predecessor, node, parentOfSubtree);
|
||||||
}
|
}
|
||||||
|
@ -1120,7 +1120,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
* This is implemented by going always to the left until
|
* This is implemented by going always to the left until
|
||||||
* we encounter a valid uplink. That uplink is the first key.
|
* we encounter a valid uplink. That uplink is the first key.
|
||||||
*/
|
*/
|
||||||
private TrieEntry<K, V> firstEntry() {
|
private TrieEntry<K, V> trieFirstEntry() {
|
||||||
// if Trie is empty, no first node.
|
// if Trie is empty, no first node.
|
||||||
if (isEmpty())
|
if (isEmpty())
|
||||||
return null;
|
return null;
|
||||||
|
@ -1151,7 +1151,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
* This is implemented by going always to the right until
|
* This is implemented by going always to the right until
|
||||||
* we encounter a valid uplink. That uplink is the last key.
|
* we encounter a valid uplink. That uplink is the last key.
|
||||||
*/
|
*/
|
||||||
private TrieEntry<K, V> lastEntry() {
|
private TrieEntry<K, V> trieLastEntry() {
|
||||||
return followRight(root.left);
|
return followRight(root.left);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1172,7 +1172,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public K firstKey() {
|
public K firstKey() {
|
||||||
return firstEntry().getKey();
|
return trieFirstEntry().getKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1182,7 +1182,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public K lastKey() {
|
public K lastKey() {
|
||||||
TrieEntry<K, V> entry = lastEntry();
|
TrieEntry<K, V> entry = trieLastEntry();
|
||||||
if (entry != null)
|
if (entry != null)
|
||||||
return entry.getKey();
|
return entry.getKey();
|
||||||
else
|
else
|
||||||
|
@ -1219,7 +1219,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Root is empty & we want something after empty, return first.
|
// Root is empty & we want something after empty, return first.
|
||||||
return firstEntry();
|
return trieFirstEntry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1238,9 +1238,9 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
return ceil;
|
return ceil;
|
||||||
} else if (isNullBitKey(bitIndex)) {
|
} else if (isNullBitKey(bitIndex)) {
|
||||||
if (!root.isEmpty())
|
if (!root.isEmpty())
|
||||||
return firstEntry();
|
return trieFirstEntry();
|
||||||
else if (size() > 1)
|
else if (size() > 1)
|
||||||
return nextEntry(firstEntry());
|
return nextEntry(trieFirstEntry());
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
} else if (isEqualBitKey(bitIndex)) {
|
} else if (isEqualBitKey(bitIndex)) {
|
||||||
|
@ -1280,7 +1280,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
if (!root.isEmpty())
|
if (!root.isEmpty())
|
||||||
return root;
|
return root;
|
||||||
else
|
else
|
||||||
return firstEntry();
|
return trieFirstEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
TrieEntry<K, V> found = getNearestEntryForKey(key, keyLength);
|
TrieEntry<K, V> found = getNearestEntryForKey(key, keyLength);
|
||||||
|
@ -1300,7 +1300,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
if (!root.isEmpty())
|
if (!root.isEmpty())
|
||||||
return root;
|
return root;
|
||||||
else
|
else
|
||||||
return firstEntry();
|
return trieFirstEntry();
|
||||||
} else if (isEqualBitKey(bitIndex)) {
|
} else if (isEqualBitKey(bitIndex)) {
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
@ -1623,7 +1623,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
/**
|
/**
|
||||||
* An iterator for the entries.
|
* An iterator for the entries.
|
||||||
*/
|
*/
|
||||||
abstract class NodeIterator<E> implements Iterator<E> {
|
protected abstract class NodeIterator<E> implements Iterator<E> {
|
||||||
protected int expectedModCount = modCount; // For fast-fail
|
protected int expectedModCount = modCount; // For fast-fail
|
||||||
protected TrieEntry<K, V> next; // the next node to return
|
protected TrieEntry<K, V> next; // the next node to return
|
||||||
protected TrieEntry<K, V> current; // the current entry we're on
|
protected TrieEntry<K, V> current; // the current entry we're on
|
||||||
|
@ -1690,7 +1690,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SingletonIterator implements Iterator<Map.Entry<K, V>> {
|
private class SingletonIterator implements Iterator<Map.Entry<K, V>> {
|
||||||
|
|
||||||
private final PatriciaTrie<K, V> patriciaTrie;
|
private final PatriciaTrie<K, V> patriciaTrie;
|
||||||
|
|
||||||
|
@ -1923,7 +1923,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
fixup();
|
fixup();
|
||||||
TrieEntry<K, V> e;
|
TrieEntry<K, V> e;
|
||||||
if (fromKey == null) {
|
if (fromKey == null) {
|
||||||
e = firstEntry();
|
e = trieFirstEntry();
|
||||||
} else {
|
} else {
|
||||||
e = higherEntry(fromKey);
|
e = higherEntry(fromKey);
|
||||||
}
|
}
|
||||||
|
@ -1939,7 +1939,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
fixup();
|
fixup();
|
||||||
TrieEntry<K, V> e;
|
TrieEntry<K, V> e;
|
||||||
if (toKey == null) {
|
if (toKey == null) {
|
||||||
e = lastEntry();
|
e = trieLastEntry();
|
||||||
} else {
|
} else {
|
||||||
e = lowerEntry(toKey);
|
e = lowerEntry(toKey);
|
||||||
}
|
}
|
||||||
|
@ -2122,7 +2122,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
public K firstKey() {
|
public K firstKey() {
|
||||||
TrieEntry<K, V> e;
|
TrieEntry<K, V> e;
|
||||||
if (fromKey == null) {
|
if (fromKey == null) {
|
||||||
e = firstEntry();
|
e = trieFirstEntry();
|
||||||
} else {
|
} else {
|
||||||
if (fromInclusive)
|
if (fromInclusive)
|
||||||
e = ceilingEntry(fromKey);
|
e = ceilingEntry(fromKey);
|
||||||
|
@ -2139,7 +2139,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
public K lastKey() {
|
public K lastKey() {
|
||||||
TrieEntry<K, V> e;
|
TrieEntry<K, V> e;
|
||||||
if (toKey == null) {
|
if (toKey == null) {
|
||||||
e = lastEntry();
|
e = trieLastEntry();
|
||||||
} else {
|
} else {
|
||||||
if (toInclusive)
|
if (toInclusive)
|
||||||
e = floorEntry(toKey);
|
e = floorEntry(toKey);
|
||||||
|
@ -2267,7 +2267,7 @@ public class PatriciaTrie<K, V> extends AbstractMap<K, V> implements Trie<K, V>
|
||||||
@Override
|
@Override
|
||||||
public Iterator<Map.Entry<K, V>> iterator() {
|
public Iterator<Map.Entry<K, V>> iterator() {
|
||||||
return new SubMapEntryIterator(
|
return new SubMapEntryIterator(
|
||||||
(fromKey == null ? firstEntry() : ceilingEntry(fromKey)),
|
(fromKey == null ? trieFirstEntry() : ceilingEntry(fromKey)),
|
||||||
(toKey == null ? null : ceilingEntry(toKey)));
|
(toKey == null ? null : ceilingEntry(toKey)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,12 +85,12 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public K firstKey() {
|
public K firstKey() {
|
||||||
return firstEntry().getKey();
|
return trieFirstEntry().getKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public K lastKey() {
|
public K lastKey() {
|
||||||
TrieEntry<K, V> entry = lastEntry();
|
TrieEntry<K, V> entry = trieLastEntry();
|
||||||
if (entry != null) {
|
if (entry != null) {
|
||||||
return entry.getKey();
|
return entry.getKey();
|
||||||
}
|
}
|
||||||
|
@ -655,7 +655,7 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
*/
|
*/
|
||||||
TrieEntry<K, V> nextEntry(TrieEntry<K, V> node) {
|
TrieEntry<K, V> nextEntry(TrieEntry<K, V> node) {
|
||||||
if (node == null) {
|
if (node == null) {
|
||||||
return firstEntry();
|
return trieFirstEntry();
|
||||||
} else {
|
} else {
|
||||||
return nextEntryImpl(node.predecessor, node, null);
|
return nextEntryImpl(node.predecessor, node, null);
|
||||||
}
|
}
|
||||||
|
@ -789,7 +789,7 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
* This is implemented by going always to the left until
|
* This is implemented by going always to the left until
|
||||||
* we encounter a valid uplink. That uplink is the first key.
|
* we encounter a valid uplink. That uplink is the first key.
|
||||||
*/
|
*/
|
||||||
TrieEntry<K, V> firstEntry() {
|
TrieEntry<K, V> trieFirstEntry() {
|
||||||
// if Trie is empty, no first node.
|
// if Trie is empty, no first node.
|
||||||
if (isEmpty()) {
|
if (isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -1200,7 +1200,7 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Root is empty & we want something after empty, return first.
|
// Root is empty & we want something after empty, return first.
|
||||||
return firstEntry();
|
return trieFirstEntry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TrieEntry<K, V> found = getNearestEntryForKey(key);
|
TrieEntry<K, V> found = getNearestEntryForKey(key);
|
||||||
|
@ -1218,9 +1218,9 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
return ceil;
|
return ceil;
|
||||||
} else if (bitIndex == KeyAnalyzer.NULL_BIT_KEY) {
|
} else if (bitIndex == KeyAnalyzer.NULL_BIT_KEY) {
|
||||||
if (!root.isEmpty()) {
|
if (!root.isEmpty()) {
|
||||||
return firstEntry();
|
return trieFirstEntry();
|
||||||
} else if (size() > 1) {
|
} else if (size() > 1) {
|
||||||
return nextEntry(firstEntry());
|
return nextEntry(trieFirstEntry());
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -1260,7 +1260,7 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
if (!root.isEmpty()) {
|
if (!root.isEmpty()) {
|
||||||
return root;
|
return root;
|
||||||
} else {
|
} else {
|
||||||
return firstEntry();
|
return trieFirstEntry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TrieEntry<K, V> found = getNearestEntryForKey(key);
|
TrieEntry<K, V> found = getNearestEntryForKey(key);
|
||||||
|
@ -1280,7 +1280,7 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
if (!root.isEmpty()) {
|
if (!root.isEmpty()) {
|
||||||
return root;
|
return root;
|
||||||
} else {
|
} else {
|
||||||
return firstEntry();
|
return trieFirstEntry();
|
||||||
}
|
}
|
||||||
} else if (bitIndex == KeyAnalyzer.EQUAL_BIT_KEY) {
|
} else if (bitIndex == KeyAnalyzer.EQUAL_BIT_KEY) {
|
||||||
return found;
|
return found;
|
||||||
|
@ -1436,7 +1436,7 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
* <p>This is implemented by going always to the right until
|
* <p>This is implemented by going always to the right until
|
||||||
* we encounter a valid uplink. That uplink is the last key.
|
* we encounter a valid uplink. That uplink is the last key.
|
||||||
*/
|
*/
|
||||||
private TrieEntry<K, V> lastEntry() {
|
private TrieEntry<K, V> trieLastEntry() {
|
||||||
return followRight(root.left);
|
return followRight(root.left);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1524,7 +1524,7 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
private TrieEntry<K, V> nextEntryInSubtree(TrieEntry<K, V> node,
|
private TrieEntry<K, V> nextEntryInSubtree(TrieEntry<K, V> node,
|
||||||
TrieEntry<K, V> parentOfSubtree) {
|
TrieEntry<K, V> parentOfSubtree) {
|
||||||
if (node == null) {
|
if (node == null) {
|
||||||
return firstEntry();
|
return trieFirstEntry();
|
||||||
} else {
|
} else {
|
||||||
return nextEntryImpl(node.predecessor, node, parentOfSubtree);
|
return nextEntryImpl(node.predecessor, node, parentOfSubtree);
|
||||||
}
|
}
|
||||||
|
@ -1763,7 +1763,7 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
public K firstKey() {
|
public K firstKey() {
|
||||||
Map.Entry<K, V> e;
|
Map.Entry<K, V> e;
|
||||||
if (fromKey == null) {
|
if (fromKey == null) {
|
||||||
e = firstEntry();
|
e = trieFirstEntry();
|
||||||
} else {
|
} else {
|
||||||
if (fromInclusive) {
|
if (fromInclusive) {
|
||||||
e = ceilingEntry(fromKey);
|
e = ceilingEntry(fromKey);
|
||||||
|
@ -1783,7 +1783,7 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
public K lastKey() {
|
public K lastKey() {
|
||||||
Map.Entry<K, V> e;
|
Map.Entry<K, V> e;
|
||||||
if (toKey == null) {
|
if (toKey == null) {
|
||||||
e = lastEntry();
|
e = trieLastEntry();
|
||||||
} else {
|
} else {
|
||||||
if (toInclusive) {
|
if (toInclusive) {
|
||||||
e = floorEntry(toKey);
|
e = floorEntry(toKey);
|
||||||
|
@ -1859,7 +1859,7 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
|
|
||||||
TrieEntry<K, V> first = null;
|
TrieEntry<K, V> first = null;
|
||||||
if (fromKey == null) {
|
if (fromKey == null) {
|
||||||
first = firstEntry();
|
first = trieFirstEntry();
|
||||||
} else {
|
} else {
|
||||||
first = ceilingEntry(fromKey);
|
first = ceilingEntry(fromKey);
|
||||||
}
|
}
|
||||||
|
@ -2025,7 +2025,7 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
fixup();
|
fixup();
|
||||||
Map.Entry<K, V> e;
|
Map.Entry<K, V> e;
|
||||||
if (fromKey == null) {
|
if (fromKey == null) {
|
||||||
e = firstEntry();
|
e = trieFirstEntry();
|
||||||
} else {
|
} else {
|
||||||
e = higherEntry(fromKey);
|
e = higherEntry(fromKey);
|
||||||
}
|
}
|
||||||
|
@ -2041,7 +2041,7 @@ public class PatriciaTrie<K, V> extends AbstractTrie<K, V> {
|
||||||
fixup();
|
fixup();
|
||||||
Map.Entry<K, V> e;
|
Map.Entry<K, V> e;
|
||||||
if (toKey == null) {
|
if (toKey == null) {
|
||||||
e = lastEntry();
|
e = trieLastEntry();
|
||||||
} else {
|
} else {
|
||||||
e = lowerEntry(toKey);
|
e = lowerEntry(toKey);
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,10 +57,7 @@ public class Sheet {
|
||||||
* with {@link #setAddToMemory(boolean)}=true,you should be careful with
|
* with {@link #setAddToMemory(boolean)}=true,you should be careful with
|
||||||
* the 'modifyXXX' methods,because it won't put any rows into memory -- sth
|
* the 'modifyXXX' methods,because it won't put any rows into memory -- sth
|
||||||
* like 'readonly' mode.Besides,the stream-modify api will come in soon.
|
* like 'readonly' mode.Besides,the stream-modify api will come in soon.
|
||||||
*
|
|
||||||
* @return null if there is no more rows
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static class IteratorStatus {
|
public static class IteratorStatus {
|
||||||
int rowIndex = -1;
|
int rowIndex = -1;
|
||||||
|
|
||||||
|
|
|
@ -235,7 +235,7 @@ public final class CellReferenceHelper {
|
||||||
/**
|
/**
|
||||||
* Gets the cell reference for the cell
|
* Gets the cell reference for the cell
|
||||||
*
|
*
|
||||||
* @param the cell
|
* @param c the cell
|
||||||
*/
|
*/
|
||||||
public static String getCellReference(Cell c) {
|
public static String getCellReference(Cell c) {
|
||||||
return getCellReference(c.getColumn(), c.getRow());
|
return getCellReference(c.getColumn(), c.getRow());
|
||||||
|
|
|
@ -1174,8 +1174,8 @@ public final class SheetSettings {
|
||||||
/**
|
/**
|
||||||
* Sets the print column titles for this sheet
|
* Sets the print column titles for this sheet
|
||||||
*
|
*
|
||||||
* @param firstRow the first row of the print titles
|
* @param firstCol the first row of the print titles
|
||||||
* @param lastRow the last row of the print titles
|
* @param lastCol the last row of the print titles
|
||||||
*/
|
*/
|
||||||
public void setPrintTitlesCol(int firstCol,
|
public void setPrintTitlesCol(int firstCol,
|
||||||
int lastCol) {
|
int lastCol) {
|
||||||
|
|
|
@ -292,7 +292,7 @@ public abstract class Workbook {
|
||||||
*
|
*
|
||||||
* @param index the zero based index of the reQuired sheet
|
* @param index the zero based index of the reQuired sheet
|
||||||
* @return The sheet specified by the index
|
* @return The sheet specified by the index
|
||||||
* @throws IndexOutOfBoundException when index refers to a non-existent
|
* @throws IndexOutOfBoundsException when index refers to a non-existent
|
||||||
* sheet
|
* sheet
|
||||||
*/
|
*/
|
||||||
public abstract Sheet getSheet(int index)
|
public abstract Sheet getSheet(int index)
|
||||||
|
|
|
@ -655,9 +655,6 @@ public final class WorkbookSettings {
|
||||||
* memory. Setting
|
* memory. Setting
|
||||||
* this flag involves an assessment of the trade-offs between memory usage
|
* this flag involves an assessment of the trade-offs between memory usage
|
||||||
* and performance
|
* and performance
|
||||||
*
|
|
||||||
* @return TRUE if a temporary is file is used during writing,
|
|
||||||
* FALSE otherwise
|
|
||||||
*/
|
*/
|
||||||
public void setUseTemporaryFileDuringWrite(boolean temp) {
|
public void setUseTemporaryFileDuringWrite(boolean temp) {
|
||||||
useTemporaryFileDuringWrite = temp;
|
useTemporaryFileDuringWrite = temp;
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class BaseCellFeatures {
|
||||||
/**
|
/**
|
||||||
* Copy constructor
|
* Copy constructor
|
||||||
*
|
*
|
||||||
* @param the cell to copy
|
* @param cf the cell to copy
|
||||||
*/
|
*/
|
||||||
public BaseCellFeatures(BaseCellFeatures cf) {
|
public BaseCellFeatures(BaseCellFeatures cf) {
|
||||||
// The comment stuff
|
// The comment stuff
|
||||||
|
@ -308,8 +308,6 @@ public class BaseCellFeatures {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The list of items to validate for this cell in the form of a cell range.
|
* The list of items to validate for this cell in the form of a cell range.
|
||||||
*
|
|
||||||
* @param c the list of valid values
|
|
||||||
*/
|
*/
|
||||||
public void setDataValidationRange(int col1, int r1, int col2, int r2) {
|
public void setDataValidationRange(int col1, int r1, int col2, int r2) {
|
||||||
if (dataValidation && getDVParser().extendedCellsValidation()) {
|
if (dataValidation && getDVParser().extendedCellsValidation()) {
|
||||||
|
@ -430,7 +428,7 @@ public class BaseCellFeatures {
|
||||||
/**
|
/**
|
||||||
* Use the same data validation logic as the specified cell features
|
* Use the same data validation logic as the specified cell features
|
||||||
*
|
*
|
||||||
* @param cf the data validation to reuse
|
* @param source the data validation to reuse
|
||||||
*/
|
*/
|
||||||
public void shareDataValidation(BaseCellFeatures source) {
|
public void shareDataValidation(BaseCellFeatures source) {
|
||||||
if (dataValidation) {
|
if (dataValidation) {
|
||||||
|
|
|
@ -116,7 +116,7 @@ public class DataValiditySettingsRecord extends WritableRecordData {
|
||||||
/**
|
/**
|
||||||
* Constructor called when the API creates a writable data validation
|
* Constructor called when the API creates a writable data validation
|
||||||
*
|
*
|
||||||
* @param dvsr the record copied from a writable sheet
|
* @param dvp the record copied from a writable sheet
|
||||||
*/
|
*/
|
||||||
public DataValiditySettingsRecord(DVParser dvp) {
|
public DataValiditySettingsRecord(DVParser dvp) {
|
||||||
super(Type.DV);
|
super(Type.DV);
|
||||||
|
|
|
@ -133,11 +133,6 @@ public abstract class HeaderFooter {
|
||||||
centre = createContents();
|
centre = createContents();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Copy constructor
|
|
||||||
*
|
|
||||||
* @param c the item to copy
|
|
||||||
*/
|
|
||||||
protected HeaderFooter(HeaderFooter hf) {
|
protected HeaderFooter(HeaderFooter hf) {
|
||||||
left = createContents(hf.left);
|
left = createContents(hf.left);
|
||||||
right = createContents(hf.right);
|
right = createContents(hf.right);
|
||||||
|
|
|
@ -76,7 +76,6 @@ public class RangeImpl implements Range {
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param w the workbook
|
* @param w the workbook
|
||||||
* @param es the external sheet
|
|
||||||
* @param s1 the sheet of the top left cell of the range
|
* @param s1 the sheet of the top left cell of the range
|
||||||
* @param c1 the column number of the top left cell of the range
|
* @param c1 the column number of the top left cell of the range
|
||||||
* @param r1 the row number of the top left cell of the range
|
* @param r1 the row number of the top left cell of the range
|
||||||
|
|
|
@ -49,7 +49,6 @@ public class FormulaParser {
|
||||||
* @param es a handle to the external sheet
|
* @param es a handle to the external sheet
|
||||||
* @param nt a handle to the name table
|
* @param nt a handle to the name table
|
||||||
* @param ws the workbook settings
|
* @param ws the workbook settings
|
||||||
* @param pc the parse context
|
|
||||||
* @throws FormulaException
|
* @throws FormulaException
|
||||||
*/
|
*/
|
||||||
public FormulaParser(byte[] tokens,
|
public FormulaParser(byte[] tokens,
|
||||||
|
|
|
@ -65,7 +65,7 @@ public /*final*/ class Alignment {
|
||||||
* Private constructor
|
* Private constructor
|
||||||
*
|
*
|
||||||
* @param val
|
* @param val
|
||||||
* @param string
|
* @param s
|
||||||
*/
|
*/
|
||||||
protected Alignment(int val, String s) {
|
protected Alignment(int val, String s) {
|
||||||
value = val;
|
value = val;
|
||||||
|
|
|
@ -540,7 +540,7 @@ public final class CompoundFile extends BaseCompoundFile {
|
||||||
* Gets the property set. Invoked when copying worksheets with macros.
|
* Gets the property set. Invoked when copying worksheets with macros.
|
||||||
* Simply calls the private counterpart
|
* Simply calls the private counterpart
|
||||||
*
|
*
|
||||||
* @param ps the property set name
|
* @param index the index
|
||||||
* @return the property set with the given name
|
* @return the property set with the given name
|
||||||
*/
|
*/
|
||||||
public PropertyStorage getPropertySet(int index) {
|
public PropertyStorage getPropertySet(int index) {
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class SharedErrorFormulaRecord extends BaseSharedFormulaRecord
|
||||||
*
|
*
|
||||||
* @param t the data
|
* @param t the data
|
||||||
* @param excelFile the excel biff data
|
* @param excelFile the excel biff data
|
||||||
* @param v the errorCode
|
* @param ec the errorCode
|
||||||
* @param fr the formatting records
|
* @param fr the formatting records
|
||||||
* @param es the external sheet
|
* @param es the external sheet
|
||||||
* @param nt the name table
|
* @param nt the name table
|
||||||
|
|
|
@ -285,7 +285,6 @@ public class WritableFont extends WritableFontRecord {
|
||||||
* Sets Accessor for the strike-out flag
|
* Sets Accessor for the strike-out flag
|
||||||
*
|
*
|
||||||
* @param struckout TRUE if this is a struckout font
|
* @param struckout TRUE if this is a struckout font
|
||||||
* @return the strike-out flag
|
|
||||||
* @throws WriteException, if this font is already in use elsewhere
|
* @throws WriteException, if this font is already in use elsewhere
|
||||||
*/
|
*/
|
||||||
public void setStruckout(boolean struckout) throws WriteException {
|
public void setStruckout(boolean struckout) throws WriteException {
|
||||||
|
|
|
@ -38,7 +38,6 @@ public abstract class BlankRecord extends CellValue {
|
||||||
* Consructor used when creating a label from the user API
|
* Consructor used when creating a label from the user API
|
||||||
*
|
*
|
||||||
* @param c the column
|
* @param c the column
|
||||||
* @param cont the contents
|
|
||||||
* @param r the row
|
* @param r the row
|
||||||
*/
|
*/
|
||||||
protected BlankRecord(int c, int r) {
|
protected BlankRecord(int c, int r) {
|
||||||
|
@ -72,7 +71,7 @@ public abstract class BlankRecord extends CellValue {
|
||||||
*
|
*
|
||||||
* @param c the column
|
* @param c the column
|
||||||
* @param r the row
|
* @param r the row
|
||||||
* @param b the record to copy
|
* @param br the record to copy
|
||||||
*/
|
*/
|
||||||
protected BlankRecord(int c, int r, BlankRecord br) {
|
protected BlankRecord(int c, int r, BlankRecord br) {
|
||||||
super(Type.BLANK, c, r, br);
|
super(Type.BLANK, c, r, br);
|
||||||
|
|
|
@ -122,7 +122,7 @@ public class CellXFRecord extends XFRecord {
|
||||||
/**
|
/**
|
||||||
* Sets the shrink to fit flag
|
* Sets the shrink to fit flag
|
||||||
*
|
*
|
||||||
* @param b the shrink to fit flag
|
* @param s the shrink to fit flag
|
||||||
*/
|
*/
|
||||||
public void setShrinkToFit(boolean s) throws WriteException {
|
public void setShrinkToFit(boolean s) throws WriteException {
|
||||||
if (isInitialized()) {
|
if (isInitialized()) {
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class HyperlinkRecord extends WritableRecordData {
|
||||||
/**
|
/**
|
||||||
* Constructs this object from the readable spreadsheet
|
* Constructs this object from the readable spreadsheet
|
||||||
*
|
*
|
||||||
* @param hl the hyperlink from the read spreadsheet
|
* @param h the hyperlink from the read spreadsheet
|
||||||
*/
|
*/
|
||||||
protected HyperlinkRecord(Hyperlink h, WritableSheet s) {
|
protected HyperlinkRecord(Hyperlink h, WritableSheet s) {
|
||||||
super(Type.HLINK);
|
super(Type.HLINK);
|
||||||
|
@ -191,7 +191,7 @@ public class HyperlinkRecord extends WritableRecordData {
|
||||||
* @param lastcol the last column which activates this hyperlink
|
* @param lastcol the last column which activates this hyperlink
|
||||||
* @param lastrow the last row which activates this hyperlink
|
* @param lastrow the last row which activates this hyperlink
|
||||||
* @param desc the contents of the cell which describe this hyperlink
|
* @param desc the contents of the cell which describe this hyperlink
|
||||||
* @param sheet the sheet containing the cells to be linked to
|
* @param s the sheet containing the cells to be linked to
|
||||||
* @param destcol the column number of the first destination linked cell
|
* @param destcol the column number of the first destination linked cell
|
||||||
* @param destrow the row number of the first destination linked cell
|
* @param destrow the row number of the first destination linked cell
|
||||||
* @param lastdestcol the column number of the last destination linked cell
|
* @param lastdestcol the column number of the last destination linked cell
|
||||||
|
|
|
@ -91,7 +91,7 @@ public abstract class LabelRecord extends CellValue {
|
||||||
*
|
*
|
||||||
* @param c the column
|
* @param c the column
|
||||||
* @param r the row
|
* @param r the row
|
||||||
* @param nr the record to copy
|
* @param lr the record to copy
|
||||||
*/
|
*/
|
||||||
protected LabelRecord(int c, int r, LabelRecord lr) {
|
protected LabelRecord(int c, int r, LabelRecord lr) {
|
||||||
super(Type.LABELSST, c, r, lr);
|
super(Type.LABELSST, c, r, lr);
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class MergedCellsRecord extends WritableRecordData {
|
||||||
/**
|
/**
|
||||||
* Constructs a merged cell record
|
* Constructs a merged cell record
|
||||||
*
|
*
|
||||||
* @param ws the sheet containing the merged cells
|
* @param mc the sheet containing the merged cells
|
||||||
*/
|
*/
|
||||||
protected MergedCellsRecord(ArrayList mc) {
|
protected MergedCellsRecord(ArrayList mc) {
|
||||||
super(Type.MERGEDCELLS);
|
super(Type.MERGEDCELLS);
|
||||||
|
|
|
@ -54,7 +54,6 @@ public class StyleXFRecord extends XFRecord {
|
||||||
* Sets whether or not this XF record locks the cell
|
* Sets whether or not this XF record locks the cell
|
||||||
*
|
*
|
||||||
* @param l the locked flag
|
* @param l the locked flag
|
||||||
* @throws WriteException
|
|
||||||
*/
|
*/
|
||||||
public void setLocked(boolean l) {
|
public void setLocked(boolean l) {
|
||||||
super.setXFLocked(l);
|
super.setXFLocked(l);
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class WritableFontRecord extends FontRecord {
|
||||||
* @param us the underline style
|
* @param us the underline style
|
||||||
* @param fn the name
|
* @param fn the name
|
||||||
* @param it italicised indicator
|
* @param it italicised indicator
|
||||||
* @param c the colour
|
* @param ci the colour
|
||||||
* @param ss the script style
|
* @param ss the script style
|
||||||
*/
|
*/
|
||||||
protected WritableFontRecord(String fn, int ps, int bold, boolean it,
|
protected WritableFontRecord(String fn, int ps, int bold, boolean it,
|
||||||
|
@ -47,7 +47,7 @@ public class WritableFontRecord extends FontRecord {
|
||||||
/**
|
/**
|
||||||
* Publicly available copy constructor
|
* Publicly available copy constructor
|
||||||
*
|
*
|
||||||
* @param the font to copy
|
* @param f the font to copy
|
||||||
*/
|
*/
|
||||||
protected WritableFontRecord(Font f) {
|
protected WritableFontRecord(Font f) {
|
||||||
super(f);
|
super(f);
|
||||||
|
@ -145,7 +145,7 @@ public class WritableFontRecord extends FontRecord {
|
||||||
/**
|
/**
|
||||||
* Sets the struck out flag
|
* Sets the struck out flag
|
||||||
*
|
*
|
||||||
* @param so TRUE if the font is struck out, false otherwise
|
* @param os TRUE if the font is struck out, false otherwise
|
||||||
* @throws WriteException, if this font is already in use elsewhere
|
* @throws WriteException, if this font is already in use elsewhere
|
||||||
*/
|
*/
|
||||||
protected void setStruckout(boolean os) throws WriteException {
|
protected void setStruckout(boolean os) throws WriteException {
|
||||||
|
|
|
@ -1004,7 +1004,7 @@ public class WritableWorkbookImpl extends WritableWorkbook
|
||||||
/**
|
/**
|
||||||
* Gets the index of the external sheet for the name
|
* Gets the index of the external sheet for the name
|
||||||
*
|
*
|
||||||
* @param sheetName
|
* @param index the index
|
||||||
* @return the sheet index of the external sheet index
|
* @return the sheet index of the external sheet index
|
||||||
*/
|
*/
|
||||||
public int getExternalSheetIndex(int index) {
|
public int getExternalSheetIndex(int index) {
|
||||||
|
@ -1022,7 +1022,7 @@ public class WritableWorkbookImpl extends WritableWorkbook
|
||||||
/**
|
/**
|
||||||
* Gets the index of the external sheet for the name
|
* Gets the index of the external sheet for the name
|
||||||
*
|
*
|
||||||
* @param sheetName
|
* @param index the index
|
||||||
* @return the sheet index of the external sheet index
|
* @return the sheet index of the external sheet index
|
||||||
*/
|
*/
|
||||||
public int getLastExternalSheetIndex(int index) {
|
public int getLastExternalSheetIndex(int index) {
|
||||||
|
@ -1207,7 +1207,7 @@ public class WritableWorkbookImpl extends WritableWorkbook
|
||||||
* Adds a cell to workbook wide range of cells which need adjustment
|
* Adds a cell to workbook wide range of cells which need adjustment
|
||||||
* following a row/column insert or remove
|
* following a row/column insert or remove
|
||||||
*
|
*
|
||||||
* @param f the cell to add to the list
|
* @param cv the cell to add to the list
|
||||||
*/
|
*/
|
||||||
void addRCIRCell(CellValue cv) {
|
void addRCIRCell(CellValue cv) {
|
||||||
rcirCells.add(cv);
|
rcirCells.add(cv);
|
||||||
|
@ -1339,7 +1339,7 @@ public class WritableWorkbookImpl extends WritableWorkbook
|
||||||
* range of cells, then the cell on the top left is returned. If
|
* range of cells, then the cell on the top left is returned. If
|
||||||
* the name cannot be found, null is returned
|
* the name cannot be found, null is returned
|
||||||
*
|
*
|
||||||
* @param the name of the cell/range to search for
|
* @param name the name of the cell/range to search for
|
||||||
* @return the cell in the top left of the range if found, NULL
|
* @return the cell in the top left of the range if found, NULL
|
||||||
* otherwise
|
* otherwise
|
||||||
*/
|
*/
|
||||||
|
@ -1372,7 +1372,7 @@ public class WritableWorkbookImpl extends WritableWorkbook
|
||||||
* If the named range contains a single cell, the top left and
|
* If the named range contains a single cell, the top left and
|
||||||
* bottom right cell will be the same cell
|
* bottom right cell will be the same cell
|
||||||
*
|
*
|
||||||
* @param the name of the cell/range to search for
|
* @param name the name of the cell/range to search for
|
||||||
* @return the range of cells
|
* @return the range of cells
|
||||||
*/
|
*/
|
||||||
public Range[] findByName(String name) {
|
public Range[] findByName(String name) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
group = org.xbib
|
group = org.xbib
|
||||||
name = datastructures
|
name = datastructures
|
||||||
version = 2.4.0
|
version = 3.0.0
|
||||||
|
|
||||||
org.gradle.warning.mode = all
|
org.gradle.warning.mode = all
|
||||||
|
|
|
@ -2,28 +2,24 @@
|
||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
toolchain {
|
||||||
|
languageVersion = JavaLanguageVersion.of(21)
|
||||||
|
}
|
||||||
modularity.inferModulePath.set(true)
|
modularity.inferModulePath.set(true)
|
||||||
withSourcesJar()
|
withSourcesJar()
|
||||||
withJavadocJar()
|
withJavadocJar()
|
||||||
}
|
}
|
||||||
|
|
||||||
compileJava {
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
|
||||||
}
|
|
||||||
|
|
||||||
compileTestJava {
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes('Implementation-Version': project.version)
|
attributes('Implementation-Version': project.version)
|
||||||
|
attributes('X-Java-Compiler-Version': JavaLanguageVersion.of(21).toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
|
options.fork = true
|
||||||
|
options.forkOptions.jvmArgs += ['-Duser.language=en','-Duser.country=US']
|
||||||
options.compilerArgs.add('-Xlint:all')
|
options.compilerArgs.add('-Xlint:all')
|
||||||
options.encoding = 'UTF-8'
|
options.encoding = 'UTF-8'
|
||||||
}
|
}
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,7 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-1-all.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
22
gradlew
vendored
22
gradlew
vendored
|
@ -83,7 +83,8 @@ done
|
||||||
# This is normally unused
|
# This is normally unused
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
@ -130,10 +131,13 @@ location of your Java installation."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
|
@ -141,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC2039,SC3045
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
|
@ -149,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC2039,SC3045
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
|
@ -198,11 +202,11 @@ fi
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command;
|
# Collect all arguments for the java command:
|
||||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# shell script including quotes and variable substitutions, so put them in
|
# and any embedded shellness will be escaped.
|
||||||
# double quotes to make sure that they get re-expanded; and
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# * put everything else in single quotes, so that it's not re-expanded.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
|
|
@ -15,7 +15,7 @@ pluginManagement {
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
versionCatalogs {
|
versionCatalogs {
|
||||||
libs {
|
libs {
|
||||||
version('gradle', '8.1.1')
|
version('gradle', '8.4-rc-1')
|
||||||
version('junit', '5.10.0')
|
version('junit', '5.10.0')
|
||||||
version('jackson', '2.15.2')
|
version('jackson', '2.15.2')
|
||||||
library('junit-jupiter-api', 'org.junit.jupiter', 'junit-jupiter-api').versionRef('junit')
|
library('junit-jupiter-api', 'org.junit.jupiter', 'junit-jupiter-api').versionRef('junit')
|
||||||
|
|
Loading…
Reference in a new issue