Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Java 18 #344

Merged
merged 17 commits into from
Sep 24, 2022
Merged
Show file tree
Hide file tree
Changes from 12 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
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
include:
- os: ubuntu-latest
java: 17
- os: ubuntu-latest
java: 18

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-os-${{ matrix.os }}-java-${{ matrix.java }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ public Set<String> getTags()
}

/**
* @return <code>true</code> if the filter allows items with no tags
* Check if the filter allows items with no tags.
*
* @return {@code true} if the filter allows items with no tags
*/
public boolean withoutTags()
{
Expand All @@ -50,7 +52,7 @@ public boolean withoutTags()
/**
* Check if the artifact type filter is set.
*
* @return <code>true</code> if the artifact type filter is set
* @return {@code true} if the artifact type filter is set
*/
public boolean isArtifactTypeCriteriaSet()
{
Expand All @@ -60,7 +62,7 @@ public boolean isArtifactTypeCriteriaSet()
/**
* Check if the tag filter is set.
*
* @return <code>true</code> if the tag filter is set
* @return {@code true} if the tag filter is set
*/
public boolean isTagCriteriaSet()
{
Expand All @@ -70,7 +72,7 @@ public boolean isTagCriteriaSet()
/**
* Check if any kind of filter criteria is set.
*
* @return <code>true</code> if any filter criteria is set
* @return {@code true} if any filter criteria is set
*/
public boolean isAnyCriteriaSet()
{
Expand Down Expand Up @@ -142,7 +144,17 @@ else if (!this.tags.equals(other.tags))
*/
public static FilterSettings createAllowingEverything()
{
return new FilterSettings.Builder().build();
return FilterSettings.builder().build();
}

/**
* Create a new {@link Builder} for creating {@link FilterSettings}.
*
* @return a new {@link Builder}.
*/
public static Builder builder()
{
return new Builder();
}

/**
Expand All @@ -154,6 +166,11 @@ public static class Builder
private Set<String> tags = Collections.emptySet();
private boolean withoutTags = true;

private Builder()
{
// empty by intention
}

/**
* Set the list of artifact types that the filter matches.
*
Expand Down Expand Up @@ -184,7 +201,7 @@ public Builder tags(final Set<String> tags)
* Configure if filter allows items that have no tags.
*
* @param noTags
* <code>true</code> to match items without any tags
* {@code true} to match items without any tags
* @return <code>this</code> for fluent programming
*/
public Builder withoutTags(final boolean noTags)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public ReportVerbosity getReportVerbosity()
/**
* Should the origin of a specification item be shown in the report?
*
* @return <code>true</code> if the origin should be shown
* @return {@code true} if the origin should be shown
*/
public boolean showOrigin()
{
Expand Down Expand Up @@ -126,7 +126,7 @@ public Builder verbosity(final ReportVerbosity verbosity)
* the report
*
* @param showOrigin
* set to <code>true</code> if the origin should be shown
* set to {@code true} if the origin should be shown
* @return <code>this</code> for fluent programming
*/
public Builder showOrigin(final boolean showOrigin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private LinkStatus(final String shortTag, final String text)
/**
* Check if this is a bad link status.
*
* @return <code>true</code> if the link status is bad.
* @return {@code true} if the link status is bad.
*/
public boolean isBad()
{
Expand All @@ -77,7 +77,7 @@ public boolean isBad()
/**
* Check if the link is an outgoing link.
*
* @return <code>true</code> if the link is outgoing.
* @return {@code true} if the link is outgoing.
*/
public boolean isOutgoing()
{
Expand All @@ -87,7 +87,7 @@ public boolean isOutgoing()
/**
* Check if the link is a bad outgoing link.
*
* @return <code>true</code> if the link is outgoing and has an unclean
* @return {@code true} if the link is outgoing and has an unclean
* status.
*/
public boolean isBadOutgoing()
Expand All @@ -99,7 +99,7 @@ public boolean isBadOutgoing()
/**
* Check if the link is an incoming link.
*
* @return <code>true</code> if the link is incoming.
* @return {@code true} if the link is incoming.
*/
public boolean isIncoming()
{
Expand All @@ -109,7 +109,7 @@ public boolean isIncoming()
/**
* Check if the link is a bad incoming link.
*
* @return <code>true</code> if the link is incoming and has an unclean
* @return {@code true} if the link is incoming and has an unclean
* status.
*/
public boolean isBadIncoming()
Expand All @@ -121,7 +121,7 @@ public boolean isBadIncoming()
/**
* Check if the link status indicates a duplicate.
*
* @return <code>true</code> if the link points to duplicate.
* @return {@code true} if the link points to duplicate.
*/
public boolean isDuplicate()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void addLinkToItemWithStatus(final LinkedSpecificationItem item, final Li
}
}

private void addMyItemIdToCoveringItem(LinkedSpecificationItem coveringItem)
private void addMyItemIdToCoveringItem(final LinkedSpecificationItem coveringItem)
{
if (coveringItem.getItem().getCoveredIds() != null
&& !coveringItem.getItem().getCoveredIds().contains(getId()))
Expand All @@ -174,7 +174,7 @@ private void cacheApprovedCoveredArtifactType(final LinkedSpecificationItem cove
}
}

private void cacheOverCoveredArtifactType(LinkedSpecificationItem overcoveringItem)
private void cacheOverCoveredArtifactType(final LinkedSpecificationItem overcoveringItem)
{
if (overcoveringItem.getArtifactType() != null)
{
Expand Down Expand Up @@ -304,15 +304,17 @@ public List<String> getUncoveredApprovedArtifactTypes()
* Check if the item is covered shallow (i.e. if for all needed artifact
* types coverage exists without recursive search).
*
* @return <code>true</code> if the item is covered
* @return {@code true} if the item is covered
*/
public boolean isCoveredShallow()
{
return areAllArtifactTypesCovered();
}

/**
* @return <code>true</code> if all needed attribute types are covered by
* Check if all needed attribute types are covered by approved items.
*
* @return {@code true} if all needed attribute types are covered by
* approved items
*/
public boolean isCoveredShallowWithApprovedItems()
Expand Down Expand Up @@ -410,7 +412,7 @@ private List<LinkedSpecificationItem> getIncomingItems()
* )
* </pre>
*
* @return <code>true</code> if the item is defect.
* @return {@code true} if the item is defect.
*/
// [impl->dsn~tracing.defect-items~2]
public boolean isDefect()
Expand All @@ -422,7 +424,9 @@ public boolean isDefect()
}

/**
* @return <code>true</code> if the item has one or more links
* Check if the item has one or more links.
*
* @return {@code true} if the item has one or more links
*/
public boolean hasLinks()
{
Expand Down Expand Up @@ -514,7 +518,9 @@ public int countDuplicateLinks()
}

/**
* @return <code>true</code> if this item has one ore more duplicates.
* Check if this item has one ore more duplicates.
*
* @return {@code true} if this item has one ore more duplicates.
*/
public boolean hasDuplicates()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public Location build()
/**
* Is the location complete enough to be useful?
*
* @return <code>true</code> if the location is complete enough
* @return {@code true} if the location is complete enough
*/
public boolean isCompleteEnough()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package org.itsallcode.openfasttrace.api.core;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.*;

/**
* A specification item that requires coverage from other items and provides
Expand Down Expand Up @@ -163,7 +161,7 @@ public List<String> getNeedsArtifactTypes()
*
* @param artifactType
* the artifact type for which needed coverage is evaluated.
* @return <code>true</code> if this item needs to be covered by the given
* @return {@code true} if this item needs to be covered by the given
* artifact type.
*/
public boolean needsCoverageByArtifactType(final String artifactType)
Expand All @@ -174,7 +172,7 @@ public boolean needsCoverageByArtifactType(final String artifactType)
/**
* Check if the item needs any coverage
*
* @return <code>true</code> if the item needs coverage
* @return {@code true} if the item needs coverage
*/
public boolean needsCoverage()
{
Expand Down Expand Up @@ -212,8 +210,9 @@ public List<String> getTags()
}

/**
* @return <code>true</code> if this specification item forwards needed
* coverage
* Check if this item forwards coverage.
*
* @return {@code true} if this specification item forwards needed coverage
*/
public boolean isForwarding()
{
Expand Down Expand Up @@ -658,12 +657,12 @@ public SpecificationItem build()
}

/**
* Set to <code>true</code> if this specification item forwards needed
* Set to {@code true} if this specification item forwards needed
* coverage
*
* @param forwards
* <code>true</code> if the specification item forwards
* needed coverage
* {@code true} if the specification item forwards needed
* coverage
* @return this builder instance
*/
public Builder forwards(final boolean forwards)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ public String toString()
}

/**
* Get this item with a wildcard as revision.
*
* @return a copy of this ID with a wildcard as revision.
*/
public SpecificationItemId toRevisionWildcard()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ private Trace(final List<LinkedSpecificationItem> items,
}

/**
* Check if this result has no defects.
*
* @return {@code true} if and only if no defects where found during
* tracing.
*/
Expand All @@ -27,13 +29,18 @@ public boolean hasNoDefects()
return this.defectItems.isEmpty();
}

/** @return all defect items found during tracing. */
/**
* Get all defect items.
*
* @return all defect items found during tracing.
*/
public List<LinkedSpecificationItem> getDefectItems()
{
return this.defectItems;
}

/**
* Get all items.
*
* @return all items found during tracing.
*/
Expand All @@ -43,6 +50,8 @@ public List<LinkedSpecificationItem> getItems()
}

/**
* Get IDs of the defect items.
*
* @return the IDs of the defect items.
*/
public List<SpecificationItemId> getDefectIds()
Expand All @@ -53,6 +62,8 @@ public List<SpecificationItemId> getDefectIds()
}

/**
* Get the number of defect items.
*
* @return the number of defect items found.
*/
public int countDefects()
Expand All @@ -61,6 +72,8 @@ public int countDefects()
}

/**
* Get the total number of items.
*
* @return the total number of items found.
*/
public int count()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,19 @@ public LinkStatus getStatus()
}

/**
* @return <code>true</code> if the link originates at the other end
* Check if this is an incoming link.
*
* @return {@code true} if the link originates at the other end
*/
public boolean isIncoming()
{
return this.status.isIncoming();
}

/**
* @return <code>true</code> if the link points towards the other end
* Check if this is an outgoing link.
*
* @return {@code true} if the link points towards the other end
*/
public boolean isOutgoing()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@
@SuppressWarnings("squid:S2094")
public class ExporterContext
{

/**
* Creates a new {@link ExporterContext} instance.
*/
public ExporterContext() {
// Empty by intention
}
}
Loading