-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoiding storing references to Imported<ResourceGenerator>
- Loading branch information
Showing
1 changed file
with
1 addition
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
426f0c7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change? It may result in performance issues. (Not certain... I need to do some profiling.) The Imported object should automatically refresh itself with new instances when new services become available/unavailable.
426f0c7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I know. I was experiencing some sporadic ClassCastExceptions when the instances were iterated and apparently the errors are gone with this change.
426f0c7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
426f0c7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CCE was not due to classloader issues, but totally different classes. Here is one of them:
java.lang.ClassCastException: org.jboss.forge.addon.environment.impl.EnvironmentImpl_$$_javassist_7d1146f1-76f5-4455-873f-df536aa5c84e cannot be cast to org.jboss.forge.addon.resource.ResourceGenerator}}
426f0c7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.