[Polish] Code level polish (no logic change) (#166)
This commit is contained in:
parent
c8840b010c
commit
88a7778637
|
|
@ -191,7 +191,7 @@ public class SnifferConfigInitializer {
|
|||
* <p>
|
||||
* such as: Property key of `agent.service_name` should be `skywalking.agent.service_name`
|
||||
*/
|
||||
private static void overrideConfigBySystemProp() throws IllegalAccessException {
|
||||
private static void overrideConfigBySystemProp() {
|
||||
Properties systemProperties = System.getProperties();
|
||||
for (final Map.Entry<Object, Object> prop : systemProperties.entrySet()) {
|
||||
String key = prop.getKey().toString();
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class JsonLogger extends AbstractLogger {
|
|||
@Override
|
||||
protected String format(LogLevel level, String message, Throwable e) {
|
||||
LogEvent logEvent = new LogEvent(level, message, e, this.targetClass);
|
||||
Map<String, String> log = new HashMap<>();
|
||||
Map<String, String> log = new HashMap<>(this.converters.size());
|
||||
for (Converter converter : this.converters) {
|
||||
log.put(converter.getKey(), converter.convert(logEvent));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ public abstract class ClassEnhancePluginDefine extends AbstractClassEnhancePlugi
|
|||
* @param newClassBuilder byte-buddy's builder to manipulate class bytecode.
|
||||
* @return new byte-buddy's builder for further manipulation.
|
||||
*/
|
||||
@Override
|
||||
protected DynamicType.Builder<?> enhanceInstance(TypeDescription typeDescription,
|
||||
DynamicType.Builder<?> newClassBuilder, ClassLoader classLoader,
|
||||
EnhanceContext context) throws PluginException {
|
||||
|
|
@ -174,6 +175,7 @@ public abstract class ClassEnhancePluginDefine extends AbstractClassEnhancePlugi
|
|||
* @param newClassBuilder byte-buddy's builder to manipulate class bytecode.
|
||||
* @return new byte-buddy's builder for further manipulation.
|
||||
*/
|
||||
@Override
|
||||
protected DynamicType.Builder<?> enhanceClass(TypeDescription typeDescription, DynamicType.Builder<?> newClassBuilder,
|
||||
ClassLoader classLoader) throws PluginException {
|
||||
StaticMethodsInterceptPoint[] staticMethodsInterceptPoints = getStaticMethodsInterceptPoints();
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ import static net.bytebuddy.matcher.ElementMatchers.not;
|
|||
*/
|
||||
public abstract class ClassEnhancePluginDefineV2 extends AbstractClassEnhancePluginDefine {
|
||||
|
||||
@Override
|
||||
protected DynamicType.Builder<?> enhanceClass(TypeDescription typeDescription,
|
||||
DynamicType.Builder<?> newClassBuilder,
|
||||
ClassLoader classLoader) throws PluginException {
|
||||
|
|
@ -105,6 +106,7 @@ public abstract class ClassEnhancePluginDefineV2 extends AbstractClassEnhancePlu
|
|||
return newClassBuilder;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DynamicType.Builder<?> enhanceInstance(TypeDescription typeDescription,
|
||||
DynamicType.Builder<?> newClassBuilder, ClassLoader classLoader,
|
||||
EnhanceContext context) throws PluginException {
|
||||
|
|
|
|||
Loading…
Reference in New Issue