Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

Conversation

@marschall
Copy link
Contributor

We did some profiling of our JBoss AS instance and SimpleRole#equals
showed up as a hot method. A lot of time seems to be spent in
java.lang.Class.cast(Object). Switching to a normal Java cast should
fix this since we're inside an instanceof and it always succeeds.

  • use normal cast in SimpleRole#equals instead of
    java.lang.Class.cast
  • add short circuit case for this

Issue: SECURITY-787
https://issues.jboss.org/browse/SECURITY-787

We did some profiling of our JBoss AS instance and `SimpleRole#equals`
showed up as a hot method. A lot of time seems to be spent in
`java.lang.Class.cast(Object)`. Switching to a normal Java cast should
fix this since we're inside an `instanceof` and it always succeeds.

 * use normal cast in `SimpleRole#equals` instead of
   `java.lang.Class.cast`
 * add short circuit case for `this`

Issue: SECURITY-787
https://issues.jboss.org/browse/SECURITY-787
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant