mirror of https://github.com/grpc/grpc-java.git
core: Fix naming style of string constants
This commit is contained in:
parent
a83fe7bf96
commit
0ef9ec6275
|
|
@ -958,11 +958,11 @@ public final class ManagedChannelImpl extends ManagedChannel implements WithLogI
|
||||||
private static final ConcurrentMap<ManagedChannelReference, ManagedChannelReference> refs =
|
private static final ConcurrentMap<ManagedChannelReference, ManagedChannelReference> refs =
|
||||||
new ConcurrentHashMap<ManagedChannelReference, ManagedChannelReference>();
|
new ConcurrentHashMap<ManagedChannelReference, ManagedChannelReference>();
|
||||||
|
|
||||||
private static final String allocationSitePropertyName =
|
private static final String ALLOCATION_SITE_PROPERTY_NAME =
|
||||||
"io.grpc.ManagedChannel.enableAllocationTracking";
|
"io.grpc.ManagedChannel.enableAllocationTracking";
|
||||||
|
|
||||||
private static final boolean enableAllocationTracking =
|
private static final boolean ENABLE_ALLOCATION_TRACKING =
|
||||||
Boolean.parseBoolean(System.getProperty(allocationSitePropertyName, "true"));
|
Boolean.parseBoolean(System.getProperty(ALLOCATION_SITE_PROPERTY_NAME, "true"));
|
||||||
private static final RuntimeException missingCallSite = missingCallSite();
|
private static final RuntimeException missingCallSite = missingCallSite();
|
||||||
|
|
||||||
private final LogId logId;
|
private final LogId logId;
|
||||||
|
|
@ -975,7 +975,7 @@ public final class ManagedChannelImpl extends ManagedChannel implements WithLogI
|
||||||
ManagedChannelReference(ManagedChannelImpl chan) {
|
ManagedChannelReference(ManagedChannelImpl chan) {
|
||||||
super(chan, refQueue);
|
super(chan, refQueue);
|
||||||
allocationSite = new SoftReference<RuntimeException>(
|
allocationSite = new SoftReference<RuntimeException>(
|
||||||
enableAllocationTracking
|
ENABLE_ALLOCATION_TRACKING
|
||||||
? new RuntimeException("ManagedChannel allocation site")
|
? new RuntimeException("ManagedChannel allocation site")
|
||||||
: missingCallSite);
|
: missingCallSite);
|
||||||
logId = chan.logId;
|
logId = chan.logId;
|
||||||
|
|
@ -1037,7 +1037,7 @@ public final class ManagedChannelImpl extends ManagedChannel implements WithLogI
|
||||||
private static RuntimeException missingCallSite() {
|
private static RuntimeException missingCallSite() {
|
||||||
RuntimeException e = new RuntimeException(
|
RuntimeException e = new RuntimeException(
|
||||||
"ManagedChannel allocation site not recorded. Set -D"
|
"ManagedChannel allocation site not recorded. Set -D"
|
||||||
+ allocationSitePropertyName + "=true to enable it");
|
+ ALLOCATION_SITE_PROPERTY_NAME + "=true to enable it");
|
||||||
e.setStackTrace(new StackTraceElement[0]);
|
e.setStackTrace(new StackTraceElement[0]);
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue