Skip to content

Commit

Permalink
Remove unnecessary 'throws' declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
fmbenhassine committed Apr 5, 2020
1 parent 2e6aec4 commit b1717db
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public boolean when() {
}

@Action
public void then(Facts facts, Facts otherFacts) throws Exception {
public void then(Facts facts, Facts otherFacts) {
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public boolean when() {
}

@Action
public void then(int i) throws Exception {
public void then(int i) {
if (i == 1) {
executed = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public boolean when() {
}

@Action
public void then(Facts facts) throws Exception {
public void then(Facts facts) {
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private boolean when() {
}

@Action
private int then() throws Exception {
private int then() {
executed = true;
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public int when() {
}

@Action
public void then() throws Exception {
public void then() {
executed = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public boolean when(int i) {
}

@Action
public void then() throws Exception {
public void then() {
executed = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ public boolean when() {
}

@Action
public void then() throws Exception {
public void then() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public boolean when() {
}

@Action
public void then() throws Exception {
public void then() {
executed = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private boolean when() {
}

@Action
private void then() throws Exception {
private void then() {
executed = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private boolean when() {
}

@Action
public void then() throws Exception {
public void then() {
executed = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private boolean when() {
}

@Action
private void then() throws Exception {
private void then() {
executed = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private boolean when() {
}

@Action
private void then() throws Exception {
private void then() {
executed = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private boolean when() {
}

@Action
private void then() throws Exception {
private void then() {
executed = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public boolean when() {
return true;
}

public void then() throws Exception {
public void then() {
executed = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public boolean when() {
}

@Action
public void then() throws Exception {
public void then() {
executed = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void returnOfPut() {
}

@Test
public void remove() throws Exception {
public void remove() {
facts.put("foo", 1);
facts.remove("foo");

Expand All @@ -71,7 +71,7 @@ public void returnOfRemove() {
}

@Test
public void get() throws Exception {
public void get() {
facts.put("foo", 1);
Object foo = facts.get("foo");
assertThat(foo).isEqualTo(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class UnitRuleGroupTest {


@Before
public void setUp() throws Exception {
public void setUp() {
when(rule1.evaluate(facts)).thenReturn(true);
when(rule2.evaluate(facts)).thenReturn(true);
when(rule2.compareTo(rule1)).thenReturn(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static DecreaseTemperatureAction decreaseTemperature() {
}

@Override
public void execute(Facts facts) throws Exception {
public void execute(Facts facts) {
System.out.println("It is hot! cooling air..");
Integer temperature = facts.get("temperature");
facts.put("temperature", temperature - 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public boolean when() {
}

@Action
public void then() throws Exception {
public void then() {
System.out.println("hello world");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@WebServlet("/index")
public class IndexServlet extends HttpServlet {

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
response.setContentType("text/plain");
PrintWriter out = response.getWriter();
if (isSuspicious(request)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class SuspiciousRequestFilter implements Filter {
private RulesEngine rulesEngine;

@Override
public void init(FilterConfig filterConfig) throws ServletException {
public void init(FilterConfig filterConfig) {
rulesEngine = new DefaultRulesEngine();
rules = new Rules();
rules.register(new SuspiciousRequestRule());
Expand Down

0 comments on commit b1717db

Please sign in to comment.