mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-23 19:25:12 +01:00
Minor code smells/javadoc fixes in database code
This commit is contained in:
parent
9fdf320fdf
commit
45c78fc7f2
@ -19,7 +19,7 @@ public interface DatabaseSetup {
|
||||
/**
|
||||
* Gets the type of database being used.
|
||||
* Currently supported options are YAML, JSON, MYSQL, MARIADB and MONGODB.
|
||||
* Default is YAML.
|
||||
* Default is JSON.
|
||||
* @return Database type
|
||||
*/
|
||||
static DatabaseSetup getDatabase() {
|
||||
|
@ -18,6 +18,7 @@ import org.bukkit.scheduler.BukkitTask;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
import world.bentobox.bentobox.database.DatabaseConnector;
|
||||
import world.bentobox.bentobox.database.json.AbstractJSONDatabaseHandler;
|
||||
@ -149,7 +150,7 @@ public class MySQLDatabaseHandler<T> extends AbstractJSONDatabaseHandler<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public T loadObject(String uniqueId) {
|
||||
public T loadObject(@NonNull String uniqueId) {
|
||||
String sb = "SELECT `json` FROM `" + dataObject.getCanonicalName() + "` WHERE uniqueId = ? LIMIT 1";
|
||||
try (PreparedStatement preparedStatement = connection.prepareStatement(sb)) {
|
||||
// UniqueId needs to be placed in quotes
|
||||
|
Loading…
Reference in New Issue
Block a user