Fixes warnings.

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

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

Loading…
Cancel
Save