You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by jw...@apache.org on 2006/11/16 02:28:48 UTC
svn commit: r475538 -
/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java
Author: jwaldman
Date: Wed Nov 15 18:28:48 2006
New Revision: 475538
URL: http://svn.apache.org/viewvc?view=rev&rev=475538
Log:
minor fix in FileSystemStyleCache. I saw that we were calling some code outside of an else when it could be moved into the else to save a call to CSSGenerationUtils.getNamespacedSelectors when CSSGenerationUtils.isSingleStyleClassSelector is true.
Modified:
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java
Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java?view=diff&rev=475538&r1=475537&r2=475538
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java Wed Nov 15 18:28:48 2006
@@ -892,29 +892,31 @@
map.put(styleClass, _getShortStyleClass(map.size()));
}
}
- }
-
- // now go through the selectors and get the list of selectors
- // with the namespace prefix and put those into the shortend map
- int numNSPrefixes = _NS_PREFIX_ARRAY.length;
- for (int prefixIndex=0; prefixIndex< numNSPrefixes; prefixIndex++)
- {
- String nsPrefix = _NS_PREFIX_ARRAY[prefixIndex];
- Iterator<String> afSelectors =
- CSSGenerationUtils.getNamespacedSelectors(selector,
- nsPrefix,
- _STYLE_KEY_MAP);
- if (afSelectors != null)
+
+ // now go through the selectors and get the list of selectors
+ // with the namespace prefix and put those into the shortend map
+ int numNSPrefixes = _NS_PREFIX_ARRAY.length;
+ for (int prefixIndex=0; prefixIndex< numNSPrefixes; prefixIndex++)
{
- while (afSelectors.hasNext())
+ String nsPrefix = _NS_PREFIX_ARRAY[prefixIndex];
+ Iterator<String> afSelectors =
+ CSSGenerationUtils.getNamespacedSelectors(selector,
+ nsPrefix,
+ _STYLE_KEY_MAP);
+ if (afSelectors != null)
{
- String styleClass = afSelectors.next();
-
- if (!map.containsKey(styleClass))
- map.put(styleClass, _getShortStyleClass(map.size()));
+ while (afSelectors.hasNext())
+ {
+ String styleClass = afSelectors.next();
+
+ if (!map.containsKey(styleClass))
+ map.put(styleClass, _getShortStyleClass(map.size()));
+ }
}
}
}
+
+
}
}
}