Skip to content

Commit 46af7ac

Browse files
authored
Merge pull request #307 from scouter-project/master
Release merge v0.5.1
2 parents 578f066 + c1b4d13 commit 46af7ac

File tree

5 files changed

+52
-35
lines changed

5 files changed

+52
-35
lines changed

scouter.agent.java/src/scouter/agent/Configure.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ public final static synchronized Configure getInstance() {
371371
public String hook_async_callrunnable_scan_package_prefixes = "";
372372

373373
@ConfigDesc("enable lambda expressioned class hook for detecting asyncronous processing. Only classes under the package configured by 'hook_async_callrunnable_scan_package_prefixes' is hooked.")
374-
public boolean hook_lambda_instrumentation_strategy_enabled = true;
374+
public boolean hook_lambda_instrumentation_strategy_enabled = false;
375375

376376
@ConfigDesc("")
377377
public String hook_add_fields = "";
@@ -662,7 +662,7 @@ private void apply() {
662662
this.hook_async_callrunnable_enable = getBoolean("hook_async_callrunnable_enable", true);
663663
this.hook_async_callrunnable_scan_package_prefixes = getValue("hook_async_callrunnable_scan_package_prefixes", "");
664664

665-
this.hook_lambda_instrumentation_strategy_enabled = getBoolean("hook_lambda_instrumentation_strategy_enabled", true);
665+
this.hook_lambda_instrumentation_strategy_enabled = getBoolean("hook_lambda_instrumentation_strategy_enabled", false);
666666

667667
this.hook_add_fields = getValue("hook_add_fields", "");
668668
this.hook_context_classes = getValue("hook_context_classes", "javax/naming/InitialContext");

scouter.agent.java/src/scouter/bytebuddy/ByteBuddy.java

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484
* @see AgentBuilder
8585
*/
8686
public class ByteBuddy {
87+
private static final String BYTE_BUDDY_VERSION = "1.6.9";
88+
8789
/**
8890
* The default prefix for the default {@link NamingStrategy}.
8991
*/
@@ -254,8 +256,8 @@ public <T> DynamicType.Builder<T> subclass(Class<T> superType, ConstructorStrate
254256
* </p>
255257
*
256258
* @param superType The super class or interface type to extend. The type must be a raw type or parameterized type. All type
257-
* variables that are referenced by the generic type must be declared by the generated subclass before creating
258-
* the type.
259+
* variables that are referenced by the generic type must be declared by the generated subclass before creating
260+
* the type.
259261
* @return A type builder for creating a new class extending the provided class or interface.
260262
*/
261263
public DynamicType.Builder<?> subclass(Type superType) {
@@ -277,8 +279,8 @@ public DynamicType.Builder<?> subclass(Type superType) {
277279
* </p>
278280
*
279281
* @param superType The super class or interface type to extend. The type must be a raw type or parameterized
280-
* type. All type variables that are referenced by the generic type must be declared by the
281-
* generated subclass before creating the type.
282+
* type. All type variables that are referenced by the generic type must be declared by the
283+
* generated subclass before creating the type.
282284
* @param constructorStrategy A constructor strategy that determines the
283285
* @return A type builder for creating a new class extending the provided class or interface.
284286
*/
@@ -306,8 +308,8 @@ public DynamicType.Builder<?> subclass(Type superType, ConstructorStrategy const
306308
* </p>
307309
*
308310
* @param superType The super class or interface type to extend. The type must be a raw type or parameterized type. All type
309-
* variables that are referenced by the generic type must be declared by the generated subclass before creating
310-
* the type.
311+
* variables that are referenced by the generic type must be declared by the generated subclass before creating
312+
* the type.
311313
* @return A type builder for creating a new class extending the provided class or interface.
312314
*/
313315
public DynamicType.Builder<?> subclass(TypeDefinition superType) {
@@ -329,8 +331,8 @@ public DynamicType.Builder<?> subclass(TypeDefinition superType) {
329331
* </p>
330332
*
331333
* @param superType The super class or interface type to extend. The type must be a raw type or parameterized
332-
* type. All type variables that are referenced by the generic type must be declared by the
333-
* generated subclass before creating the type.
334+
* type. All type variables that are referenced by the generic type must be declared by the
335+
* generated subclass before creating the type.
334336
* @param constructorStrategy A constructor strategy that determines the
335337
* @return A type builder for creating a new class extending the provided class or interface.
336338
*/
@@ -399,8 +401,8 @@ public <T> DynamicType.Builder<T> makeInterface(Class<T> interfaceType) {
399401
* </p>
400402
*
401403
* @param interfaceType The interface types to implement. The types must be raw or parameterized types. All type
402-
* variables that are referenced by a parameterized type must be declared by the generated
403-
* subclass before creating the type.
404+
* variables that are referenced by a parameterized type must be declared by the generated
405+
* subclass before creating the type.
404406
* @return A type builder that creates a new interface type.
405407
*/
406408
public DynamicType.Builder<?> makeInterface(Type... interfaceType) {
@@ -421,8 +423,8 @@ public DynamicType.Builder<?> makeInterface(Type... interfaceType) {
421423
* </p>
422424
*
423425
* @param interfaceTypes The interface types to implement. The types must be raw or parameterized types. All
424-
* type variables that are referenced by a parameterized type must be declared by the
425-
* generated subclass before creating the type.
426+
* type variables that are referenced by a parameterized type must be declared by the
427+
* generated subclass before creating the type.
426428
* @return A type builder that creates a new interface type.
427429
*/
428430
public DynamicType.Builder<?> makeInterface(List<? extends Type> interfaceTypes) {
@@ -443,8 +445,8 @@ public DynamicType.Builder<?> makeInterface(List<? extends Type> interfaceTypes)
443445
* </p>
444446
*
445447
* @param interfaceType The interface types to implement. The types must be raw or parameterized types. All
446-
* type variables that are referenced by a parameterized type must be declared by the
447-
* generated subclass before creating the type.
448+
* type variables that are referenced by a parameterized type must be declared by the
449+
* generated subclass before creating the type.
448450
* @return A type builder that creates a new interface type.
449451
*/
450452
public DynamicType.Builder<?> makeInterface(TypeDefinition... interfaceType) {
@@ -465,8 +467,8 @@ public DynamicType.Builder<?> makeInterface(TypeDefinition... interfaceType) {
465467
* </p>
466468
*
467469
* @param interfaceTypes The interface types to implement. The types must be raw or parameterized types. All
468-
* type variables that are referenced by a parameterized type must be declared by the
469-
* generated subclass before creating the type.
470+
* type variables that are referenced by a parameterized type must be declared by the
471+
* generated subclass before creating the type.
470472
* @return A type builder that creates a new interface type.
471473
*/
472474
public DynamicType.Builder<?> makeInterface(Collection<? extends TypeDefinition> interfaceTypes) {
@@ -968,7 +970,8 @@ public boolean equals(final java.lang.Object o) {
968970
if (!other.canEqual((java.lang.Object) this)) return false;
969971
final java.lang.Object this$instrumentedType = this.instrumentedType;
970972
final java.lang.Object other$instrumentedType = other.instrumentedType;
971-
if (this$instrumentedType == null ? other$instrumentedType != null : !this$instrumentedType.equals(other$instrumentedType)) return false;
973+
if (this$instrumentedType == null ? other$instrumentedType != null : !this$instrumentedType.equals(other$instrumentedType))
974+
return false;
972975
return true;
973976
}
974977

@@ -1102,34 +1105,44 @@ public boolean equals(final java.lang.Object o) {
11021105
if (!other.canEqual((java.lang.Object) this)) return false;
11031106
final java.lang.Object this$classFileVersion = this.classFileVersion;
11041107
final java.lang.Object other$classFileVersion = other.classFileVersion;
1105-
if (this$classFileVersion == null ? other$classFileVersion != null : !this$classFileVersion.equals(other$classFileVersion)) return false;
1108+
if (this$classFileVersion == null ? other$classFileVersion != null : !this$classFileVersion.equals(other$classFileVersion))
1109+
return false;
11061110
final java.lang.Object this$namingStrategy = this.namingStrategy;
11071111
final java.lang.Object other$namingStrategy = other.namingStrategy;
1108-
if (this$namingStrategy == null ? other$namingStrategy != null : !this$namingStrategy.equals(other$namingStrategy)) return false;
1112+
if (this$namingStrategy == null ? other$namingStrategy != null : !this$namingStrategy.equals(other$namingStrategy))
1113+
return false;
11091114
final java.lang.Object this$auxiliaryTypeNamingStrategy = this.auxiliaryTypeNamingStrategy;
11101115
final java.lang.Object other$auxiliaryTypeNamingStrategy = other.auxiliaryTypeNamingStrategy;
1111-
if (this$auxiliaryTypeNamingStrategy == null ? other$auxiliaryTypeNamingStrategy != null : !this$auxiliaryTypeNamingStrategy.equals(other$auxiliaryTypeNamingStrategy)) return false;
1116+
if (this$auxiliaryTypeNamingStrategy == null ? other$auxiliaryTypeNamingStrategy != null : !this$auxiliaryTypeNamingStrategy.equals(other$auxiliaryTypeNamingStrategy))
1117+
return false;
11121118
final java.lang.Object this$annotationValueFilterFactory = this.annotationValueFilterFactory;
11131119
final java.lang.Object other$annotationValueFilterFactory = other.annotationValueFilterFactory;
1114-
if (this$annotationValueFilterFactory == null ? other$annotationValueFilterFactory != null : !this$annotationValueFilterFactory.equals(other$annotationValueFilterFactory)) return false;
1120+
if (this$annotationValueFilterFactory == null ? other$annotationValueFilterFactory != null : !this$annotationValueFilterFactory.equals(other$annotationValueFilterFactory))
1121+
return false;
11151122
final java.lang.Object this$annotationRetention = this.annotationRetention;
11161123
final java.lang.Object other$annotationRetention = other.annotationRetention;
1117-
if (this$annotationRetention == null ? other$annotationRetention != null : !this$annotationRetention.equals(other$annotationRetention)) return false;
1124+
if (this$annotationRetention == null ? other$annotationRetention != null : !this$annotationRetention.equals(other$annotationRetention))
1125+
return false;
11181126
final java.lang.Object this$implementationContextFactory = this.implementationContextFactory;
11191127
final java.lang.Object other$implementationContextFactory = other.implementationContextFactory;
1120-
if (this$implementationContextFactory == null ? other$implementationContextFactory != null : !this$implementationContextFactory.equals(other$implementationContextFactory)) return false;
1128+
if (this$implementationContextFactory == null ? other$implementationContextFactory != null : !this$implementationContextFactory.equals(other$implementationContextFactory))
1129+
return false;
11211130
final java.lang.Object this$methodGraphCompiler = this.methodGraphCompiler;
11221131
final java.lang.Object other$methodGraphCompiler = other.methodGraphCompiler;
1123-
if (this$methodGraphCompiler == null ? other$methodGraphCompiler != null : !this$methodGraphCompiler.equals(other$methodGraphCompiler)) return false;
1132+
if (this$methodGraphCompiler == null ? other$methodGraphCompiler != null : !this$methodGraphCompiler.equals(other$methodGraphCompiler))
1133+
return false;
11241134
final java.lang.Object this$instrumentedTypeFactory = this.instrumentedTypeFactory;
11251135
final java.lang.Object other$instrumentedTypeFactory = other.instrumentedTypeFactory;
1126-
if (this$instrumentedTypeFactory == null ? other$instrumentedTypeFactory != null : !this$instrumentedTypeFactory.equals(other$instrumentedTypeFactory)) return false;
1136+
if (this$instrumentedTypeFactory == null ? other$instrumentedTypeFactory != null : !this$instrumentedTypeFactory.equals(other$instrumentedTypeFactory))
1137+
return false;
11271138
final java.lang.Object this$ignoredMethods = this.ignoredMethods;
11281139
final java.lang.Object other$ignoredMethods = other.ignoredMethods;
1129-
if (this$ignoredMethods == null ? other$ignoredMethods != null : !this$ignoredMethods.equals(other$ignoredMethods)) return false;
1140+
if (this$ignoredMethods == null ? other$ignoredMethods != null : !this$ignoredMethods.equals(other$ignoredMethods))
1141+
return false;
11301142
final java.lang.Object this$typeValidation = this.typeValidation;
11311143
final java.lang.Object other$typeValidation = other.typeValidation;
1132-
if (this$typeValidation == null ? other$typeValidation != null : !this$typeValidation.equals(other$typeValidation)) return false;
1144+
if (this$typeValidation == null ? other$typeValidation != null : !this$typeValidation.equals(other$typeValidation))
1145+
return false;
11331146
return true;
11341147
}
11351148

scouter.client/src/scouter/client/util/ConsoleProxy.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@
2222
import org.eclipse.ui.IWorkbenchPage;
2323
import org.eclipse.ui.IWorkbenchWindow;
2424
import org.eclipse.ui.PlatformUI;
25-
import org.eclipse.ui.console.ConsolePlugin;
26-
import org.eclipse.ui.console.IConsole;
27-
import org.eclipse.ui.console.IConsoleConstants;
28-
import org.eclipse.ui.console.MessageConsole;
29-
import org.eclipse.ui.console.MessageConsoleStream;
25+
import org.eclipse.ui.console.*;
26+
27+
import java.io.PrintStream;
3028

3129

3230
public class ConsoleProxy {
@@ -148,6 +146,10 @@ private MessageConsoleStream getNewMessageConsoleStream(int msgKind) {
148146
}
149147

150148
MessageConsoleStream msgConsoleStream = getMessageConsole().newMessageStream();
149+
PrintStream myS = new PrintStream(msgConsoleStream);
150+
System.setOut(myS);
151+
System.setErr(myS);
152+
151153
try {
152154
Color c = ColorUtil.getInstance().getColor(swtColorId);
153155
msgConsoleStream.setColor(c);

scouter.client/src/scouter/client/xlog/ProfileText.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,8 @@ public static String simplifyMethod(String method) {
930930
String methodName = parts[parts.length - 1];
931931
int bracePos = methodName.indexOf('(');
932932

933+
if(bracePos <= 0) return method;
934+
933935
return parts[parts.length - 2] + "#" + methodName.substring(0, bracePos) + "()";
934936
} else {
935937
return method;

scouter.deploy/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<property name="deploy-dir" value="./out/package"/>
55
<property name="outpack-dir" value="./out"/>
66

7-
<property name="VERSION" value="0.5.0"/>
7+
<property name="VERSION" value="0.5.1"/>
88

99

1010
<target name="packing">

0 commit comments

Comments
 (0)