Via Charlie Groves, some changes flagged by Eclipse.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2753 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -138,7 +138,7 @@ public class StreamUtil
|
|||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
char[] inbuf = new char[4096];
|
char[] inbuf = new char[4096];
|
||||||
StringBuffer outbuf = new StringBuffer();
|
StringBuilder outbuf = new StringBuilder();
|
||||||
for (int read = 0; (read = reader.read(inbuf)) > 0; ) {
|
for (int read = 0; (read = reader.read(inbuf)) > 0; ) {
|
||||||
outbuf.append(inbuf, 0, read);
|
outbuf.append(inbuf, 0, read);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,13 +29,10 @@ import javax.mail.Transport;
|
|||||||
import javax.mail.internet.InternetAddress;
|
import javax.mail.internet.InternetAddress;
|
||||||
import javax.mail.internet.MimeMessage;
|
import javax.mail.internet.MimeMessage;
|
||||||
|
|
||||||
import java.util.regex.PatternSyntaxException;
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import com.samskivert.util.StringUtil;
|
import com.samskivert.util.StringUtil;
|
||||||
|
|
||||||
import static com.samskivert.Log.log;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The mail util class encapsulates some utility functions related to
|
* The mail util class encapsulates some utility functions related to
|
||||||
* sending emails.
|
* sending emails.
|
||||||
@@ -139,9 +136,8 @@ public class MailUtil
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
message.setFrom(new InternetAddress(sender));
|
message.setFrom(new InternetAddress(sender));
|
||||||
for (int ii = 0; ii < recipients.length; ii++) {
|
for (String recipient : recipients) {
|
||||||
message.addRecipient(Message.RecipientType.TO,
|
message.addRecipient(Message.RecipientType.TO, new InternetAddress(recipient));
|
||||||
new InternetAddress(recipients[ii]));
|
|
||||||
}
|
}
|
||||||
if (subject != null) {
|
if (subject != null) {
|
||||||
message.setSubject(subject);
|
message.setSubject(subject);
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ import java.net.InetAddress;
|
|||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.StringTokenizer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The CDDB class provides access to the information provided by servers compliant with the
|
* The CDDB class provides access to the information provided by servers compliant with the
|
||||||
@@ -225,8 +224,8 @@ public class CDDB
|
|||||||
StringBuilder req = new StringBuilder("cddb query ");
|
StringBuilder req = new StringBuilder("cddb query ");
|
||||||
req.append(discid).append(" ");
|
req.append(discid).append(" ");
|
||||||
req.append(frameOffsets.length).append(" ");
|
req.append(frameOffsets.length).append(" ");
|
||||||
for (int i = 0; i < frameOffsets.length; i++) {
|
for (int frameOffset : frameOffsets) {
|
||||||
req.append(frameOffsets[i]).append(" ");
|
req.append(frameOffsets).append(" ");
|
||||||
}
|
}
|
||||||
req.append(length);
|
req.append(length);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user