String values are compared using '.equals()' not '=='

This commit is contained in:
TfT_02 2013-08-10 22:24:13 +02:00
parent 90fcf35c34
commit fb5bab6e92

View File

@ -38,10 +38,10 @@ public class MmoupdateCommand implements TabExecutor {
} }
DatabaseManager oldDb; DatabaseManager oldDb;
if (oldType == "sql") { if (oldType.equals("sql")) {
oldDb = DatabaseManagerFactory.createSQLDatabaseManager(); oldDb = DatabaseManagerFactory.createSQLDatabaseManager();
} }
else if (oldType == "flatfile") { else if (oldType.equals("flatfile")) {
oldDb = DatabaseManagerFactory.createFlatfileDatabaseManager(); oldDb = DatabaseManagerFactory.createFlatfileDatabaseManager();
} }
else try { else try {