Author: pderop
Date: Mon Jan 18 16:05:04 2010
New Revision: 900440
URL: http://svn.apache.org/viewvc?rev=900440&view=rev
Log:
don't log in addDictionary callback, because the logger may not be injected yet
Modified:
felix/trunk/dependencymanager/samples/annotation/src/main/java/org/apache/felix/dm/samples/annotation/SpellChecker.java
Modified:
felix/trunk/dependencymanager/samples/annotation/src/main/java/org/apache/felix/dm/samples/annotation/SpellChecker.java
URL:
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/samples/annotation/src/main/java/org/apache/felix/dm/samples/annotation/SpellChecker.java?rev=900440&r1=900439&r2=900440&view=diff
==============================================================================
---
felix/trunk/dependencymanager/samples/annotation/src/main/java/org/apache/felix/dm/samples/annotation/SpellChecker.java
(original)
+++
felix/trunk/dependencymanager/samples/annotation/src/main/java/org/apache/felix/dm/samples/annotation/SpellChecker.java
Mon Jan 18 16:05:04 2010
@@ -19,7 +19,6 @@
package org.apache.felix.dm.samples.annotation;
import java.io.PrintStream;
-import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import org.apache.felix.dm.annotation.api.Service;
@@ -50,10 +49,8 @@
* @param dictionary the new dictionary
*/
@ServiceDependency(removed = "removeDictionary")
- protected void addDictionary(Map<String, String> serviceProperties,
DictionaryService dictionary)
+ protected void addDictionary(DictionaryService dictionary)
{
- m_log.log(LogService.LOG_INFO, "added dictionary: " + dictionary + "
(language="
- + serviceProperties.get("language") + ")");
m_dictionaries.add(dictionary);
}
@@ -63,7 +60,6 @@
*/
protected void removeDictionary(DictionaryService dictionary)
{
- m_log.log(LogService.LOG_INFO, "added dictionary: " + dictionary);
m_dictionaries.remove(dictionary);
}
@@ -93,6 +89,10 @@
return;
}
String word = tokens[1];
+
+ m_log.log(LogService.LOG_DEBUG, "Checking spelling of word \"" + word
+ + "\" using the following dictionaries: " + m_dictionaries);
+
for (DictionaryService dictionary : m_dictionaries)
{
if (dictionary.checkWord(tokens[1]))