remove unused methods in database code to make auditing easier

These were flagged as potential vulnerabilities.
This commit is contained in:
Hans-Christoph Steiner 2018-12-31 21:14:18 +01:00
parent 7fbfa46e18
commit bce35ef865
2 changed files with 0 additions and 17 deletions

View File

@ -692,19 +692,6 @@ public class AppProvider extends FDroidProvider {
return new AppQuerySelection(selection, args).add(queryPackageName(packageName));
}
/**
* Same as {@link AppProvider#querySingle(String, long)} except it is used for the purpose
* of an UPDATE query rather than a SELECT query. This means that it must use a subquery to get
* the {@link Cols.Package#PACKAGE_ID} rather than the join which is already in place for that
* table. The reason is because UPDATE queries cannot include joins in SQLite.
*/
protected AppQuerySelection querySingleForUpdate(String packageName, long repoId) {
final String selection = Cols.PACKAGE_ID + " = (" + getPackageIdFromPackageNameQuery() +
") AND " + Cols.REPO_ID + " = ? ";
final String[] args = {packageName, Long.toString(repoId)};
return new AppQuerySelection(selection, args);
}
private AppQuerySelection queryExcludeSwap() {
// fdroid_repo will have null fields if the LEFT JOIN didn't resolve, e.g. due to there
// being no apks for the app in the result set. In that case, we can't tell if it is from

View File

@ -20,10 +20,6 @@ abstract class QueryBuilder {
public abstract void addField(String field);
protected int fieldCount() {
return fields.size();
}
public void addFields(String[] fields) {
for (final String field : fields) {
addField(field);