EntityReferenceInitializerImpl#resolveEntityKey throws Exception in case of entityKey != null

Description

Call
log.debugf("On call to EntityIdentifierReaderImpl#resolve [for %s], EntityKey was already known; " +
"should only happen on root returns with an optional identifier specified"
);
throws an Exception:
java.util.MissingFormatArgumentException: Format specifier 's'
at java.util.Formatter.format(Formatter.java:2487)
at java.util.Formatter.format(Formatter.java:2423)
at java.lang.String.format(String.java:2797)
at org.jboss.logging.Slf4jLocationAwareLogger.doLogf(Slf4jLocationAwareLogger.java:81)
at org.jboss.logging.Logger.debugf(Logger.java:553)
at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.resolveEntityKey(EntityReferenceInitializerImpl.java:142)
at org.hibernate.loader.plan.exec.process.spi.AbstractRowReader.resolveEntityKey(AbstractRowReader.java:146)
at org.hibernate.loader.plan.exec.process.spi.AbstractRowReader.readRow(AbstractRowReader.java:95)
at org.hibernate.loader.plan.exec.spi.EntityLoadQueryDetails$EntityLoaderRowReader.readRow(EntityLoadQueryDetails.java:282)
at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:129)
at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:129)
at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:93)

This happened after I called flush() and clear() on EntityManager in a JUnit-test

Environment

None

Status

Assignee

Brett Meyer

Reporter

Nikolaus Graf

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

4.3.0.CR1

Priority

Major