sirona-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1657520 - /incubator/sirona/trunk/agent/javaagent/src/main/java/org/apache/sirona/javaagent/AgentContext.java
Date Thu, 05 Feb 2015 10:31:45 GMT
Author: olamy
Date: Thu Feb  5 10:31:44 2015
New Revision: 1657520

URL: http://svn.apache.org/r1657520
Log:
use a constant for returning an empty array

Modified:
    incubator/sirona/trunk/agent/javaagent/src/main/java/org/apache/sirona/javaagent/AgentContext.java

Modified: incubator/sirona/trunk/agent/javaagent/src/main/java/org/apache/sirona/javaagent/AgentContext.java
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/agent/javaagent/src/main/java/org/apache/sirona/javaagent/AgentContext.java?rev=1657520&r1=1657519&r2=1657520&view=diff
==============================================================================
--- incubator/sirona/trunk/agent/javaagent/src/main/java/org/apache/sirona/javaagent/AgentContext.java
(original)
+++ incubator/sirona/trunk/agent/javaagent/src/main/java/org/apache/sirona/javaagent/AgentContext.java
Thu Feb  5 10:31:44 2015
@@ -58,6 +58,8 @@ public class AgentContext {
         PRIMITIVES.put("boolean", boolean.class);
     }
 
+    private static final Object[] EMPTY_ARRAY = new Object[0];
+
     public static void addAgentParameter( String key, String value){
         AGENT_PARAMETERS.put(key, value);
     }
@@ -185,7 +187,7 @@ public class AgentContext {
      */
     public Object[] getMethodParameters()
     {
-        return methodParameters == null ? new Object[0] : methodParameters;
+        return methodParameters == null ? EMPTY_ARRAY : methodParameters;
     }
 
     public Class<?> keyAsClass() {



Mime
View raw message