Kevin Archie avatar Kevin Archie committed 3d8a4ef

Fixed some 1.5-isms in this (supposedly) 1.4 code

Comments (0)

Files changed (4)

src/main/java/org/nrg/dcm/edit/AbstractIndexedLabelFunction.java

 		final Value format = getFormat(args);
 		return new Value() {
 			private NumberFormat buildFormatter(final int len) {
-				final StringBuilder sb = new StringBuilder();
+				final StringBuffer sb = new StringBuffer();
 				for (int i = 0; i < len; i++) {
 					sb.append("0");
 				}
 				}
 				final NumberFormat nf = buildFormatter(end - offset);
 				
-				final StringBuilder sb = new StringBuilder(format);
+				final StringBuffer sb = new StringBuffer(format);
 
 				for (int i = 0; true; i++) {
 					final String label = sb.replace(offset, end, nf.format(i)).toString();

src/main/java/org/nrg/dcm/edit/IntegerValue.java

 	/* (non-Javadoc)
 	 * @see org.nrg.dcm.edit.Value#getTags()
 	 */
-	public Set getTags() { return Collections.emptySet(); }
+	public Set getTags() { return Collections.EMPTY_SET; }
 
 	/* (non-Javadoc)
 	 * @see org.nrg.dcm.edit.Value#getVariables()
 	 */
-	public Set getVariables() { return Collections.emptySet(); }
+	public Set getVariables() { return Collections.EMPTY_SET; }
 
 	/* (non-Javadoc)
 	 * @see org.nrg.dcm.edit.Value#on(org.dcm4che2.data.DicomObject)

src/main/java/org/nrg/dcm/edit/MessageFormatValue.java

 		for (int i = 0; i < values.size(); i++) {
 			vals[i] = ((Value)values.get(i)).on(o);
 		}
-		logger.trace("format args: " + Arrays.toString(vals));
+		logger.trace("format args: " + Arrays.asList(vals));
 		return MessageFormat.format(format.on(o), vals);
 	}
 

src/main/java/org/nrg/dcm/edit/ScriptApplicator.java

 
 	public ScriptApplicator(final InputStream script)
 	throws IOException,InvalidUIDRootException,ScriptEvaluationException {
-		this(script, Collections.emptyMap());
+		this(script, Collections.EMPTY_MAP);
 	}
 
 	public ScriptApplicator() {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.