diff --git a/core/src/main/java/org/jivesoftware/smack/DefaultRosterStore.java b/core/src/main/java/org/jivesoftware/smack/DirectoryRosterStore.java
similarity index 94%
rename from core/src/main/java/org/jivesoftware/smack/DefaultRosterStore.java
rename to core/src/main/java/org/jivesoftware/smack/DirectoryRosterStore.java
index bfc12d3ca..203b1ebd0 100644
--- a/core/src/main/java/org/jivesoftware/smack/DefaultRosterStore.java
+++ b/core/src/main/java/org/jivesoftware/smack/DirectoryRosterStore.java
@@ -40,7 +40,7 @@ import org.xmlpull.v1.XmlPullParserException;
* @author Lars Noschinski
* @author Fabian Schuetz
*/
-public class DefaultRosterStore implements RosterStore {
+public class DirectoryRosterStore implements RosterStore {
private final File fileDir;
@@ -65,7 +65,7 @@ public class DefaultRosterStore implements RosterStore {
* There is also one special file '__version__' that contains the
* current version string.
*/
- private DefaultRosterStore(final File baseDir) {
+ private DirectoryRosterStore(final File baseDir) {
this.fileDir = baseDir;
}
@@ -75,11 +75,11 @@ public class DefaultRosterStore implements RosterStore {
* @param baseDir
* The directory to create the store in. The directory should
* be empty
- * @return A {@link DefaultRosterStore} instance if successful,
+ * @return A {@link DirectoryRosterStore} instance if successful,
* null
else.
*/
- public static DefaultRosterStore init(final File baseDir) {
- DefaultRosterStore store = new DefaultRosterStore(baseDir);
+ public static DirectoryRosterStore init(final File baseDir) {
+ DirectoryRosterStore store = new DirectoryRosterStore(baseDir);
if (store.setRosterVersion("")) {
return store;
}
@@ -92,11 +92,11 @@ public class DefaultRosterStore implements RosterStore {
* Opens a roster store
* @param baseDir
* The directory containing the roster store.
- * @return A {@link DefaultRosterStore} instance if successful,
+ * @return A {@link DirectoryRosterStore} instance if successful,
* null
else.
*/
- public static DefaultRosterStore open(final File baseDir) {
- DefaultRosterStore store = new DefaultRosterStore(baseDir);
+ public static DirectoryRosterStore open(final File baseDir) {
+ DirectoryRosterStore store = new DirectoryRosterStore(baseDir);
String s = FileUtils.readFile(store.getVersionFile());
if (s != null && s.startsWith(STORE_ID + "\n")) {
return store;
diff --git a/core/src/test/java/org/jivesoftware/smack/DefaultRosterStoreTest.java b/core/src/test/java/org/jivesoftware/smack/DirectoryRosterStoreTest.java
similarity index 95%
rename from core/src/test/java/org/jivesoftware/smack/DefaultRosterStoreTest.java
rename to core/src/test/java/org/jivesoftware/smack/DirectoryRosterStoreTest.java
index dab825dc6..6da112c3a 100644
--- a/core/src/test/java/org/jivesoftware/smack/DefaultRosterStoreTest.java
+++ b/core/src/test/java/org/jivesoftware/smack/DirectoryRosterStoreTest.java
@@ -36,11 +36,11 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder;
/**
- * Tests the implementation of {@link DefaultRosterStore}.
+ * Tests the implementation of {@link DirectoryRosterStore}.
*
* @author Lars Noschinski
*/
-public class DefaultRosterStoreTest {
+public class DirectoryRosterStoreTest {
@Rule
public TemporaryFolder tmpFolder = new TemporaryFolder();
@@ -59,7 +59,7 @@ public class DefaultRosterStoreTest {
@Test
public void testStoreUninitialized() throws IOException {
File storeDir = tmpFolder.newFolder();
- assertNull(DefaultRosterStore.open(storeDir));
+ assertNull(DirectoryRosterStore.open(storeDir));
}
/**
@@ -68,7 +68,7 @@ public class DefaultRosterStoreTest {
@Test
public void testStoreInitializedEmpty() throws IOException {
File storeDir = tmpFolder.newFolder();
- DefaultRosterStore store = DefaultRosterStore.init(storeDir);
+ DirectoryRosterStore store = DirectoryRosterStore.init(storeDir);
assertNotNull("Initialization returns store", store);
assertEquals("Freshly initialized store must have empty version",
"", store.getRosterVersion());
@@ -82,7 +82,7 @@ public class DefaultRosterStoreTest {
@Test
public void testStoreAddRemove() throws IOException {
File storeDir = tmpFolder.newFolder();
- DefaultRosterStore store = DefaultRosterStore.init(storeDir);
+ DirectoryRosterStore store = DirectoryRosterStore.init(storeDir);
assertEquals("Initial roster version", "", store.getRosterVersion());
@@ -193,7 +193,7 @@ public class DefaultRosterStoreTest {
@Test
public void testAddEvilChars() throws IOException {
File storeDir = tmpFolder.newFolder();
- DefaultRosterStore store = DefaultRosterStore.init(storeDir);
+ DirectoryRosterStore store = DirectoryRosterStore.init(storeDir);
String user = "../_#;\"'\\&@example.com";
String name = "\n../_#\0\t;\"'&@\\";
diff --git a/core/src/test/java/org/jivesoftware/smack/RosterVersioningTest.java b/core/src/test/java/org/jivesoftware/smack/RosterVersioningTest.java
index dc31c39b2..b17c62da5 100644
--- a/core/src/test/java/org/jivesoftware/smack/RosterVersioningTest.java
+++ b/core/src/test/java/org/jivesoftware/smack/RosterVersioningTest.java
@@ -59,7 +59,7 @@ public class RosterVersioningTest {
// Uncomment this to enable debug output
//XMPPConnection.DEBUG_ENABLED = true;
- DefaultRosterStore store = DefaultRosterStore.init(tmpFolder.newFolder("store"));
+ DirectoryRosterStore store = DirectoryRosterStore.init(tmpFolder.newFolder("store"));
populateStore(store);
ConnectionConfiguration conf = new ConnectionConfiguration("dummy");
@@ -99,7 +99,7 @@ public class RosterVersioningTest {
for (RosterEntry entry : entries) {
items.add(RosterEntry.toRosterItem(entry));
}
- RosterStore store = DefaultRosterStore.init(tmpFolder.newFolder());
+ RosterStore store = DirectoryRosterStore.init(tmpFolder.newFolder());
populateStore(store);
assertEquals("Elements of the roster", new HashSet- (store.getEntries()), items);