Fixes warnings.

fix-message-formatting
Lyubomir Marinov 11 years ago
parent 0311a35884
commit 6da2f0c737

@ -10,7 +10,6 @@
import java.io.*;
import java.text.*;
import java.util.*;
import java.util.regex.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.contactlist.event.*;
@ -25,8 +24,6 @@
import org.jitsi.service.configuration.*;
import org.jitsi.util.*;
import static net.java.sip.communicator.service.history.HistoryService.DATE_FORMAT;
/**
* The source contact service. The will show most recent messages.
*
@ -47,8 +44,7 @@ public class MessageSourceService
/**
* The logger for this class.
*/
private static Logger logger = Logger
.getLogger(MessageSourceService.class);
private static Logger logger = Logger.getLogger(MessageSourceService.class);
/**
* The display name of this contact source.
@ -631,7 +627,9 @@ List<String> getRecentContactIDs(String provider, Date after)
{
Iterator<HistoryRecord> recs
= history.getReader().findLast(NUMBER_OF_MSGS_IN_HISTORY);
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
SimpleDateFormat sdf
= new SimpleDateFormat(HistoryService.DATE_FORMAT);
while(recs.hasNext())
{
HistoryRecord hr = recs.next();
@ -961,12 +959,13 @@ private void saveRecentMessageToHistory(ComparableEvtObj msc)
try
{
History history = getHistory();
HistoryWriter writer = history.getWriter();
synchronized(recentMessages)
{
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
SimpleDateFormat sdf
= new SimpleDateFormat(HistoryService.DATE_FORMAT);
writer.addRecord(
new String[]
{
@ -1055,7 +1054,9 @@ public Map<String, String> getUpdateChanges()
HashMap<String, String> map
= new HashMap<String, String>();
SimpleDateFormat sdf
= new SimpleDateFormat(DATE_FORMAT);
= new SimpleDateFormat(
HistoryService.DATE_FORMAT);
for(int i = 0;
i < hr.getPropertyNames().length;
i++)

Loading…
Cancel
Save