Skip to content

Commit 00e1f8a

Browse files
committed
Merge branch 'main' into issue-#461-do-not-init-BinaryHandlerBitSet-on-android
2 parents 918f3e3 + 6ec227f commit 00e1f8a

File tree

180 files changed

+3297
-7942
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+3297
-7942
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Generate Maven SBOM
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
# Provide custom 'Version' input, to allow running the workflow for older
8+
# git refs, where the workflow file did not exist yet. This is not possible
9+
# with the builtin "Use workflow from" input field.
10+
inputs:
11+
version:
12+
description: "Version"
13+
default: "main"
14+
required: true
15+
16+
env:
17+
JAVA_VERSION: '17'
18+
JAVA_DISTRO: 'temurin'
19+
PLUGIN_VERSION: '2.9.1'
20+
SBOM_TYPE: 'makeAggregateBom'
21+
PROJECT_VERSION: "${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.version }}"
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
generate-sbom:
28+
runs-on: ubuntu-latest
29+
outputs:
30+
# Make env var available in re-usuable workflow (see actions/runner#2372)
31+
project-version: ${{ env.PROJECT_VERSION }}
32+
steps:
33+
- name: Checkout repository at '${{ env.PROJECT_VERSION }}'
34+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
35+
with:
36+
fetch-depth: 0
37+
ref: ${{ env.PROJECT_VERSION }}
38+
persist-credentials: false
39+
40+
- name: Setup Java SDK
41+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
42+
with:
43+
java-version: ${{ env.JAVA_VERSION }}
44+
distribution: ${{ env.JAVA_DISTRO }}
45+
46+
- name: Generate
47+
run: |
48+
if git show-ref --tags --quiet --verify "refs/tags/${PROJECT_VERSION}"; then
49+
mvn versions:set -DnewVersion=${PROJECT_VERSION} --batch-mode
50+
fi
51+
# Generate SBOMs. 'skipNotDeployed' is needed
52+
# to generate an SBOM outside of the deployment phase.
53+
54+
mvn org.cyclonedx:cyclonedx-maven-plugin:${PLUGIN_VERSION}:${SBOM_TYPE} \
55+
-Dcyclonedx.skipNotDeployed=false \
56+
-DoutputName=Eclipse-Serializer-Sbom \
57+
-DoutputDirectory=target/sbom
58+
59+
- name: Upload
60+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
61+
with:
62+
name: sbom
63+
path: target/sbom/Eclipse-Serializer-Sbom.json
64+
65+
# Store SBOM and metadata in a predefined format for otterdog to pick up
66+
store-sbom-data:
67+
needs: ['generate-sbom']
68+
uses: eclipse-csi/workflows/.github/workflows/store-sbom-data.yml@main
69+
with:
70+
projectName: 'serializer'
71+
projectVersion: ${{ needs.generate-sbom.outputs.project-version }}
72+
bomArtifact: 'sbom'
73+
bomFilename: 'Eclipse-Serializer-Sbom.json'
74+
parentProject: '8fe715dc-b201-45e0-b6e0-5eb8da2ff4cf'

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Classes evolve over time. Therefore, Eclipse Serializer provides a legacy type m
4949
<dependency>
5050
<groupId>org.eclipse.serializer</groupId>
5151
<artifactId>serializer</artifactId>
52-
<version>3.0.0</version>
52+
<version>3.0.1</version>
5353
</dependency>
5454
```
5555

@@ -83,3 +83,11 @@ If you want to contribute to this project, please read our [guidelines](CONTRIBU
8383

8484
- [Eclipse project page](https://projects.eclipse.org/projects/technology.serializer)
8585
- [Dev mailing list](https://accounts.eclipse.org/mailing-list/serializer-dev)
86+
87+
## SBOM
88+
89+
To enhance supply chain security and offer users clear insight into project
90+
components, Eclipse Serializer now generates a Software Bill of Materials (SBOM) for
91+
every release. These are published to the Eclipse Foundation SBOM registry,
92+
with access instructions and usage details available in this [documentation]
93+
(https://eclipse-csi.github.io/security-handbook/sbom/registry.html).

afs/afs/src/main/java/org/eclipse/serializer/afs/types/AccessManager.java

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,15 @@
1414
* #L%
1515
*/
1616

17-
import static org.eclipse.serializer.util.X.notNull;
18-
19-
import java.util.function.Function;
20-
21-
import org.eclipse.serializer.util.X;
22-
import org.eclipse.serializer.afs.exceptions.AfsExceptionConsistency;
23-
import org.eclipse.serializer.afs.exceptions.AfsExceptionExclusiveAttemptConflict;
24-
import org.eclipse.serializer.afs.exceptions.AfsExceptionExclusiveAttemptSharedUserConflict;
25-
import org.eclipse.serializer.afs.exceptions.AfsExceptionMutation;
26-
import org.eclipse.serializer.afs.exceptions.AfsExceptionMutationInUse;
27-
import org.eclipse.serializer.afs.exceptions.AfsExceptionSharedAttemptExclusiveUserConflict;
17+
import org.eclipse.serializer.afs.exceptions.*;
2818
import org.eclipse.serializer.chars.XChars;
2919
import org.eclipse.serializer.collections.HashTable;
3020
import org.eclipse.serializer.collections.XArrays;
31-
import org.eclipse.serializer.collections.interfaces.OptimizableCollection;
21+
import org.eclipse.serializer.util.X;
22+
23+
import java.util.function.Function;
24+
25+
import static org.eclipse.serializer.util.X.notNull;
3226

3327
public interface AccessManager
3428
{
@@ -831,7 +825,7 @@ protected boolean internalUnregister(final AReadableFile file)
831825
return true;
832826
}
833827

834-
private static void optimizeMemoryUsage(final OptimizableCollection collection)
828+
private static void optimizeMemoryUsage(final HashTable<?, ?> collection)
835829
{
836830
if((collection.size() & 127) != 0)
837831
{

base/pom.xml

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -19,74 +19,11 @@
1919
<description>Commons Module of the Eclipse Serializer Framework</description>
2020
<url>https://projects.eclipse.org/projects/technology.serializer</url>
2121

22-
<properties>
23-
<maven.compiler.compilerId>eclipse</maven.compiler.compilerId>
24-
</properties>
25-
2622
<dependencies>
2723
<dependency>
2824
<groupId>org.slf4j</groupId>
2925
<artifactId>slf4j-api</artifactId>
30-
<version>1.7.36</version>
31-
<scope>provided</scope>
3226
</dependency>
3327
</dependencies>
3428

35-
<build>
36-
<plugins>
37-
<plugin>
38-
<groupId>org.apache.maven.plugins</groupId>
39-
<artifactId>maven-compiler-plugin</artifactId>
40-
<executions>
41-
<execution>
42-
<id>default-compile</id>
43-
<configuration>
44-
<compilerArgument>-proc:none</compilerArgument>
45-
</configuration>
46-
</execution>
47-
</executions>
48-
<dependencies>
49-
<dependency>
50-
<groupId>org.codehaus.plexus</groupId>
51-
<artifactId>plexus-compiler-eclipse</artifactId>
52-
<version>2.11.1</version>
53-
</dependency>
54-
<dependency>
55-
<groupId>org.eclipse.jdt</groupId>
56-
<artifactId>ecj</artifactId>
57-
<version>${org.eclipse.jdt.ecj.version}</version>
58-
</dependency>
59-
</dependencies>
60-
</plugin>
61-
</plugins>
62-
</build>
63-
64-
<profiles>
65-
<profile>
66-
<id>eclipse</id>
67-
<activation>
68-
<property>
69-
<name>maven.compiler.compilerId</name>
70-
<value>!javac</value>
71-
</property>
72-
</activation>
73-
<build>
74-
<plugins>
75-
<plugin>
76-
<groupId>org.apache.maven.plugins</groupId>
77-
<artifactId>maven-compiler-plugin</artifactId>
78-
<executions>
79-
<execution>
80-
<id>default-compile</id>
81-
<configuration>
82-
<compilerArgument>-warn:-serial,-unusedImport</compilerArgument>
83-
</configuration>
84-
</execution>
85-
</executions>
86-
</plugin>
87-
</plugins>
88-
</build>
89-
</profile>
90-
</profiles>
91-
9229
</project>

base/src/main/java/org/eclipse/serializer/collections/AbstractArrayCollection.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* #L%
1515
*/
1616

17-
import org.eclipse.serializer.collections.interfaces.Sized;
1817
import org.eclipse.serializer.math.XMath;
1918
import org.eclipse.serializer.util.X;
2019

@@ -24,7 +23,7 @@
2423
*
2524
*
2625
*/
27-
public abstract class AbstractArrayCollection<E> extends AbstractExtendedCollection<E> implements Sized
26+
public abstract class AbstractArrayCollection<E> extends AbstractBaseCollection<E>
2827
{
2928
///////////////////////////////////////////////////////////////////////////
3029
// constants //
@@ -40,26 +39,26 @@ public abstract class AbstractArrayCollection<E> extends AbstractExtendedCollect
4039
///////////////////
4140

4241
@SuppressWarnings("unchecked")
43-
protected static final <E> E marker()
42+
protected static <E> E marker()
4443
{
4544
return (E)MARKER;
4645
}
4746

4847

4948
@SuppressWarnings("unchecked")
50-
protected static final <E> E[] newArray(final int length)
49+
protected static <E> E[] newArray(final int length)
5150
{
5251
return (E[])new Object[length];
5352
}
5453

55-
protected static final <E> E[] newArray(final int length, final E[] oldData, final int oldDataLength)
54+
protected static <E> E[] newArray(final int length, final E[] oldData, final int oldDataLength)
5655
{
5756
final E[] newArray = newArray(length);
5857
System.arraycopy(oldData, 0, newArray, 0, oldDataLength);
5958
return newArray;
6059
}
6160

62-
public static final int pow2BoundMaxed(final long n)
61+
public static int pow2BoundMaxed(final long n)
6362
{
6463
return XMath.pow2BoundMaxed(X.checkArrayRange(n));
6564
}
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
* #L%
1515
*/
1616

17-
import org.eclipse.serializer.collections.interfaces.ExtendedCollection;
18-
import org.eclipse.serializer.collections.types.XAddingCollection;
17+
import org.eclipse.serializer.collections.interfaces.XBaseCollection;
1918
import org.eclipse.serializer.collections.types.XGettingCollection;
2019
import org.eclipse.serializer.exceptions.ArrayCapacityException;
2120
import org.eclipse.serializer.exceptions.IndexBoundsException;
@@ -24,12 +23,6 @@
2423
/**
2524
* This class is an implementation-internal for optional performance optimisation.
2625
* <p>
27-
* It is the base class for every extended collection, even if the extending class does not implement
28-
* {@link XAddingCollection}. Subclasses of this class that do not implement {@link XAddingCollection} will throw an
29-
* {@link UnsupportedOperationException} in the adding methods defined in this class.<br>
30-
* All code using the optimisation methods in here has to ensure that it can only be legally called for implementations
31-
* of {@link XAddingCollection}, for example by using {@link XAddingCollection} as the concrete parameter type.
32-
* <p>
3326
* Note that this technique of using {@link UnsupportedOperationException} is explicitly not comparable to the
3427
* JDK's approach like in {@link java.util.Collections#unmodifiableCollection(java.util.Collection)} where a
3528
* general purpose type (java.util.Collection) is implemented broken to achieve a certain reduced
@@ -39,7 +32,7 @@
3932
*
4033
* @param <E> type of contained elements
4134
*/
42-
public abstract class AbstractExtendedCollection<E> implements ExtendedCollection<E>
35+
public abstract class AbstractBaseCollection<E> implements XBaseCollection
4336
{
4437
public static void validateIndex(final long bound, final long index) throws IndexBoundsException
4538
{

base/src/main/java/org/eclipse/serializer/collections/AbstractChainCollection.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@
1919

2020

2121
public abstract class AbstractChainCollection<E, K, V, EN extends AbstractChainEntry<E, K, V, EN>>
22-
extends AbstractExtendedCollection<E>
22+
extends AbstractBaseCollection<E>
2323
{
2424
protected abstract ChainStorage<E, K, V, EN> getInternalStorageChain();
2525

2626
protected abstract void internalRemoveEntry(EN chainEntry);
27-
28-
protected abstract long size();
2927

3028
protected abstract int internalRemoveNullEntries();
3129

base/src/main/java/org/eclipse/serializer/collections/AbstractChainKeyValueCollection.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
public abstract class AbstractChainKeyValueCollection<K, V, EN extends AbstractChainEntry<KeyValue<K, V>, K, V, EN>>
2020
extends AbstractChainCollection<KeyValue<K, V>, K, V, EN>
2121
{
22-
@Override
23-
protected abstract long size();
24-
2522
@Override
2623
protected abstract void internalRemoveEntry(EN chainEntry);
2724

base/src/main/java/org/eclipse/serializer/collections/ArrayView.java

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,28 @@
1414
* #L%
1515
*/
1616

17-
import java.util.Comparator;
18-
import java.util.Iterator;
19-
import java.util.List;
20-
import java.util.ListIterator;
21-
import java.util.function.BiConsumer;
22-
import java.util.function.Consumer;
23-
import java.util.function.Predicate;
24-
2517
import org.eclipse.serializer.collections.types.XGettingCollection;
2618
import org.eclipse.serializer.collections.types.XGettingList;
2719
import org.eclipse.serializer.collections.types.XImmutableList;
28-
import org.eclipse.serializer.collections.types.XList;
29-
import org.eclipse.serializer.collections.types.XSettingList;
3020
import org.eclipse.serializer.equality.Equalator;
3121
import org.eclipse.serializer.exceptions.IndexBoundsException;
3222
import org.eclipse.serializer.functional.IndexedAcceptor;
3323
import org.eclipse.serializer.typing.XTypes;
3424
import org.eclipse.serializer.util.X;
3525
import org.eclipse.serializer.util.iterables.ReadOnlyListIterator;
3626

27+
import java.util.Comparator;
28+
import java.util.Iterator;
29+
import java.util.List;
30+
import java.util.ListIterator;
31+
import java.util.function.BiConsumer;
32+
import java.util.function.Consumer;
33+
import java.util.function.Predicate;
34+
3735

3836
/**
3937
* Immutable implementation of extended collection type {@link XGettingList}.
4038
* <p>
41-
* For mutable extended lists (implementors of {@link XSettingList}, {@link XList}), see {@link FixedList},
42-
* {@link LimitList}, {@link BulkList}.
43-
* <p>
4439
* As instances of this class are completely immutable after creation, this list is automatically thread-safe.
4540
* <p>
4641
* Also note that by being an extended collection, this implementation offers various functional and batch procedures

0 commit comments

Comments
 (0)