Skip to content

Commit

Permalink
HHH-16228 Avoid delegating protected methods using during construction
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne committed Feb 24, 2023
1 parent 9d83367 commit 2ab68f2
Showing 1 changed file with 12 additions and 9 deletions.
Expand Up @@ -108,14 +108,22 @@ public DialectDelegateWrapper(Dialect wrapped) {
this.wrapped = Objects.requireNonNull( wrapped );
}

//can't be overriden because of how Dialects get initialized: see constructor of parent
@Override
public void checkVersion() {
wrapped.checkVersion();
protected final void checkVersion() {
//intentionally empty: this is used by the super constructor (yuk)
}

//can't be overriden because of how Dialects get initialized: see constructor of parent
@Override
public void initDefaultProperties() {
wrapped.initDefaultProperties();
protected final void registerDefaultKeywords() {
//intentionally empty: this is used by the super constructor (yuk)
}

//can't be overriden because of how Dialects get initialized: see constructor of parent
@Override
protected final void initDefaultProperties() {
//intentionally empty: this is used by the super constructor (yuk)
}

@Override
Expand All @@ -133,11 +141,6 @@ public String castType(int sqlTypeCode) {
return wrapped.castType( sqlTypeCode );
}

@Override
public void registerDefaultKeywords() {
wrapped.registerDefaultKeywords();
}

@Override
public void registerKeywords(DialectResolutionInfo info) {
wrapped.registerKeywords( info );
Expand Down

0 comments on commit 2ab68f2

Please sign in to comment.