[bramble] address review comments

This commit is contained in:
Torsten Grote
2018-10-30 13:32:56 -03:00
parent 969150bff0
commit ca700d8d23
2 changed files with 7 additions and 7 deletions

View File

@@ -3,7 +3,7 @@ package org.briarproject.bramble.db;
class DatabaseTypes {
private final String hashType, secretType, binaryType;
private final String counterType, stringType;
private final String counterType, stringType;
public DatabaseTypes(String hashType, String secretType, String binaryType,
String counterType, String stringType) {
@@ -17,11 +17,11 @@ class DatabaseTypes {
/**
* Replaces database type placeholders in a statement with the actual types.
* These placeholders are currently supported:
* <li> _HASH
* <li> _SECRET
* <li> _BINARY
* <li> _COUNTER
* <li> _STRING
* <li> _HASH
* <li> _SECRET
* <li> _BINARY
* <li> _COUNTER
* <li> _STRING
*/
String replaceTypes(String s) {
s = s.replaceAll("_HASH", hashType);

View File

@@ -39,7 +39,7 @@ class Migration40_41 implements Migration<Connection> {
try {
s = txn.createStatement();
s.execute("ALTER TABLE contacts"
+ dbTypes.replaceTypes(" ADD alias VARCHAR"));
+ dbTypes.replaceTypes(" ADD alias _STRING"));
} catch (SQLException e) {
tryToClose(s);
throw new DbException(e);