Compare commits

..

12 Commits

Author SHA1 Message Date
Harald Kuhr c709fcafa9 Fixed nested tests 2026-05-04 17:20:57 +02:00
Harald Kuhr 4f6ed55218 Add @Nested to inner test-classes 2026-05-04 15:02:39 +02:00
dependabot[bot] ae7e3d8c9b Bump junit.jupiter.version from 5.14.3 to 5.14.4
Bumps `junit.jupiter.version` from 5.14.3 to 5.14.4.

Updates `org.junit.jupiter:junit-jupiter-api` from 5.14.3 to 5.14.4
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.3...r5.14.4)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.14.3 to 5.14.4
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.3...r5.14.4)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.14.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.14.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04 14:59:29 +02:00
dependabot[bot] 43ddc84986 Bump commons-io:commons-io from 2.21.0 to 2.22.0
Bumps commons-io:commons-io from 2.21.0 to 2.22.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-version: 2.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-27 16:22:11 +02:00
dependabot[bot] e682696fac Bump github/codeql-action from 4.35.1 to 4.35.2 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.1 to 4.35.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/c10b8064de6f491fea524254123dbe5e09572f13...95e58e9a2cdfd71adc6e0353d5c52f41a045d225)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-22 13:18:18 +02:00
dependabot[bot] 5f190ea57d Bump actions/upload-artifact from 7.0.0 to 7.0.1 in /.github/workflows
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/bbbca2ddaa5d8feaa63e36b76fdaad77386f024f...043fb46d1a93c77aae656e7c1c64a875d1fc6a0a)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-17 11:00:08 +02:00
dependabot[bot] 3ca37e4b8c Bump mikepenz/action-junit-report in /.github/workflows
Bumps [mikepenz/action-junit-report](https://github.com/mikepenz/action-junit-report) from 6.3.1 to 6.4.0.
- [Release notes](https://github.com/mikepenz/action-junit-report/releases)
- [Commits](https://github.com/mikepenz/action-junit-report/compare/49b2ca06f62aa7ef83ae6769a2179271e160d8e4...bccf2e31636835cf0874589931c4116687171386)

---
updated-dependencies:
- dependency-name: mikepenz/action-junit-report
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-06 14:25:27 +02:00
dependabot[bot] a30a032a9c Bump github/codeql-action from 4.32.6 to 4.35.1 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.6 to 4.35.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/0d579ffd059c29b07949a3cce3983f0780820c98...c10b8064de6f491fea524254123dbe5e09572f13)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-06 12:53:18 +02:00
dependabot[bot] 77ebba4f7d Bump github/codeql-action from 4.32.4 to 4.32.6 in /.github/workflows
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.4 to 4.32.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/89a39a4e59826350b863aa6b6252a07ad50cf83e...0d579ffd059c29b07949a3cce3983f0780820c98)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.32.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-19 15:33:58 +01:00
Harald Kuhr 456749ded8 Using new sequence support in DDSImageWriter
+ some minor bonus clean-up
2026-03-13 14:46:19 +01:00
Harald Kuhr 47a26651b4 Using new sequence support in exising writers. 2026-03-13 14:46:19 +01:00
Harald Kuhr 10183ef830 New class for simpler sequence write support. 2026-03-13 14:46:19 +01:00
17 changed files with 95 additions and 62 deletions
+3 -3
View File
@@ -35,7 +35,7 @@ jobs:
- name: Run Tests
run: mvn --batch-mode --no-transfer-progress test
- name: Publish Test Report
uses: mikepenz/action-junit-report@49b2ca06f62aa7ef83ae6769a2179271e160d8e4 # v5
uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v5
if: ${{ !cancelled() }}
with:
report_paths: "**/target/surefire-reports/TEST*.xml"
@@ -57,7 +57,7 @@ jobs:
- name: Run Tests
run: mvn --batch-mode --no-transfer-progress test
- name: Publish Test Report
uses: mikepenz/action-junit-report@49b2ca06f62aa7ef83ae6769a2179271e160d8e4 # v5
uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v5
if: ${{ !cancelled() }}
with:
report_paths: "**/target/surefire-reports/TEST*.xml"
@@ -91,7 +91,7 @@ jobs:
- name: Run Tests
run: mvn --batch-mode --no-transfer-progress test
- name: Publish Test Report
uses: mikepenz/action-junit-report@49b2ca06f62aa7ef83ae6769a2179271e160d8e4 # v5
uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v5
if: ${{ !cancelled() }}
with:
report_paths: "**/target/surefire-reports/TEST*.xml"
+3 -3
View File
@@ -37,7 +37,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -51,7 +51,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
uses: github/codeql-action/autobuild@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -64,6 +64,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
with:
category: "/language:${{matrix.language}}"
+2 -2
View File
@@ -49,7 +49,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: SARIF file
path: results.sarif
@@ -57,6 +57,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
with:
sarif_file: results.sarif
@@ -284,20 +284,6 @@ abstract class AbstractDecoratedMap<K, V> extends AbstractMap<K, V> implements M
return false;
}
/*
// NOTE: Extra cautions is taken, to only remove the entry if it
// equals the entry in the map
Object key = ((Entry) o).getKey();
Entry entry = (Entry) entries.get(key);
// Same entry?
if (entry != null && entry.equals(o)) {
return AbstractWrappedMap.this.remove(key) != null;
}
return false;
*/
//noinspection unchecked
return AbstractDecoratedMap.this.removeEntry((Entry) o) != null;
}
@@ -322,7 +308,7 @@ abstract class AbstractDecoratedMap<K, V> extends AbstractMap<K, V> implements M
return containsKey(o);
}
public boolean remove(Object o) {
return AbstractDecoratedMap.this.remove(o) != null;
return AbstractDecoratedMap.this.removeEntry(getEntry((K) o)) != null;
}
public void clear() {
AbstractDecoratedMap.this.clear();
@@ -137,43 +137,43 @@ public final class BeanMap extends AbstractMap<String, Object> implements Serial
}
private class BeanIterator implements Iterator<Entry<String, Object>> {
private final Iterator<PropertyDescriptor> mIterator;
private final Iterator<PropertyDescriptor> iterator;
public BeanIterator(final Iterator<PropertyDescriptor> pIterator) {
mIterator = pIterator;
iterator = pIterator;
}
public boolean hasNext() {
return mIterator.hasNext();
return iterator.hasNext();
}
public BeanEntry next() {
return new BeanEntry(mIterator.next());
return new BeanEntry(iterator.next());
}
public void remove() {
mIterator.remove();
iterator.remove();
}
}
private class BeanEntry implements Entry<String, Object> {
private final PropertyDescriptor mDescriptor;
private final PropertyDescriptor descriptor;
public BeanEntry(final PropertyDescriptor pDescriptor) {
this.mDescriptor = pDescriptor;
this.descriptor = pDescriptor;
}
public String getKey() {
return mDescriptor.getName();
return descriptor.getName();
}
public Object getValue() {
return unwrap(new Wrapped() {
public Object run() throws IllegalAccessException, InvocationTargetException {
final Method method = mDescriptor.getReadMethod();
final Method method = descriptor.getReadMethod();
// A write-only bean.
if (method == null) {
throw new UnsupportedOperationException("No getter: " + mDescriptor.getName());
throw new UnsupportedOperationException("No getter: " + descriptor.getName());
}
return method.invoke(bean);
@@ -184,10 +184,10 @@ public final class BeanMap extends AbstractMap<String, Object> implements Serial
public Object setValue(final Object pValue) {
return unwrap(new Wrapped() {
public Object run() throws IllegalAccessException, InvocationTargetException {
final Method method = mDescriptor.getWriteMethod();
final Method method = descriptor.getWriteMethod();
// A read-only bean.
if (method == null) {
throw new UnsupportedOperationException("No write method for property: " + mDescriptor.getName());
throw new UnsupportedOperationException("No write method for property: " + descriptor.getName());
}
final Object old = getValue();
@@ -71,7 +71,6 @@ public abstract class ObjectAbstractTest {
// TODO: What more can we test?
}
// TODO: assert that either BOTH or NONE of equals/hashcode is overridden
@Test
public void testEqualsHashCode(){
Object obj = makeObject();
@@ -328,5 +327,4 @@ public abstract class ObjectAbstractTest {
return new Cloneable() {};
}
}
}
@@ -30,6 +30,8 @@
package com.twelvemonkeys.util;
import org.junit.jupiter.api.Nested;
import java.beans.IntrospectionException;
import java.io.Serializable;
import java.util.Map;
@@ -172,4 +174,16 @@ public class BeanMapTest extends MapAbstractTest {
}
static class NullBean implements Serializable { }
@Nested
public class TestBeanMapEntrySet extends TestMapEntrySet {
}
@Nested
public class TestBeanMapKeySet extends TestMapKeySet {
}
@Nested
public class TestBeanMapValues extends TestMapValues {
}
}
@@ -436,24 +436,24 @@ public abstract class CollectionAbstractTest extends ObjectAbstractTest {
*/
public Object[] getFullNonNullElements() {
return new Object[] {
new String(""),
new String("One"),
new Integer(2),
"Three",
new Integer(4),
"",
"One",
new Double(5),
new Float(6),
2,
"Three",
4,
"One",
5.0,
6F,
"Seven",
"Eight",
new String("Nine"),
new Integer(10),
new Short((short)11),
new Long(12),
"Nine",
10,
(short) 11,
12L,
"Thirteen",
"14",
"15",
new Byte((byte)16)
(byte) 16
};
}
@@ -1149,7 +1149,7 @@ public abstract class CollectionAbstractTest extends ObjectAbstractTest {
public void testUnsupportedRemove() {
if (isRemoveSupported()) return;
resetEmpty();
resetFull();
try {
collection.clear();
fail("clear should raise UnsupportedOperationException");
@@ -1159,7 +1159,7 @@ public abstract class CollectionAbstractTest extends ObjectAbstractTest {
verifyAll();
try {
collection.remove(null);
collection.remove(getFullElements()[0]);
fail("remove should raise UnsupportedOperationException");
} catch (UnsupportedOperationException e) {
// expected
@@ -1167,7 +1167,7 @@ public abstract class CollectionAbstractTest extends ObjectAbstractTest {
verifyAll();
try {
collection.removeAll(null);
collection.removeAll(Arrays.asList(getFullElements()));
fail("removeAll should raise UnsupportedOperationException");
} catch (UnsupportedOperationException e) {
// expected
@@ -1175,7 +1175,7 @@ public abstract class CollectionAbstractTest extends ObjectAbstractTest {
verifyAll();
try {
collection.retainAll(null);
collection.retainAll(Collections.emptySet());
fail("removeAll should raise UnsupportedOperationException");
} catch (UnsupportedOperationException e) {
// expected
@@ -1192,7 +1192,6 @@ public abstract class CollectionAbstractTest extends ObjectAbstractTest {
// expected
}
verifyAll();
}
@@ -212,5 +212,17 @@ public class LRUMapTest extends LinkedMapTest {
list.add(pEntry.getKey());
}
}
@Nested
public class TestLRUMapEntrySet extends TestMapEntrySet {
}
@Nested
public class TestLRUMapKeySet extends TestMapKeySet {
}
@Nested
public class TestLRUMapValues extends TestMapValues {
}
}
@@ -201,4 +201,16 @@ public class LinkedMapTest extends MapAbstractTest {
public void tearDown() throws Exception {
labRat = null;
}
@Nested
public class TestLinkedMapEntrySet extends TestMapEntrySet {
}
@Nested
public class TestLinkedMapKeySet extends TestMapKeySet {
}
@Nested
public class TestLinkedMapValues extends TestMapValues {
}
}
@@ -1255,7 +1255,7 @@ public abstract class MapAbstractTest extends ObjectAbstractTest {
}
*/
public class TestMapEntrySet extends SetAbstractTest {
protected abstract class TestMapEntrySet extends SetAbstractTest {
// Have to implement manually; entrySet doesn't support addAll
public Object[] getFullElements() {
@@ -1429,7 +1429,7 @@ public abstract class MapAbstractTest extends ObjectAbstractTest {
}
*/
public class TestMapKeySet extends SetAbstractTest {
protected abstract class TestMapKeySet extends SetAbstractTest {
public Object[] getFullElements() {
return getSampleKeys();
}
@@ -1495,7 +1495,7 @@ public abstract class MapAbstractTest extends ObjectAbstractTest {
}
*/
public class TestMapValues extends CollectionAbstractTest {
protected abstract class TestMapValues extends CollectionAbstractTest {
public Object[] getFullElements() {
return getSampleValues();
}
@@ -668,5 +668,17 @@ public class TimeoutMapTest extends MapAbstractTest {
assertFalse(timeoutMap.containsKey("xyz"));
assertNull(timeoutMap.get("xyz"));
}
@Nested
public class TestTimeoutMapEntrySet extends TestMapEntrySet {
}
@Nested
public class TestTimeoutMapKeySet extends TestMapKeySet {
}
@Nested
public class TestTimeoutMapValues extends TestMapValues {
}
}
+1 -1
View File
@@ -21,7 +21,7 @@
</modules>
<properties>
<junit.jupiter.version>5.14.3</junit.jupiter.version>
<junit.jupiter.version>5.14.4</junit.jupiter.version>
</properties>
<dependencyManagement>
+1 -1
View File
@@ -14,7 +14,7 @@
</description>
<properties>
<junit.jupiter.version>5.14.3</junit.jupiter.version>
<junit.jupiter.version>5.14.4</junit.jupiter.version>
</properties>
+1 -1
View File
@@ -63,7 +63,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.21.0</version>
<version>2.22.0</version>
<scope>provided</scope>
</dependency>
+1 -1
View File
@@ -61,7 +61,7 @@
</modules>
<properties>
<junit.jupiter.version>5.14.3</junit.jupiter.version>
<junit.jupiter.version>5.14.4</junit.jupiter.version>
</properties>
<dependencies>
+1 -1
View File
@@ -15,7 +15,7 @@
</description>
<properties>
<junit.jupiter.version>5.14.3</junit.jupiter.version>
<junit.jupiter.version>5.14.4</junit.jupiter.version>
</properties>
<dependencies>