Skip to content

Commit 185cc31

Browse files
authored
Code style improvements (#762)
Fixes #758 * Code style improvements * Remove Google code style
1 parent 984160c commit 185cc31

30 files changed

+77
-101
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,5 @@ work/
1616
*.iml
1717
.vscode/
1818
.idea/*
19-
!.idea/checkstyle-idea.xml
20-
!.idea/google-java-format.xml
2119

2220
atlassian-ide-plugin.xml

.idea/checkstyle-idea.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.idea/google-java-format.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/main/java/hudson/plugins/jira/JiraBuildAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public JiraBuildAction(@NonNull Set<JiraIssue> issues) {
2727

2828
// Leave it in place for binary compatibility.
2929
/**
30-
* @deprecated use {@link #JiraBuildAction(java.util.Set)} instead
31-
*
3230
* @param owner the owner of this action
3331
* @param issues the Jira issues
32+
*
33+
* @deprecated use {@link #JiraBuildAction(java.util.Set)} instead
3434
*/
3535
@Deprecated
3636
public JiraBuildAction(Run<?, ?> owner, @NonNull Set<JiraIssue> issues) {

src/main/java/hudson/plugins/jira/JiraChangeLogAnnotator.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public class JiraChangeLogAnnotator extends ChangeLogAnnotator {
3030
private static final Logger LOGGER = Logger.getLogger(JiraChangeLogAnnotator.class.getName());
3131

3232
public JiraChangeLogAnnotator() {
33-
super();
3433
LOGGER.fine("JiraChangeLogAnnotator created");
3534
}
3635

src/main/java/hudson/plugins/jira/JiraCreateIssueNotifier.java

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListen
185185
* assignee,components and summary.
186186
* The created issue ID is saved to the file at "filename".
187187
*
188-
* @param build
189-
* @param filename
188+
* @param build build
189+
* @param filename filename
190190
* @return issue id
191-
* @throws IOException
192-
* @throws InterruptedException
191+
* @throws IOException if IO fails
192+
* @throws InterruptedException if thread is interrupted
193193
*/
194194
private Issue createJiraIssue(AbstractBuild<?, ?> build, String filename) throws IOException, InterruptedException {
195195

@@ -227,10 +227,10 @@ private Issue createJiraIssue(AbstractBuild<?, ?> build, String filename) throws
227227
/**
228228
* Returns the status of the issue.
229229
*
230-
* @param build
231-
* @param id
230+
* @param build build
231+
* @param id issue key
232232
* @return Status of the issue
233-
* @throws IOException
233+
* @throws IOException if IO fails
234234
*/
235235
private Status getStatus(AbstractBuild<?, ?> build, String id) throws IOException {
236236

@@ -242,11 +242,11 @@ private Status getStatus(AbstractBuild<?, ?> build, String id) throws IOExceptio
242242
/**
243243
* Adds a comment to the existing issue.
244244
*
245-
* @param build
246-
* @param listener
247-
* @param id
248-
* @param comment
249-
* @throws IOException
245+
* @param build build
246+
* @param listener listener
247+
* @param id issue key
248+
* @param comment comment text
249+
* @throws IOException if IO fails
250250
*/
251251
private void addComment(AbstractBuild<?, ?> build, BuildListener listener, String id, String comment)
252252
throws IOException {
@@ -258,10 +258,10 @@ private void addComment(AbstractBuild<?, ?> build, BuildListener listener, Strin
258258
/**
259259
* Returns the issue id
260260
*
261-
* @param filename
262-
* @return
263-
* @throws IOException
264-
* @throws InterruptedException
261+
* @param filename file from which to read the issue name
262+
* @return issue ID
263+
* @throws IOException if IO fails
264+
* @throws InterruptedException if thread is interrupted
265265
*/
266266
private String getIssue(String filename) throws IOException, InterruptedException {
267267
String issueId = "";
@@ -288,9 +288,9 @@ JiraSite getSiteForProject(AbstractProject<?, ?> project) {
288288
/**
289289
* Returns the jira session.
290290
*
291-
* @param build
291+
* @param build build
292292
* @return JiraSession
293-
* @throws IOException
293+
* @throws IOException if IO fails
294294
*/
295295
private JiraSession getJiraSession(AbstractBuild<?, ?> build) throws IOException {
296296

@@ -310,7 +310,7 @@ private JiraSession getJiraSession(AbstractBuild<?, ?> build) throws IOException
310310
}
311311

312312
/**
313-
* @param filename
313+
* @param filename filename
314314
*/
315315
private void deleteFile(String filename) {
316316
File file = new File(filename);
@@ -320,11 +320,11 @@ private void deleteFile(String filename) {
320320
}
321321

322322
/**
323-
* write's the issue id in the file, which is stored in the Job's directory
323+
* Writes the issue id in the file, which is stored in the Job's directory.
324324
*
325-
* @param filename
326-
* @param issue
327-
* @throws FileNotFoundException
325+
* @param filename filenam
326+
* @param issue issue
327+
* @throws FileNotFoundException if file not found
328328
*/
329329
private void writeInFile(String filename, Issue issue) throws IOException {
330330
// olamy really weird to write an empty file especially with null
@@ -394,12 +394,12 @@ private void currentBuildResultFailure(
394394
* it checks for the previous build's result and adds comment until the
395395
* previously created issue is closed.
396396
*
397-
* @param build
398-
* @param previousBuildResult
399-
* @param filename
400-
* @param vars
401-
* @throws InterruptedException
402-
* @throws IOException
397+
* @param build build
398+
* @param previousBuildResult previous build result
399+
* @param filename filename
400+
* @param vars variables
401+
* @throws InterruptedException if thread isinterrupted
402+
* @throws IOException if IO fails
403403
*/
404404
private void currentBuildResultSuccess(
405405
AbstractBuild<?, ?> build,
@@ -463,8 +463,8 @@ private void progressWorkflowAction(AbstractBuild<?, ?> build, String issueId, I
463463
/**
464464
* Returns build details string in wiki format, with hyperlinks.
465465
*
466-
* @param vars
467-
* @return
466+
* @param vars environment variables
467+
* @return build details string
468468
*/
469469
private String getBuildDetailsString(EnvVars vars) {
470470
final String buildURL = vars.get("BUILD_URL");
@@ -474,8 +474,8 @@ private String getBuildDetailsString(EnvVars vars) {
474474
/**
475475
* Returns build name in format BUILD#10
476476
*
477-
* @param vars
478-
* @return String
477+
* @param vars environment variables
478+
* @return String build name
479479
*/
480480
private String getBuildName(EnvVars vars) {
481481
final String jobName = vars.get("JOB_NAME");

src/main/java/hudson/plugins/jira/JiraFolderProperty.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ public JiraSite[] getSites() {
3636
}
3737

3838
/**
39-
* @deprecated use {@link #setSites(List)} instead
40-
*
4139
* @param site the Jira site
40+
* @deprecated use {@link #setSites(List)} instead
4241
*/
4342
@Deprecated
4443
public void setSites(JiraSite site) {

src/main/java/hudson/plugins/jira/JiraIssueMigrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListen
112112

113113
JiraSite site = getJiraSiteForProject(build.getProject());
114114

115-
if (addRelease == true) {
115+
if (addRelease) {
116116
site.addFixVersionToIssue(realProjectKey, realRelease, realQuery);
117117
} else {
118118
if (realReplace == null || realReplace.isEmpty()) {

src/main/java/hudson/plugins/jira/JiraIssueUpdateBuilder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package hudson.plugins.jira;
1718

1819
import com.atlassian.jira.rest.client.api.RestClientException;

src/main/java/hudson/plugins/jira/JiraIssueUpdater.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public class JiraIssueUpdater extends Recorder implements MatrixAggregatable, Si
4242

4343
@DataBoundConstructor
4444
public JiraIssueUpdater(AbstractIssueSelector issueSelector, SCM scm, List<String> labels) {
45-
super();
4645
this.issueSelector = issueSelector;
4746
this.scm = scm;
4847
if (labels != null) {

0 commit comments

Comments
 (0)