Skip to content

Commit 6d7a5ce

Browse files
author
Joe Hansche
committed
Update javadoc to make JDK8 and doclint happy
1 parent 4e6bc2c commit 6d7a5ce

File tree

15 files changed

+160
-164
lines changed

15 files changed

+160
-164
lines changed

src/main/java/com/meetme/plugins/jira/gerrit/data/GerritConfigurationImpl.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
/*
22
* Copyright 2012 MeetMe, Inc.
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
6-
*
6+
*
77
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
8+
*
99
* Unless required by applicable law or agreed to in writing, software distributed under the License
1010
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
1111
* or implied. See the License for the specific language governing permissions and limitations under
1212
* the License.
1313
*/
1414
package com.meetme.plugins.jira.gerrit.data;
1515

16-
import java.io.File;
17-
import java.net.URI;
18-
1916
import com.atlassian.sal.api.pluginsettings.PluginSettings;
2017
import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory;
2118

19+
import java.io.File;
20+
import java.net.URI;
21+
2222
/**
2323
* {@link GerritConfiguration} implementation that uses {@link PluginSettings} to store
2424
* configuration data.
25-
*
26-
* @author Joe Hansche <jhansche@meetme.com>
25+
*
26+
* @author Joe Hansche
2727
*/
2828
public class GerritConfigurationImpl implements GerritConfiguration {
2929
private static final String PLUGIN_STORAGE_KEY = "com.meetme.plugins.jira.gerrit.data";

src/main/java/com/meetme/plugins/jira/gerrit/data/IssueReviewsImpl.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,6 @@
1313
*/
1414
package com.meetme.plugins.jira.gerrit.data;
1515

16-
import java.io.IOException;
17-
import java.util.ArrayList;
18-
import java.util.Collections;
19-
import java.util.LinkedHashMap;
20-
import java.util.List;
21-
import java.util.Map;
22-
23-
import net.sf.json.JSONObject;
24-
25-
import org.slf4j.Logger;
26-
import org.slf4j.LoggerFactory;
27-
2816
import com.atlassian.core.user.preferences.Preferences;
2917
import com.atlassian.jira.issue.Issue;
3018
import com.atlassian.jira.project.Project;
@@ -34,6 +22,18 @@
3422
import com.sonyericsson.hudson.plugins.gerrit.gerritevents.ssh.Authentication;
3523
import com.sonyericsson.hudson.plugins.gerrit.gerritevents.ssh.SshException;
3624

25+
import net.sf.json.JSONObject;
26+
27+
import org.slf4j.Logger;
28+
import org.slf4j.LoggerFactory;
29+
30+
import java.io.IOException;
31+
import java.util.ArrayList;
32+
import java.util.Collections;
33+
import java.util.LinkedHashMap;
34+
import java.util.List;
35+
import java.util.Map;
36+
3737
public class IssueReviewsImpl implements IssueReviewsManager {
3838
private static final Logger log = LoggerFactory.getLogger(IssueReviewsImpl.class);
3939

@@ -168,8 +168,8 @@ public TimedCache(final int capacity, final long expiration) {
168168
/**
169169
* Returns true if the requested key has expired from the cache.
170170
*
171-
* @param key
172-
* @return
171+
* @param key the key
172+
* @return whether the associated value exists and has expired
173173
*/
174174
private boolean hasKeyExpired(Object key) {
175175
if (timestamps.containsKey(key)) {
Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,73 @@
11
/*
22
* Copyright 2012 MeetMe, Inc.
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
6-
*
6+
*
77
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
8+
*
99
* Unless required by applicable law or agreed to in writing, software distributed under the License
1010
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
1111
* or implied. See the License for the specific language governing permissions and limitations under
1212
* the License.
1313
*/
1414
package com.meetme.plugins.jira.gerrit.data;
1515

16-
import java.io.IOException;
17-
import java.util.List;
18-
19-
import net.sf.json.JSONObject;
20-
2116
import com.atlassian.core.user.preferences.Preferences;
2217
import com.atlassian.jira.issue.Issue;
2318
import com.atlassian.jira.project.Project;
2419
import com.meetme.plugins.jira.gerrit.data.dto.GerritChange;
2520
import com.sonyericsson.hudson.plugins.gerrit.gerritevents.GerritQueryException;
2621
import com.sonyericsson.hudson.plugins.gerrit.gerritevents.GerritQueryHandler;
2722

23+
import net.sf.json.JSONObject;
24+
25+
import java.io.IOException;
26+
import java.util.List;
27+
2828
public interface IssueReviewsManager {
2929

3030
/**
3131
* Gets all Gerrit reviews related to the {@link Issue#getKey() issue key}.
32-
*
33-
* @param issueKey
32+
*
33+
* @param issueKey the JIRA issue key
3434
* @return A list of {@link JSONObject}s, as retrieved from Gerrit.
3535
* @throws GerritQueryException If any failure occurs while querying the Gerrit server.
3636
* @see GerritQueryHandler
3737
*/
38-
public abstract List<GerritChange> getReviewsForIssue(String issueKey) throws GerritQueryException;
38+
List<GerritChange> getReviewsForIssue(String issueKey) throws GerritQueryException;
3939

4040
/**
4141
* Gets all Gerrit reviews related to the {@link Project#getKey() project}.
42-
*
43-
* @param issueKey
42+
*
43+
* @param projectKey the JIRA Project key (i.e., {@code JIRA-123}'s projectKey would be {@code JIRA})
4444
* @return A list of {@link JSONObject}s, as retrieved from Gerrit.
4545
* @throws GerritQueryException If any failure occurs while querying the Gerrit server.
4646
* @see GerritQueryHandler
4747
*/
48-
public abstract List<GerritChange> getReviewsForProject(String projectKey) throws GerritQueryException;
48+
List<GerritChange> getReviewsForProject(String projectKey) throws GerritQueryException;
4949

5050
/**
5151
* Performs an approval/review of a change.
52-
*
53-
* @param issueKey
54-
* @param change
55-
* @param args
56-
* @throws IOException
52+
*
53+
* @param issueKey the JIRA issue key
54+
* @param change the Gerrit change
55+
* @param args arguments to add to the approval
56+
* @param prefs the {@link Preferences} for the viewing user
57+
* @return whether the approval was successful
58+
* @throws IOException if so
5759
*/
58-
public abstract boolean doApproval(String issueKey, GerritChange change, String args, Preferences prefs) throws IOException;
60+
boolean doApproval(String issueKey, GerritChange change, String args, Preferences prefs) throws IOException;
5961

6062
/**
6163
* Performs approvals/reviews of all changes.
62-
*
63-
* @param issueKey
64-
* @param change
65-
* @param args
66-
* @param prefs
67-
* @throws IOException
64+
*
65+
* @param issueKey the JIRA issue key
66+
* @param changes the set of Gerrit changes
67+
* @param args arguments to add to each approval
68+
* @param prefs the {@link Preferences} for the viewing user
69+
* @return whether the approvals were successful
70+
* @throws IOException if so
6871
*/
69-
public abstract boolean doApprovals(String issueKey, List<GerritChange> changes, String args, Preferences prefs) throws IOException;
72+
boolean doApprovals(String issueKey, List<GerritChange> changes, String args, Preferences prefs) throws IOException;
7073
}

src/main/java/com/meetme/plugins/jira/gerrit/data/dto/GerritApproval.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
/*
22
* Copyright 2012 MeetMe, Inc.
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
6-
*
6+
*
77
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
8+
*
99
* Unless required by applicable law or agreed to in writing, software distributed under the License
1010
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
1111
* or implied. See the License for the specific language governing permissions and limitations under
1212
* the License.
1313
*/
1414
package com.meetme.plugins.jira.gerrit.data.dto;
1515

16-
import static com.meetme.plugins.jira.gerrit.tabpanel.GerritEventKeys.BY;
17-
import static com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.GerritEventKeys.EMAIL;
18-
import static com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.GerritEventKeys.NAME;
16+
import com.atlassian.crowd.embedded.api.User;
17+
import com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.attr.Approval;
18+
1919
import net.sf.json.JSONObject;
2020

2121
import org.slf4j.Logger;
2222
import org.slf4j.LoggerFactory;
2323

24-
import com.atlassian.crowd.embedded.api.User;
25-
import com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.attr.Approval;
24+
import static com.meetme.plugins.jira.gerrit.tabpanel.GerritEventKeys.BY;
25+
import static com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.GerritEventKeys.EMAIL;
26+
import static com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.GerritEventKeys.NAME;
2627

2728
public class GerritApproval extends Approval implements Comparable<GerritApproval> {
2829
private static final Logger log = LoggerFactory.getLogger(GerritApproval.class);
@@ -40,8 +41,8 @@ public GerritApproval() {
4041

4142
/**
4243
* Creates the PatchSetApproval from a {@link JSONObject}.
43-
*
44-
* @param json
44+
*
45+
* @param json the JSON object with corresponding data.
4546
*/
4647
public GerritApproval(JSONObject json) {
4748
super(json);
@@ -93,7 +94,7 @@ public static String getUpgradedLabelType(String type) {
9394

9495
/**
9596
* Returns the approver's name.
96-
*
97+
*
9798
* @return Approver's name as a string.
9899
*/
99100
public String getBy() {
@@ -102,7 +103,7 @@ public String getBy() {
102103

103104
/**
104105
* Sets the approver's name.
105-
*
106+
*
106107
* @param by Approver's name
107108
*/
108109
public void setBy(String by) {
@@ -111,8 +112,8 @@ public void setBy(String by) {
111112

112113
/**
113114
* Returns the approval score as an integer.
114-
*
115-
* @return
115+
*
116+
* @return the integer approval score
116117
*/
117118
public int getValueAsInt() {
118119
String value = getValue();

src/main/java/com/meetme/plugins/jira/gerrit/data/dto/GerritChange.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
11
/*
22
* Copyright 2012 MeetMe, Inc.
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
6-
*
6+
*
77
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
8+
*
99
* Unless required by applicable law or agreed to in writing, software distributed under the License
1010
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
1111
* or implied. See the License for the specific language governing permissions and limitations under
1212
* the License.
1313
*/
1414
package com.meetme.plugins.jira.gerrit.data.dto;
1515

16-
import static com.meetme.plugins.jira.gerrit.tabpanel.GerritEventKeys.LAST_UPDATED;
17-
18-
import java.util.Date;
16+
import com.meetme.plugins.jira.gerrit.tabpanel.GerritEventKeys;
17+
import com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.attr.Change;
1918

2019
import net.sf.json.JSONObject;
2120

22-
import com.meetme.plugins.jira.gerrit.tabpanel.GerritEventKeys;
23-
import com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.attr.Change;
21+
import java.util.Date;
2422

23+
import static com.meetme.plugins.jira.gerrit.tabpanel.GerritEventKeys.LAST_UPDATED;
24+
25+
/**
26+
* @author Joe Hansche
27+
*/
2528
public class GerritChange extends Change implements Comparable<GerritChange> {
2629

2730
/**
2831
* Gerrit review status enumeration, corresponding to the status string in the Gerrit change
2932
* payload.
30-
*
31-
* @author Joe Hansche <jhansche@meetme.com>
3233
*/
3334
public static enum Status
3435
{
@@ -53,7 +54,7 @@ public GerritChange(JSONObject obj) {
5354

5455
/**
5556
* Sorts {@link GerritChange}s in order by their Gerrit change number.
56-
*
57+
*
5758
* TODO: To be completely accurate, the changes should impose a dependency-tree ordering (via
5859
* <tt>--dependencies</tt> option) to GerritQuery! It is possible for an earlier ChangeId to be
5960
* refactored such that it is then dependent on a <i>later</i> change!

src/main/java/com/meetme/plugins/jira/gerrit/tabpanel/GerritEventKeys.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Extension of {@link com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.GerritEventKeys
1818
* sonyericsson.GerritEventKeys} to provide additional missing keys.
1919
*
20-
* @author jhansche
20+
* @author Joe Hansche
2121
*/
2222
public interface GerritEventKeys {
2323
public static final String APPROVALS = "approvals";

src/main/java/com/meetme/plugins/jira/gerrit/tabpanel/GerritReviewIssueAction.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
/*
22
* Copyright 2012 MeetMe, Inc.
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
6-
*
6+
*
77
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
8+
*
99
* Unless required by applicable law or agreed to in writing, software distributed under the License
1010
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
1111
* or implied. See the License for the specific language governing permissions and limitations under
1212
* the License.
1313
*/
1414
package com.meetme.plugins.jira.gerrit.tabpanel;
1515

16-
import java.util.Collections;
17-
import java.util.Date;
18-
import java.util.List;
19-
import java.util.Map;
20-
import java.util.NoSuchElementException;
21-
2216
import com.atlassian.core.util.map.EasyMap;
2317
import com.atlassian.jira.plugin.issuetabpanel.AbstractIssueAction;
2418
import com.atlassian.jira.plugin.issuetabpanel.IssueAction;
@@ -27,6 +21,12 @@
2721
import com.meetme.plugins.jira.gerrit.data.dto.GerritApproval;
2822
import com.meetme.plugins.jira.gerrit.data.dto.GerritChange;
2923

24+
import java.util.Collections;
25+
import java.util.Date;
26+
import java.util.List;
27+
import java.util.Map;
28+
import java.util.NoSuchElementException;
29+
3030
public class GerritReviewIssueAction extends AbstractIssueAction implements IssueAction {
3131
private String baseUrl;
3232
private GerritChange change;
@@ -69,9 +69,9 @@ public boolean isDisplayActionAllTab() {
6969

7070
/**
7171
* Returns the lowest score below 0 if available; otherwise the highest score above 0.
72-
*
73-
* @param approvals
74-
* @return
72+
*
73+
* @param approvals the approvals found on the Gerrit review
74+
* @return the approval that is deemed the "most significant"
7575
* @deprecated This functionality can now be found in the velocity template
7676
*/
7777
@Deprecated

0 commit comments

Comments
 (0)