Skip to content

Commit

Permalink
#470: create tag-translator eagerly
Browse files Browse the repository at this point in the history
  • Loading branch information
mmerdes authored and rtroilo committed Nov 11, 2022
1 parent e6632e1 commit 7a80888
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class OSHDBJdbc extends OSHDBDatabase {

protected final DataSource dataSource;
protected final DataSource keytablesSource;
protected JdbcTagTranslator tagTranslator;
protected final TagTranslator tagTranslator;
private boolean useMultithreading = true;

public OSHDBJdbc(DataSource source) {
Expand All @@ -40,13 +40,11 @@ public OSHDBJdbc(DataSource source) {
public OSHDBJdbc(DataSource source, DataSource keytables) {
this.dataSource = source;
this.keytablesSource = keytables;
this.tagTranslator = new JdbcTagTranslator(keytablesSource);
}

@Override
public TagTranslator getTagTranslator() {
if (tagTranslator == null) {
tagTranslator = new JdbcTagTranslator(keytablesSource);
}
return tagTranslator;
}

Expand Down

0 comments on commit 7a80888

Please sign in to comment.