Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 7100)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 7103)
@@ -45,22 +45,17 @@
     static @interface NullableArguments {}
 
-    private static final List<Method> arrayFunctions;
-    private static final List<Method> parameterFunctions;
-    private static final List<Method> parameterFunctionsEnv;
+    private static final List<Method> arrayFunctions = new ArrayList<>();
+    private static final List<Method> parameterFunctions = new ArrayList<>();
+    private static final List<Method> parameterFunctionsEnv = new ArrayList<>();
 
     static {
-        arrayFunctions = new ArrayList<>();
-        parameterFunctions = new ArrayList<>();
-        parameterFunctionsEnv = new ArrayList<>();
         for (Method m : Functions.class.getDeclaredMethods()) {
             Class<?>[] paramTypes = m.getParameterTypes();
             if (paramTypes.length == 1 && paramTypes[0].isArray()) {
                 arrayFunctions.add(m);
+            } else if (paramTypes.length >= 1 && paramTypes[0].equals(Environment.class)) {
+                parameterFunctionsEnv.add(m);
             } else {
-                if (paramTypes[0].equals(Environment.class)) {
-                    parameterFunctionsEnv.add(m);
-                } else {
-                    parameterFunctions.add(m);
-                }
+                parameterFunctions.add(m);
             }
         }
@@ -98,5 +93,5 @@
     /**
      * List of functions that can be used in MapCSS expressions.
-     * 
+     *
      * First parameter can be of type {@link Environment} (if needed). This is
      * automatically filled in by JOSM and the user only sees the remaining
@@ -280,5 +275,5 @@
             return Utils.color_int2float(c.getAlpha());
         }
-        
+
         /**
          * Assembles the strings to one.
@@ -736,5 +731,5 @@
         }
     }
-    
+
     /**
      * Function that takes a certain number of argument with specific type.
@@ -762,5 +757,5 @@
         public Object evaluate(Environment env) {
             Object[] convertedArgs;
-            
+
             if (needsEnvironment) {
                 convertedArgs = new Object[args.size()+1];
