@@ -62,10 +62,6 @@ public static void agentmain(final String agentArgs, final Instrumentation inst)
6262 return ;
6363 }
6464
65- // for dynamic injection flow, we need to "register" the args since jvm doesn't
66- // handle them as it does in a startup flow via -D flag
67- parseAsSystemProperties (agentArgs );
68-
6965 try {
7066 final URL agentJarURL = installAgentJar (inst );
7167 final Class <?> agentClass = Class .forName ("datadog.trace.bootstrap.Agent" , true , null );
@@ -232,29 +228,6 @@ private static synchronized URL installAgentJar(final Instrumentation inst)
232228 return ddJavaAgentJarURL ;
233229 }
234230
235- public static void parseAsSystemProperties (String str ) {
236- if (str == null || str .length () == 0 ) return ;
237-
238- int begin = 0 ;
239- for (int sep_idx = str .indexOf (' ' );
240- begin < str .length () && sep_idx != -1 ;
241- sep_idx = str .indexOf (' ' , begin )) {
242- parseProperty (str .substring (begin , sep_idx ));
243- begin = sep_idx + 1 ;
244- while (begin < str .length () && str .charAt (begin ) == ' ' ) {
245- begin ++;
246- }
247- }
248- parseProperty (str .substring (begin ));
249- }
250-
251- private static void parseProperty (String prop ) {
252- int sep = prop .indexOf ('=' );
253- if (sep == -1 ) return ;
254-
255- System .setProperty (prop .substring (0 , sep ), prop .substring (sep + 1 ));
256- }
257-
258231 @ SuppressForbidden
259232 private static List <String > getVMArgumentsThroughReflection () {
260233 try {
0 commit comments