1
0
Fork 0

Remove unnecessary null check.

master
Kyle Chaplin 2013-08-24 13:04:15 -05:00
parent b9129b2132
commit 60ec3b8ae5
1 changed files with 5 additions and 7 deletions

View File

@ -432,13 +432,11 @@ public final class Issue extends Resource {
* @throws JiraException when the comment creation fails
*/
public void addAttachment(File file) throws JiraException {
if(file != null){
try {
restclient.postFile(getRestUri(key) + "/attachments", file);
} catch (Exception ex) {
throw new JiraException("Failed add attachment to issue " + key, ex);
}
}
try {
restclient.postFile(getRestUri(key) + "/attachments", file);
} catch (Exception ex) {
throw new JiraException("Failed add attachment to issue " + key, ex);
}
}
/**