Skip to content
Open
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 @@ -79,6 +79,8 @@ public ConcretePersistentTransitionChoice(SelectableSet<? extends T> set, Formul
* if the given ChoiceActor is not a PersistentChoiceActor
*/
@Override
@SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST",
justification = "API contract documents @throws ClassCastException for non-PersistentChoiceActor; the cast is the contract")
public void setChoiceActor(ChoiceActor<T> actor)
{
choiceActor = (PersistentChoiceActor<T>) actor;
Expand Down
4 changes: 4 additions & 0 deletions code/src/java/pcgen/cdom/content/fact/FactGrouping.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import pcgen.cdom.grouping.GroupingCollection;
import pcgen.cdom.grouping.GroupingInfo;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

/**
* A FactGrouping is a GroupingCollection that contains objects of a specific type (e.g.
* Skill) that contain a specific value in a given FACT
Expand Down Expand Up @@ -116,6 +118,8 @@ public String getInstructions()
}

@Override
@SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST",
justification = "Only CDOMObject can have facts (per in-code comment); type system can't express this constraint as PCGenScoped is the wider interface")
public void process(PCGenScoped o, Consumer<PCGenScoped> consumer)
{
//Cast can not fail (as only CDOMObject can have facts)
Expand Down
4 changes: 4 additions & 0 deletions code/src/java/pcgen/cdom/facet/LevelInfoFacet.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import pcgen.cdom.facet.base.AbstractListFacet;
import pcgen.core.pclevelinfo.PCLevelInfo;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

/**
* LevelInfoFacet stores the PCLevelInfo objects contained in a Player
* Character. These store information about a specific Level (such as stat
Expand Down Expand Up @@ -58,6 +60,8 @@ protected Collection<PCLevelInfo> getComponentSet()
* @return The object in this LevelInfoFacet for the Player Character
* represented by the given CharID and location.
*/
@SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE",
justification = "Facet's own cache; getComponentSet() always returns ArrayList<PCLevelInfo>")
public PCLevelInfo get(CharID id, int location)
{
List<PCLevelInfo> componentSet = (List<PCLevelInfo>) getCachedSet(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import pcgen.cdom.facet.event.DataFacetChangeListener;
import pcgen.util.enumeration.Load;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

/**
* UnencumberedArmorFacet is a Facet that tracks the Load objects for
* Unencumbered Armor that have been locked on a Player Character.
Expand Down Expand Up @@ -111,6 +113,8 @@ protected Map<Load, Set<Object>> getComponentMap()
* @return The best Load value to avoid encumberance from Armor for the
* Player Character identified by the given CharID.
*/
@SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE",
justification = "Facet's own cache; getComponentMap() always returns TreeMap<Load, Set<Object>>")
public Load getBestLoad(CharID id)
{
TreeMap<Load, Set<Object>> map = (TreeMap<Load, Set<Object>>) getCachedMap(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import pcgen.cdom.facet.event.DataFacetChangeListener;
import pcgen.util.enumeration.Load;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

/**
* UnencumberedLoadFacet is a Facet that tracks the Load objects for
* Unencumbered movement that have been locked on a Player Character.
Expand Down Expand Up @@ -111,6 +113,8 @@ protected Map<Load, Set<Object>> getComponentMap()
* @return The best Load value to avoid encumberance from Load for the
* Player Character identified by the given CharID.
*/
@SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE",
justification = "Facet's own cache; getComponentMap() always returns TreeMap<Load, Set<Object>>")
public Load getBestLoad(CharID id)
{
TreeMap<Load, Set<Object>> map = (TreeMap<Load, Set<Object>>) getCachedMap(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ public abstract class AbstractReferenceManufacturer<T extends Loadable> implemen
* @throws IllegalArgumentException
* if the given Class is null or the given Class does not have a
* public, zero argument constructor
*
*
*/
@SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW",
justification = "Abstract class; ManufacturableFactory is required and Objects.requireNonNull is the lightest defense against an unusable instance")
public AbstractReferenceManufacturer(ManufacturableFactory<T> fac)
{
if (fac == null)
Expand Down
Loading