Move the static initialization of the dependency injector in SqlContentProvider to hopefully fix a bug where it would be called at a weird time

pull/14/head
Sam Bosley 12 years ago
parent 96594f07e1
commit 81c3855ce7

@ -31,13 +31,18 @@ import com.todoroo.astrid.service.AstridDependencyInjector;
@SuppressWarnings("nls")
public class SqlContentProvider extends ContentProvider {
// --- instance variables
private static UriMatcher uriMatcher;
static {
AstridDependencyInjector.initialize();
}
// --- instance variables
uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
private static UriMatcher uriMatcher;
uriMatcher.addURI(AstridApiConstants.API_PACKAGE + ".private",
"sql", 0);
}
@Autowired
private Database database;
@ -56,12 +61,6 @@ public class SqlContentProvider extends ContentProvider {
}
}
static {
uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
uriMatcher.addURI(AstridApiConstants.API_PACKAGE + ".private",
"sql", 0);
}
public SqlContentProvider() {
DependencyInjectionService.getInstance().inject(this);

Loading…
Cancel
Save