Skip to content

Conversation

marschall
Copy link
Contributor

Create error message strings only if an actual error has happened. This
seems to be the common pattern in the code base base and saves both CPU
and memory. We found only very few places where unconditional error
message formatting happens.

  • fix unconditional error message formatting in
    AdviceModeImportSelector
  • fix unconditional error message formatting in AnnotationAttributes
  • fix unconditional error message formatting in
    ReadOnlySystemAttributesMap, this also fixes a potential
    NullPointerException

I did sign the CLA.

Issue: SPR-13007

Create error message strings only if an actual error has happened. This
seems to be the common pattern in the code base base and saves both CPU
and memory. We found only very few places where unconditional error
message formatting happens.

 - fix unconditional error message formatting in
   AdviceModeImportSelector

 - fix unconditional error message formatting in AnnotationAttributes

 - fix unconditional error message formatting in
   ReadOnlySystemAttributesMap, this also fixes a potential
   NullPointerException

I did sign the CLA.

Issue: SPR-13007
@sbrannen sbrannen self-assigned this May 10, 2015
sbrannen added a commit that referenced this pull request May 10, 2015
* SPR-13007:
  Avoid eager formatting in pre-condition checks
@sbrannen
Copy link
Member

This has been merged in master in commit 92c1751. Thanks!

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