mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
Anonymize AbstractRefCounted (#77208)
Today `AbstractRefCounted` has a `name` field which is only used to construct the exception message when calling `incRef()` after it's been closed. This isn't really necessary, the stack trace will identify the reference in question and give loads more useful detail besides. It's also slightly irksome to have to name every single implementation. This commit drops the name and the constructor parameter, and also introduces a handy factory method for use when there's no extra state needed and you just want to run a method or lambda when all references are released.
This commit is contained in:
parent
a479181143
commit
7c513a75c0
22 changed files with 89 additions and 132 deletions
|
@ -22,7 +22,6 @@ public class AmazonEc2Reference extends AbstractRefCounted implements Releasable
|
|||
private final AmazonEC2 client;
|
||||
|
||||
AmazonEc2Reference(AmazonEC2 client) {
|
||||
super("AWS_EC2_CLIENT");
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue