Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUSTCOM-174 Avoid NPE by EJBException.addSuppressed() #4462

Merged
merged 1 commit into from
Jan 29, 2020
Merged

CUSTCOM-174 Avoid NPE by EJBException.addSuppressed() #4462

merged 1 commit into from
Jan 29, 2020

Conversation

rdebusscher
Copy link

CUSTCOM-174 Avoid NPE by EJBException.addSuppressed() by ContainerTransactionManager.

Description

This is a bug fix

EJBException.addSuppressed() will throw a NPE when called with a null parameter. The code within
ContainerTransactionManager doesn't check for this condition and user encountered this problem due to changes done in 5.194 release (#4325)

Testing

New tests

No unit test created due to some final methods which cannot be mocked.

Test suites executed

  • Quicklook

Testing Environment

Oracle 1.8.0_181 on Mac 10.14.6 with Maven 3.5.4

@rdebusscher rdebusscher self-assigned this Jan 29, 2020
Copy link
Contributor

@dmatej dmatej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, I see it, line 634 inv.exception can be null, mea culpa! The indirect evidence is in BaseContainer ... the doTxProcessing may be true, as it is parameter ...

        if ( inv.ejb != null ) {
            // counterpart of invocationManager.preInvoke
            if (! inv.useFastPath) {
                invocationManager.postInvoke(inv);
                delistExtendedEntityManagers(inv.context);
            } else {
                doTxProcessing = doTxProcessing && (inv.exception != null);
            }

            try {
                if ( doTxProcessing ) {
                    postInvokeTx(inv);
                }

@dmatej
Copy link
Contributor

dmatej commented Jan 29, 2020

Jenkins test please

@dmatej dmatej merged commit 3f38984 into payara:master Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants