Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ public final class SpecificationItemId implements Comparable<SpecificationItemId
public static final String ARTIFACT_TYPE_SEPARATOR = "~";
/**
* Separator between name and revision in an item ID.
*
* @deprecated with 4.12.0 we widened the accepted separators to include '#'.
* Use {@link REVISION_SEPARATOR_PATTERN} for detection or {@link DEFAULT_REVISION_SEPARATOR} for output instead.
* Use {@link #REVISION_SEPARATOR_PATTERN} for detection or {@link #DEFAULT_REVISION_SEPARATOR} for
* output instead.
Comment thread
redcatbear marked this conversation as resolved.
Resolved
*/
@Deprecated(forRemoval = true, since = "4.12.0")
public static final String REVISION_SEPARATOR = "~";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,27 @@ void loadingReturnsService(@Mock final ServiceLoader<DummyService> serviceLoader
when(serviceLoaderMock.stream()).thenReturn(Stream.of(providerMock));
when(providerMock.get()).thenReturn(service);
when(originMock.getClassLoader()).thenReturn(DummyServiceImpl.class.getClassLoader());
final List<DummyService> services = new ClassPathServiceLoader<>(originMock, serviceLoaderMock)
.load().toList();
assertThat(services, contains(sameInstance(service)));
try (ClassPathServiceLoader<DummyService> loader = new ClassPathServiceLoader<>(originMock, serviceLoaderMock))
{
final List<DummyService> services = loader.load().toList();
assertThat(services, contains(sameInstance(service)));
}
Comment thread
kaklakariada marked this conversation as resolved.
Resolved
}

@Test
void loadingIgnoresServicesFromOtherClassLoaders(@Mock final ServiceLoader<DummyService> serviceLoaderMock,
@Mock final Provider<DummyService> providerMock, @Mock final ServiceOrigin originMock,
@Mock ClassLoader classLoaderMock)
@Mock final ClassLoader classLoaderMock)
{
final DummyServiceImpl service = new DummyServiceImpl();
when(serviceLoaderMock.stream()).thenReturn(Stream.of(providerMock));
when(providerMock.get()).thenReturn(service);
when(originMock.getClassLoader()).thenReturn(classLoaderMock);
final List<DummyService> services = new ClassPathServiceLoader<>(originMock, serviceLoaderMock)
.load().toList();
assertThat(services, empty());
try (ClassPathServiceLoader<DummyService> loader = new ClassPathServiceLoader<>(originMock, serviceLoaderMock))
{
final List<DummyService> services = loader.load().toList();
assertThat(services, empty());
}
}

interface DummyService
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions doc/changes/changes_4.12.0.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenFastTrace 4.12.0, released 2026-11-26
# OpenFastTrace 4.12.0, released 2026-11-27

Code name: Syntax usability and JSX and TSX tag importer
Code name: Native images, syntax usability, JSX and TSX tag importer

## Summary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void testIdentifyNonId(final String text)
// [utest->dsn~md.specification-item-title~1]
@ParameterizedTest
@CsvSource(
{ "#Title", "# Title", "###### Title", "# Title", "# Änderung" })
{ "'#Title'", "'# Title'", "'###### Title'", "'# Title'", "'# Änderung'" })
Comment thread
kaklakariada marked this conversation as resolved.
Resolved
void testIdentifyTitle(final String text)
{
MarkdownAsserts.assertMatch(MdPattern.TITLE, text);
Expand All @@ -73,7 +73,7 @@ void testIdentifyNeeds(final String text)

@ParameterizedTest
@CsvSource(
{ "Needs:", "#Needs: abc", "' Needs: abc'", "Needs: önderung" })
{ "Needs:", "'#Needs: abc'", "' Needs: abc'", "Needs: önderung" })
void testIdentifyNonNeeds(final String text)
{
MarkdownAsserts.assertMismatch(MdPattern.NEEDS_INT, text);
Expand All @@ -90,15 +90,16 @@ void testIdentifyTags(final String text)
// Note that this test does not evaluate the validity of the tags themselves. Only if the tags-marker is present.
@ParameterizedTest
@CsvSource(
{ "Tags:", "#Needs: abc", "' Needs: abc'", "Needs: änderung", })
{ "Tags:", "'#Needs: abc'", "' Needs: abc'", "Needs: änderung", })
void testIdentifyNonTags(final String text)
{
MarkdownAsserts.assertMismatch(MdPattern.TAGS_INT, text);
}

