Fixed various spelling and grammar issues

This commit is contained in:
Tim Visée
2015-11-23 22:07:32 +01:00
parent c3fa8b272f
commit 47b1d00ccf
24 changed files with 265 additions and 268 deletions
@@ -520,21 +520,21 @@ public class CacheDataSource implements DataSource {
/**
* Method updateName.
*
* @param oldone String
* @param newone String
* @param oldOne String
* @param newOne String
*
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/
@Override
public void updateName(final String oldone, final String newone) {
if (cache.containsKey(oldone)) {
cache.put(newone, cache.get(oldone));
cache.remove(oldone);
public void updateName(final String oldOne, final String newOne) {
if (cache.containsKey(oldOne)) {
cache.put(newOne, cache.get(oldOne));
cache.remove(oldOne);
}
exec.execute(new Runnable() {
@Override
public void run() {
source.updateName(oldone, newone);
source.updateName(oldOne, newOne);
}
});
}
@@ -196,10 +196,10 @@ public interface DataSource {
/**
* Method updateName.
*
* @param oldone String
* @param newone String
* @param oldOne String
* @param newOne String
*/
void updateName(String oldone, String newone);
void updateName(String oldOne, String newOne);
/**
* Method getAllAuths.
@@ -215,12 +215,9 @@ public interface DataSource {
*/
List<PlayerAuth> getLoggedPlayers();
/**
*/
enum DataSourceType {
MYSQL,
FILE,
SQLITE
}
}
@@ -460,16 +460,16 @@ public class DatabaseCalls implements DataSource {
/**
* Method updateName.
*
* @param oldone String
* @param newone String
* @param oldOne String
* @param newOne String
*
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/
@Override
public synchronized void updateName(final String oldone, final String newone) {
public synchronized void updateName(final String oldOne, final String newOne) {
exec.execute(new Runnable() {
public synchronized void run() {
database.updateName(oldone, newone);
database.updateName(oldOne, newOne);
}
});
}
@@ -851,17 +851,17 @@ public class FlatFile implements DataSource {
/**
* Method updateName.
*
* @param oldone String
* @param newone String
* @param oldOne String
* @param newOne String
*
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/
@Override
public void updateName(String oldone, String newone) {
PlayerAuth auth = this.getAuth(oldone);
auth.setName(newone);
public void updateName(String oldOne, String newOne) {
PlayerAuth auth = this.getAuth(oldOne);
auth.setName(newOne);
this.saveAuth(auth);
this.removeAuth(oldone);
this.removeAuth(oldOne);
}
/**
@@ -1149,21 +1149,21 @@ public class MySQL implements DataSource {
/**
* Method updateName.
*
* @param oldone String
* @param newone String
* @param oldOne String
* @param newOne String
*
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/
@Override
public void updateName(String oldone, String newone) {
public void updateName(String oldOne, String newOne) {
Connection con = null;
PreparedStatement pst = null;
try {
if ((con = getConnection()) == null)
return;
pst = con.prepareStatement("UPDATE " + tableName + " SET " + columnName + "=? WHERE LOWER(" + columnName + ")=?;");
pst.setString(1, newone);
pst.setString(2, oldone);
pst.setString(1, newOne);
pst.setString(2, oldOne);
pst.executeUpdate();
} catch (Exception ex) {
ConsoleLogger.showError(ex.getMessage());
@@ -764,18 +764,18 @@ public class SQLite implements DataSource {
/**
* Method updateName.
*
* @param oldone String
* @param newone String
* @param oldOne String
* @param newOne String
*
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/
@Override
public void updateName(String oldone, String newone) {
public void updateName(String oldOne, String newOne) {
PreparedStatement pst = null;
try {
pst = con.prepareStatement("UPDATE " + tableName + " SET " + columnName + "=? WHERE " + columnName + "=?;");
pst.setString(1, newone);
pst.setString(2, oldone);
pst.setString(1, newOne);
pst.setString(2, oldOne);
pst.executeUpdate();
} catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage());