Skip to content

Commit 0b69258

Browse files
committed
Remove not thrown exception declarations
1 parent 46ae0e5 commit 0b69258

3 files changed

Lines changed: 22 additions & 22 deletions

File tree

src/main/java/org/jenkinsci/plugins/parameterizedscheduler/Cron.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public long getInitialDelay() {
2929
}
3030

3131
@Override
32-
protected void doRun() throws Exception {
32+
protected void doRun() {
3333
Jenkins instance = Jenkins.get();
3434

3535
for (AbstractProject<?, ?> project : instance.allItems(AbstractProject.class)) {

src/main/java/org/jenkinsci/plugins/parameterizedscheduler/ParameterizedStaplerRequest.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public String getHeader(String name) {
6666
}
6767

6868
@Override
69-
public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException {
69+
public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) {
7070
return null;
7171
}
7272

@@ -183,27 +183,27 @@ public boolean isRequestedSessionIdFromUrl() {
183183
}
184184

185185
@Override
186-
public boolean authenticate(HttpServletResponse response) throws IOException, ServletException {
186+
public boolean authenticate(HttpServletResponse response) {
187187
return false;
188188
}
189189

190190
@Override
191-
public void login(String username, String password) throws ServletException {
191+
public void login(String username, String password) {
192192

193193
}
194194

195195
@Override
196-
public void logout() throws ServletException {
196+
public void logout() {
197197

198198
}
199199

200200
@Override
201-
public Collection<Part> getParts() throws IOException, ServletException {
201+
public Collection<Part> getParts() {
202202
return null;
203203
}
204204

205205
@Override
206-
public Part getPart(String name) throws IOException, ServletException {
206+
public Part getPart(String name) {
207207
return null;
208208
}
209209

@@ -224,7 +224,7 @@ public String getCharacterEncoding() {
224224
}
225225

226226
@Override
227-
public void setCharacterEncoding(String env) throws UnsupportedEncodingException {
227+
public void setCharacterEncoding(String env) {
228228

229229
}
230230

@@ -244,7 +244,7 @@ public String getContentType() {
244244
}
245245

246246
@Override
247-
public ServletInputStream getInputStream() throws IOException {
247+
public ServletInputStream getInputStream() {
248248
return null;
249249
}
250250

@@ -291,7 +291,7 @@ public int getServerPort() {
291291
}
292292

293293
@Override
294-
public BufferedReader getReader() throws IOException {
294+
public BufferedReader getReader() {
295295
return null;
296296
}
297297

@@ -427,18 +427,18 @@ public StringBuffer getRequestURLWithQueryString() {
427427
}
428428

429429
@Override
430-
public RequestDispatcher getView(Object it, String viewName) throws IOException {
430+
public RequestDispatcher getView(Object it, String viewName) {
431431
return null;
432432
}
433433

434434
@SuppressWarnings("rawtypes")
435435
@Override
436-
public RequestDispatcher getView(Class clazz, String viewName) throws IOException {
436+
public RequestDispatcher getView(Class clazz, String viewName) {
437437
return null;
438438
}
439439

440440
@Override
441-
public RequestDispatcher getView(Klass<?> clazz, String viewName) throws IOException {
441+
public RequestDispatcher getView(Klass<?> clazz, String viewName) {
442442
return null;
443443
}
444444

@@ -559,12 +559,12 @@ public BindInterceptor setBindListener(BindInterceptor bindListener) {
559559
}
560560

561561
@Override
562-
public JSONObject getSubmittedForm() throws ServletException {
562+
public JSONObject getSubmittedForm() {
563563
return null;
564564
}
565565

566566
@Override
567-
public FileItem getFileItem(String name) throws ServletException, IOException {
567+
public FileItem getFileItem(String name) {
568568
return null;
569569
}
570570

src/test/java/org/jenkinsci/plugins/parameterizedscheduler/ParameterParserTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ public void test_ValueContainsEquals_emptyMap() {
9494
}
9595

9696
@Test
97-
public void checkSanity_HappyPath() throws Exception {
97+
public void checkSanity_HappyPath() {
9898
ParameterParser testObject = new ParameterParser();
9999

100100
Mockito.when(mockParametersDefinitionProperty.getParameterDefinitionNames()).thenReturn(Collections.singletonList("name"));
101101
assertNull(testObject.checkSanity("* * * * *%name=value", mockParametersDefinitionProperty));
102102
}
103103

104104
@Test
105-
public void checkSanity_NotDefined_ProjectParameter() throws Exception {
105+
public void checkSanity_NotDefined_ProjectParameter() {
106106
ParameterParser testObject = new ParameterParser();
107107

108108
List<String> list = Collections.singletonList("not name");
@@ -112,7 +112,7 @@ public void checkSanity_NotDefined_ProjectParameter() throws Exception {
112112
}
113113

114114
@Test
115-
public void checkSanity_TrailingSemiColon_IsTrimmed() throws Exception {
115+
public void checkSanity_TrailingSemiColon_IsTrimmed() {
116116
ParameterParser testObject = new ParameterParser();
117117

118118
Mockito.when(mockParametersDefinitionProperty.getParameterDefinitionNames()).thenReturn(
@@ -121,21 +121,21 @@ public void checkSanity_TrailingSemiColon_IsTrimmed() throws Exception {
121121
}
122122

123123
@Test
124-
public void checkSanity_NoParametersIsNoBigDeal() throws Exception {
124+
public void checkSanity_NoParametersIsNoBigDeal() {
125125
ParameterParser testObject = new ParameterParser();
126126

127127
assertNull(testObject.checkSanity("* * * * *%", mockParametersDefinitionProperty));
128128
assertNull(testObject.checkSanity("* * * * *", mockParametersDefinitionProperty));
129129
}
130130

131131
@Test
132-
public void checkSanity_duplicateParamName() throws Exception {
132+
public void checkSanity_duplicateParamName() {
133133
ParameterParser testObject = new ParameterParser();
134134
assertTrue(testObject.checkSanity("* * * * *%name=value;name=value2", mockParametersDefinitionProperty).startsWith("Duplicate key"));
135135
}
136136

137137
@Test
138-
public void checkSanity_UnmatchedEquals() throws Exception {
138+
public void checkSanity_UnmatchedEquals() {
139139
ParameterParser testObject = new ParameterParser();
140140
Mockito.when(mockParametersDefinitionProperty.getParameterDefinitionNames()).thenReturn(
141141
Arrays.asList("name", "name2"));
@@ -144,7 +144,7 @@ public void checkSanity_UnmatchedEquals() throws Exception {
144144
}
145145

146146
@Test
147-
public void checkSanity_NullParameters() throws Exception {
147+
public void checkSanity_NullParameters() {
148148
ParameterParser testObject = new ParameterParser();
149149
assertEquals(Messages.ParameterizedTimerTrigger_UndefinedParameter(Collections.singletonList("name"), Collections.emptyList()),
150150
testObject.checkSanity("* * * * *%name=value", null));

0 commit comments

Comments
 (0)