// [utest->dsn~md.covers-single-line~1]
@ParameterizedTest
@ValueSource(strings = { "Covers: req~foo~1", "Covers: `req~foo~1`", "Covers:req~foo~1",
@ValueSource(strings =
{ "Covers: req~foo~1", "Covers: `req~foo~1`", "Covers:req~foo~1",
"Covers: \treq~foo~1 ", "Covers: req~foo~1, req~bar~2", "Covers: `req~foo~1`, `req~bar~2`" })
void testIdentifyCoversInline(final String text)
{
Expand All @@ -107,7 +108,8 @@ void testIdentifyCoversInline(final String text)

// [utest->dsn~md.covers-single-line~1]
@ParameterizedTest
@ValueSource(strings = { "Covers:", "#Covers: req~foo~1", " Covers: req~foo~1", "Covers: abc",
@ValueSource(strings =
{ "Covers:", "#Covers: req~foo~1", " Covers: req~foo~1", "Covers: abc",
"Covers; req~foo~1", "Covers req~foo~1", "Covers: req~foo~1 req~bar~2",
"Covers: req~foo~1; req~bar~2", "Covers: someone~forgot~1a~comma-1",
"Covers: `req~foo~1", "Covers: req~foo~1`" })
Expand Down
2 changes: 1 addition & 1 deletion native-image/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>1.1.19</version>
<version>1.1.20</version>
<executions>
<execution>
<id>build-native-image</id>
Expand Down
28 changes: 22 additions & 6 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
<packaging>pom</packaging>
<url>https://github.com/itsallcode/openfasttrace</url>
<properties>
<revision>4.11.0</revision>
<revision>4.12.0</revision>
<java.version>17</java.version>
<junit.version>6.1.0-M1</junit.version>
<junit.version>6.1.3</junit.version>
<maven.surefire.version>3.6.1</maven.surefire.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -223,7 +222,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.24.0</version>
<version>5.25.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -538,6 +537,23 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.23.0</version>
<configuration>
<ruleSet>
<rules>
<rule>
<groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId>
<ignoreVersions>
<ignoreVersion>
<type>regex</type>
<!-- Ignore legacy numeric and year-based version schemes. -->
<version>[0-9]{4,}(\..*)?</version>
</ignoreVersion>
</ignoreVersions>
Comment thread
kaklakariada marked this conversation as resolved.
Resolved
</rule>
</rules>
</ruleSet>
</configuration>
</plugin>
<plugin>
<!-- Deployment of this module is not required -->
Expand Down Expand Up @@ -677,9 +693,9 @@
</configuration>
</plugin>
<plugin>
<groupId>com.github.jeluard</groupId>
<groupId>org.itsallcode</groupId>
<artifactId>plantuml-maven-plugin</artifactId>
<version>1.2</version>
<version>0.2</version>
Comment thread
kaklakariada marked this conversation as resolved.
Resolved
<configuration>
<sourceFiles>
<directory>${basedir}/model/diagrams</directory>
Expand All @@ -694,7 +710,7 @@
<dependency>
<groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId>
<version>1.2026.9</version>
<version>1.2026.10</version>
</dependency>
</dependencies>
</plugin>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>5.8.0.7211</version>
<version>5.9.0.7382</version>
</plugin>
</plugins>
</build>
Expand Down
4 changes: 2 additions & 2 deletions testutil/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
requires transitive org.junit.jupiter.params;
requires transitive org.mockito;
requires transitive org.mockito.junit.jupiter;
requires java.logging;
requires transitive java.logging;
requires transitive java.xml;
requires org.itsallcode.openfasttrace.api;
requires transitive org.itsallcode.openfasttrace.api;
Comment thread
redcatbear marked this conversation as resolved.
Resolved
}
Original file line number Diff line number Diff line change
@@ -1,54 +1,65 @@
package org.itsallcode.openfasttrace.testutil.core;

import org.itsallcode.openfasttrace.api.core.SpecificationItem;
import org.itsallcode.openfasttrace.api.core.SpecificationItem.Builder;
import org.itsallcode.openfasttrace.api.core.SpecificationItemId;

/**
* The {@link ItemBuilderFactory} class provides convenience methods for creating instances of {@link SpecificationItem}.
* The {@link ItemBuilderFactory} class provides convenience methods for creating instances of
* {@link SpecificationItem}.
*/
public final class ItemBuilderFactory {
private ItemBuilderFactory() {
public final class ItemBuilderFactory
{
private ItemBuilderFactory()
{
// prevent instantiation.
}

/**
* Creates a new instance of {@link SpecificationItem.Builder}.
* Creates a new instance of {@link Builder}.
Comment thread
redcatbear marked this conversation as resolved.
Resolved
*
* @return a new instance of {@link SpecificationItem.Builder}
* @return a new instance of {@link Builder}
*/
public static SpecificationItem.Builder item() {
public static Builder item()
{
return SpecificationItem.builder();
}

/**
* Creates a new instance of {@link SpecificationItem.Builder} with the specified ID.
* Creates a new instance of {@link Builder} with the specified ID.
*
* @param id ID of the specification item
* @param id
* ID of the specification item
*
* @return a new instance of {@link SpecificationItem.Builder} with the specified ID
* @return a new instance of {@link Builder} with the specified ID
*/
public static SpecificationItem.Builder itemWithId(SpecificationItemId id) {
public static Builder itemWithId(final SpecificationItemId id)
{
return SpecificationItem.builder().id(id);
}

/**
* Returns a new instance of {@link SpecificationItem.Builder} with the default filename and the specified line.
* Returns a new instance of {@link Builder} with the default filename and the specified line.
*
* @param line line number of the specification item in the file
* @param line
* line number of the specification item in the file
*
* @return a new instance of {@link SpecificationItem.Builder} with the default filename and the specified line
* @return a new instance of {@link Builder} with the default filename and the specified line
*/
public static SpecificationItem.Builder itemWithDefaultFilenameInLine(final int line) {
public static Builder itemWithDefaultFilenameInLine(final int line)
{
return SpecificationItem.builder().location("file", line);
}

/**
* Creates a copy of an item without source locations on its IDs.
*
* @param item item to copy
* @param item
* item to copy
* @return copy without source locations on its IDs
*/
public static SpecificationItem withoutIdLocations(final SpecificationItem item) {
public static SpecificationItem withoutIdLocations(final SpecificationItem item)
{
return item.toBuilder()
.id(item.getId())
.coveredIds(item.getCoveredIds())
Expand Down
Loading