Permalink
Browse files

Merge pull request #4147 from tildar/Codacy-Checkstyle-throws-issues

Cleanup issues with throws.
  • Loading branch information...
karianna committed Jul 11, 2018
2 parents 4d58a55 + e6bf237 commit 4c08d7809942e9d7d8a80b00aecb8a88766f450e
Showing 419 changed files with 3,008 additions and 3,491 deletions.
@@ -76,7 +76,6 @@
import pcgen.io.PCGIOHandler;
import pcgen.io.PCGVer2Creator;
import pcgen.output.channel.ChannelUtilities;
import pcgen.persistence.PersistenceLayerException;
import pcgen.persistence.SourceFileLoader;
import pcgen.persistence.lst.LevelLoader;
import pcgen.rules.context.AbstractReferenceContext;
@@ -225,7 +224,7 @@ protected void finishLoad()
protected WeaponProfFacet weaponProfFacet;
protected Race human;
protected void setUpContext() throws PersistenceLayerException
protected void setUpContext()
{
ChooserFactory.pushChooserClassname(RandomChooser.class.getName());
TokenRegistration.clearTokens();
@@ -7,7 +7,6 @@
import static org.junit.Assert.assertTrue;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Collection;
import org.junit.Before;
@@ -23,7 +22,6 @@
import pcgen.cdom.reference.ReferenceManufacturer;
import pcgen.core.Campaign;
import pcgen.core.Domain;
import pcgen.persistence.PersistenceLayerException;
import pcgen.persistence.SourceFileLoader;
import pcgen.persistence.lst.CampaignSourceEntry;
import pcgen.rules.context.ConsolidatedListCommitStrategy;
@@ -48,14 +46,14 @@
protected static CampaignSourceEntry testCampaign;
@BeforeClass
public static void classSetUp() throws URISyntaxException
public static void classSetUp()
{
testCampaign =
new CampaignSourceEntry(new Campaign(), TestURI.getURI());
}
@Before
public void setUp() throws PersistenceLayerException, URISyntaxException
public void setUp()
{
TokenRegistration.clearTokens();
TokenRegistration.register(token);
@@ -80,7 +78,7 @@ private void resetContext()
}
@Test
public void testValidStringYes() throws PersistenceLayerException
public void testValidStringYes()
{
assertNull(cd.getSelectable());
assertTrue(token.parseToken(context, cd, "YES").passed());
@@ -52,7 +52,7 @@
protected static CampaignSourceEntry testCampaign;
@BeforeClass
public static final void classSetUp() throws URISyntaxException
public static final void classSetUp()
{
testCampaign = new CampaignSourceEntry(new Campaign(), TestURI.getURI());
classSetUpFired = true;
@@ -33,7 +33,7 @@
public abstract boolean isPositiveAllowed();
@Test
public void testArchitectire() throws PersistenceLayerException
public void testArchitectire()
{
assertTrue(isPositiveAllowed() || isNegativeAllowed());
}
@@ -62,7 +62,7 @@ public void setUp() throws PersistenceLayerException, URISyntaxException
}
@Test
public void testArchitectire() throws PersistenceLayerException
public void testArchitectire()
{
assertTrue(isPositiveAllowed() || isNegativeAllowed());
}
@@ -29,7 +29,6 @@
import pcgen.core.PCClass;
import pcgen.core.Skill;
import pcgen.gui2.facade.MockUIDelegate;
import pcgen.persistence.PersistenceLayerException;
import pcgen.rules.persistence.token.CDOMToken;
import pcgen.rules.persistence.token.ParseResult;
import pcgen.util.chooser.ChooserFactory;
@@ -65,7 +64,7 @@ protected void setUp() throws Exception
}
@Test
public void testDirect() throws PersistenceLayerException
public void testDirect()
{
Domain source = create(Domain.class, "Source");
ParseResult result = token.parseToken(context, source, "MySkill");
@@ -86,7 +85,7 @@ public void testDirect() throws PersistenceLayerException
}
@Test
public void testList() throws PersistenceLayerException
public void testList()
{
Domain source = create(Domain.class, "Source");
ParseResult result = token.parseToken(context, source, "LIST");
@@ -29,7 +29,6 @@
import pcgen.core.PCClass;
import pcgen.core.Skill;
import pcgen.gui2.facade.MockUIDelegate;
import pcgen.persistence.PersistenceLayerException;
import pcgen.rules.persistence.token.CDOMToken;
import pcgen.rules.persistence.token.ParseResult;
import pcgen.util.chooser.ChooserFactory;
@@ -66,7 +65,7 @@ protected void setUp() throws Exception
}
@Test
public void testDirect() throws PersistenceLayerException
public void testDirect()
{
Domain source = create(Domain.class, "Source");
ParseResult result = token.parseToken(context, source, "MySkill");
@@ -88,7 +87,7 @@ public void testDirect() throws PersistenceLayerException
}
@Test
public void testList() throws PersistenceLayerException
public void testList()
{
Domain source = create(Domain.class, "Source");
ParseResult result = token.parseToken(context, source, "LIST");
@@ -25,7 +25,6 @@
import pcgen.core.PCClass;
import pcgen.core.PCTemplate;
import pcgen.core.Skill;
import pcgen.persistence.PersistenceLayerException;
import pcgen.rules.persistence.token.CDOMToken;
import pcgen.rules.persistence.token.ParseResult;
import plugin.lsttokens.CskillLst;
@@ -68,7 +67,7 @@ public void processToken(CDOMObject source)
}
@Test
public void testList() throws PersistenceLayerException
public void testList()
{
PCTemplate source = create(PCTemplate.class, "Source");
ParseResult result = token.parseToken(context, source, "LIST");
@@ -25,7 +25,6 @@
import pcgen.core.PCClass;
import pcgen.core.PCTemplate;
import pcgen.core.Skill;
import pcgen.persistence.PersistenceLayerException;
import pcgen.rules.persistence.token.CDOMToken;
import pcgen.rules.persistence.token.ParseResult;
import plugin.lsttokens.CcskillLst;
@@ -69,7 +68,7 @@ public void processToken(CDOMObject source)
}
@Test
public void testList() throws PersistenceLayerException
public void testList()
{
PCTemplate source = create(PCTemplate.class, "Source");
ParseResult result = token.parseToken(context, source, "LIST");
@@ -28,7 +28,6 @@
import pcgen.core.PCStat;
import pcgen.core.Race;
import pcgen.core.character.CompanionMod;
import pcgen.persistence.PersistenceLayerException;
import pcgen.rules.persistence.token.CDOMToken;
import pcgen.rules.persistence.token.ParseResult;
import plugin.lsttokens.QualifyToken;
@@ -96,7 +95,7 @@ protected int baseCount()
@Override
@Test
public void testFromAlignment() throws PersistenceLayerException
public void testFromAlignment()
{
PCAlignment source = create(PCAlignment.class, "Source");
ParseResult result = token.parseToken(context, source, "RACE|Dwarf");
@@ -105,7 +104,7 @@ public void testFromAlignment() throws PersistenceLayerException
@Override
@Test
public void testFromCampaign() throws PersistenceLayerException
public void testFromCampaign()
{
Campaign source = create(Campaign.class, "Source");
ParseResult result = token.parseToken(context, source, "RACE|Dwarf");
@@ -114,7 +113,7 @@ public void testFromCampaign() throws PersistenceLayerException
@Override
@Test
public void testFromCompanionMod() throws PersistenceLayerException
public void testFromCompanionMod()
{
CompanionList cat = create(CompanionList.class, "Category");
context.getReferenceContext().importObject(cat);
@@ -127,7 +126,7 @@ public void testFromCompanionMod() throws PersistenceLayerException
@Override
@Test
public void testFromEqMod() throws PersistenceLayerException
public void testFromEqMod()
{
EquipmentModifier source = create(EquipmentModifier.class, "Source");
ParseResult result = token.parseToken(context, source, "RACE|Dwarf");
@@ -136,7 +135,7 @@ public void testFromEqMod() throws PersistenceLayerException
@Override
@Test
public void testFromCheck() throws PersistenceLayerException
public void testFromCheck()
{
PCCheck source = create(PCCheck.class, "Source");
ParseResult result = token.parseToken(context, source, "RACE|Dwarf");
@@ -145,7 +144,7 @@ public void testFromCheck() throws PersistenceLayerException
@Override
@Test
public void testFromStat() throws PersistenceLayerException
public void testFromStat()
{
PCStat source = create(PCStat.class, "Source");
ParseResult result = token.parseToken(context, source, "RACE|Dwarf");
@@ -22,7 +22,6 @@
import pcgen.cdom.base.CDOMObject;
import pcgen.cdom.facet.FacetLibrary;
import pcgen.cdom.facet.analysis.UnarmedDamageFacet;
import pcgen.persistence.PersistenceLayerException;
import pcgen.rules.persistence.token.CDOMToken;
import pcgen.rules.persistence.token.ParseResult;
import plugin.lsttokens.UdamLst;
@@ -82,14 +81,14 @@ protected int baseCount()
@Override
@Test
public void testFromClass() throws PersistenceLayerException
public void testFromClass()
{
//Unarmed Damage in Class is "special" (different behavior)
}
@Override
@Test
public void testFromClassLevel() throws PersistenceLayerException
public void testFromClassLevel()
{
//Unarmed Damage in Class Level is "special" (different behavior)
}
@@ -26,7 +26,6 @@
import pcgen.core.PCClass;
import pcgen.core.Skill;
import pcgen.gui2.facade.MockUIDelegate;
import pcgen.persistence.PersistenceLayerException;
import pcgen.rules.persistence.token.CDOMToken;
import pcgen.rules.persistence.token.ParseResult;
import pcgen.util.chooser.ChooserFactory;
@@ -57,7 +56,7 @@ protected void setUp() throws Exception
}
@Test
public void testDirect() throws PersistenceLayerException
public void testDirect()
{
PCClassLevel pcl = dragon.getOriginalClassLevel(1);
ParseResult result = token.parseToken(context, pcl, "MySkill");
@@ -26,7 +26,6 @@
import pcgen.core.PCClass;
import pcgen.core.Skill;
import pcgen.gui2.facade.MockUIDelegate;
import pcgen.persistence.PersistenceLayerException;
import pcgen.rules.persistence.token.CDOMToken;
import pcgen.rules.persistence.token.ParseResult;
import pcgen.util.chooser.ChooserFactory;
@@ -56,7 +55,7 @@ protected void setUp() throws Exception
}
@Test
public void testDirect() throws PersistenceLayerException
public void testDirect()
{
PCClassLevel pcl = dragon.getOriginalClassLevel(1);
ParseResult result = token.parseToken(context, pcl, "MySkill");
@@ -23,7 +23,6 @@
import pcgen.core.PCClass;
import pcgen.core.Race;
import pcgen.gui2.facade.MockUIDelegate;
import pcgen.persistence.PersistenceLayerException;
import pcgen.rules.persistence.token.CDOMToken;
import pcgen.rules.persistence.token.ParseResult;
import pcgen.util.chooser.ChooserFactory;
@@ -56,7 +55,7 @@ protected void setUp() throws Exception
}
@Test
public void testDirect() throws PersistenceLayerException
public void testDirect()
{
Race source = create(Race.class, "Source");
ParseResult result = token.parseToken(context, source, "Favorite");
@@ -75,7 +74,7 @@ public void testDirect() throws PersistenceLayerException
}
@Test
public void testList() throws PersistenceLayerException
public void testList()
{
Race source = create(Race.class, "Source");
ParseResult result = token.parseToken(context, source, "%LIST");
@@ -29,7 +29,6 @@
import pcgen.core.Race;
import pcgen.core.Skill;
import pcgen.gui2.facade.MockUIDelegate;
import pcgen.persistence.PersistenceLayerException;
import pcgen.rules.persistence.token.CDOMToken;
import pcgen.rules.persistence.token.ParseResult;
import pcgen.util.chooser.ChooserFactory;
@@ -68,7 +67,7 @@ protected void setUp() throws Exception
}
@Test
public void testDirect() throws PersistenceLayerException
public void testDirect()
{
Race source = create(Race.class, "Source");
ParseResult result = token.parseToken(context, source, "MySkill");
@@ -29,7 +29,6 @@
import pcgen.core.Race;
import pcgen.core.Skill;
import pcgen.gui2.facade.MockUIDelegate;
import pcgen.persistence.PersistenceLayerException;
import pcgen.rules.persistence.token.CDOMToken;
import pcgen.rules.persistence.token.ParseResult;
import pcgen.util.chooser.ChooserFactory;
@@ -72,7 +71,7 @@ protected void setUp() throws Exception
}
@Test
public void testDirect() throws PersistenceLayerException
public void testDirect()
{
Race source = create(Race.class, "Source");
ParseResult result = token.parseToken(context, source, "MySkill");
@@ -95,7 +94,7 @@ public void testDirect() throws PersistenceLayerException
}
@Test
public void testList() throws PersistenceLayerException
public void testList()
{
Race source = create(Race.class, "Source");
ParseResult result = token.parseToken(context, source, "LIST");
@@ -21,7 +21,6 @@
import pcgen.cdom.facet.analysis.BaseMovementFacet;
import pcgen.core.Movement;
import pcgen.core.Race;
import pcgen.persistence.PersistenceLayerException;
import pcgen.rules.persistence.token.CDOMToken;
import pcgen.rules.persistence.token.ParseResult;
import plugin.lsttokens.race.MoveToken;
@@ -44,7 +43,7 @@ protected void setUp() throws Exception
}
@Test
public void testFromRace() throws PersistenceLayerException
public void testFromRace()
{
Race source = create(Race.class, "Source");
processToken(source);
@@ -25,7 +25,6 @@
import pcgen.core.PCClass;
import pcgen.core.Skill;
import pcgen.gui2.facade.MockUIDelegate;
import pcgen.persistence.PersistenceLayerException;
import pcgen.rules.persistence.token.CDOMToken;
import pcgen.rules.persistence.token.ParseResult;
import pcgen.util.chooser.ChooserFactory;
@@ -55,7 +54,7 @@ protected void setUp() throws Exception
}
@Test
public void testDirect() throws PersistenceLayerException
public void testDirect()
{
ParseResult result = token.parseToken(context, sk, "Dragon");
if (result != ParseResult.SUCCESS)
Oops, something went wrong.

0 comments on commit 4c08d78

Please sign in to comment.