1. John Paulett
  2. UploadAssistant

Commits

Kevin A. Archie  committed 68425ab

Assorted findbugs-induced cleanup

  • Participants
  • Parent commits 6818470
  • Branches default

Comments (0)

Files changed (7)

File src/main/java/org/nrg/ecat/SessionUploadTool.java

View file
 			if (m.matches()) {
 				user = m.group(1);
 				password = m.group(2);
-				System.out.println("user " + user + "; password " + password);
 			} else {
 				user = userinfo;
 				final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
 				}
 			}
 		}
-		server.addAuthentication(url, new PasswordAuthentication(user, password.toCharArray()));
+		server.addAuthentication(url, new PasswordAuthentication(user, null == password ? null : password.toCharArray()));
 	}
 	
 	

File src/main/java/org/nrg/net/RestServer.java

View file
 				return new URL(protocol,host,port,"").toString();
 			} catch (MalformedURLException e) {
 				return MessageFormat.format("{0}://{1}:{2}",
-						new Object[]{protocol, host, new Integer(port)});
+						new Object[]{protocol, host, Integer.valueOf(port)});
 			}
 		}
 	}

File src/main/java/org/nrg/upload/data/IndexedDependentSessionVariable.java

View file
 	/* (non-Javadoc)
 	 * @see org.nrg.upload.data.SessionVariable#getValue()
 	 */
-	public String getValue() {
+	public synchronized String getValue() {
 		return text.getText();
 	}
 

File src/main/java/org/nrg/upload/ui/SelectProjectPage.java

View file
 	
 	private final Logger logger = Logger.getLogger(SelectProjectPage.class);
 	
-	private final RestServer xnat;
+	private transient final RestServer xnat;
 	private final JList list;
 	private final Dimension dimension;
 	

File src/main/java/org/nrg/upload/ui/UploadAssistantApplet.java

View file
 	}
 	
 	
-	private final ActionListener closeHandler = new ActionListener() {
+	private transient final ActionListener closeHandler = new ActionListener() {
 		public void actionPerformed(final ActionEvent e) {
 			exit();
 		}

File src/main/java/org/nrg/util/ArrayIterator.java

View file
 package org.nrg.util;
 
 import java.util.Iterator;
+import java.util.NoSuchElementException;
 
 /**
  * @author Kevin A. Archie <karchie@npg.wustl.edu>
 	}
 	
 	public T next() {
+		if (i >= ts.length) {
+			throw new NoSuchElementException();
+		}
 		return ts[i++];
 	}
 	

File src/main/java/org/nrg/util/ResultProgressMonitor.java

View file
 public class ResultProgressMonitor implements EditProgressMonitor {
 	private final ResultProgressHandle progress;
 	private int min = 0, max = 1, current = 0;
-	private String note;
+	private String note = null;
 	private boolean isCanceled = false;
 	
 	/**
 	 * @see org.nrg.util.EditProgressMonitor#setNote(java.lang.String)
 	 */
 	public void setNote(final String note) {
+		this.note = note;
 		progress.setProgress(note, current - min, max - min);
 	}