myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwald...@apache.org
Subject svn commit: r770856 - /myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java
Date Sat, 02 May 2009 01:59:19 GMT
Author: jwaldman
Date: Fri May  1 23:08:09 2009
New Revision: 770856

URL: http://svn.apache.org/viewvc?rev=770856&view=rev
Log:
more @Override removal since it doesn't work for jdk1.5

Modified:
    myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java?rev=770856&r1=770855&r2=770856&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java
Fri May  1 23:08:09 2009
@@ -97,8 +97,8 @@
 //       synchronized blocks in the code, using HashMap hence
 //       looks like a better choice than Hashtable.
 // -= Blake Sullivan =-
-// rebuttal - _createEntry() which assigns values to _cache and _entryCache is called 
-// without a lock and these Maps are read without a lock. 
+// rebuttal - _createEntry() which assigns values to _cache and _entryCache is called
+// without a lock and these Maps are read without a lock.
 // _cache and _entryCache should probably be ConcurrentHashMaps.
 public class FileSystemStyleCache implements StyleProvider
 {
@@ -175,7 +175,6 @@
   /**
    * Implementation of StyleProvider.getStyles().
    */
-  @Override
   public Styles getStyles(StyleContext context)
   {
 
@@ -536,9 +535,9 @@
 
     // Generate the style sheet file, if it isn't already generated,
     // and return the uri.
-    // Only the StyleNodes with non-null selectors get written to the 
+    // Only the StyleNodes with non-null selectors get written to the
     // generated css file.
-    // Named styles (StyleNode where name != null) do not get 
+    // Named styles (StyleNode where name != null) do not get
     // written to the generated css file.
     List<String> uris = _createStyleSheetFiles(context,
                                        document,
@@ -561,7 +560,7 @@
     // Create a new entry and cache it in the "normal" cache. The "normal" cache is one
     // where the key is the Key object which is built based on information from the StyleContext,
     // like browser, agent, locale, direction.
-    Styles styles = new StylesImpl(styleNodes, namespacePrefixes, _STYLE_KEY_MAP, 
+    Styles styles = new StylesImpl(styleNodes, namespacePrefixes, _STYLE_KEY_MAP,
                                    shortStyleClassMap,  _isCompressStyles(context));
     Entry entry = new Entry(uris, styles, icons, skinProperties);
     cache.put(key, entry);
@@ -1399,7 +1398,7 @@
 
   /**
    * A Styles implementation that adds the resolved (merged together based on the StyleContext)
-   * StyleNodes to a Map. Only the style selectors and not the aliased (aka named) styles

+   * StyleNodes to a Map. Only the style selectors and not the aliased (aka named) styles
    * are added to this map.
    */
   private static final class StylesImpl extends Styles
@@ -1408,15 +1407,15 @@
      * This constructor takes an array of StyleNode Objects where each StyleNode has
      * already been resolved based on the StyleContext. Therefore there is no
      * more merging that needs to be done, and the 'included' properties on
-     * StyleNode are all null. This way we do not have to resolve the 
+     * StyleNode are all null. This way we do not have to resolve the
      * styles based on the StyleContext when someone calls getStyles,
      * etc.
      * @param resolvedStyles
-     * @param namespacePrefixArray an array of namespace prefixes that are used in the custom
css 
+     * @param namespacePrefixArray an array of namespace prefixes that are used in the custom
css
      * skinning selectors, like "af" in af|inputText.
-     * @param afSelectoMap a map from one selector to another (like af|panelHeader::link
maps to 
+     * @param afSelectoMap a map from one selector to another (like af|panelHeader::link
maps to
      * af|panelHeader A
-     * @param shortStyleClassMap a map from the  non-compressed styleclass 
+     * @param shortStyleClassMap a map from the  non-compressed styleclass
      * to a compressed styleclass.
      */
     public StylesImpl(
@@ -1425,7 +1424,7 @@
         Map<String, String> afSelectorMap,
         Map<String, String> shortStyleClassMap,
         boolean             compress
-      ) 
+      )
     {
       // store these local variables to be used in getNativeSelectorString
       _namespacePrefixArray = namespacePrefixArray;
@@ -1447,18 +1446,18 @@
             resolvedSelectorStyleMap = new ConcurrentHashMap<Selector, Style>();
           resolvedSelectorStyleMap.put(Selector.createSelector(selector), style);
         }
-        /* 
+        /*
         else
         {
           // For now, do not add the named styles to the map. If we do add the named styles
           // to the map then we should in SkinStyleSheetParserUtils put the full name in
-          // the StyleNode, not strip out the '.' or the ':alias'. However, in the XSS 
+          // the StyleNode, not strip out the '.' or the ':alias'. However, in the XSS
           // the named styles do not have the '.' or the ':alias' which is why we string
them out.
           // if we put them back, then things won't merge correctly. How do I workaround
this?
           // Do I change all the named styles in the XSS file?
-          // I think the best thing to do is to change the XSS file, since that is proprietary,

+          // I think the best thing to do is to change the XSS file, since that is proprietary,
           // and no one should be relying on it. If we instead kept stripping out the . and
the alias
-          // and required the person to ask for the alias without this, 
+          // and required the person to ask for the alias without this,
           // that is much more confusing to the user.
           String name = _resolvedStyles[i].getName();
           if (name != null)
@@ -1471,38 +1470,36 @@
         */
       }
       if (resolvedSelectorStyleMap != null)
-        _unmodifiableResolvedSelectorStyleMap = 
+        _unmodifiableResolvedSelectorStyleMap =
           Collections.unmodifiableMap(resolvedSelectorStyleMap);
       else
         _unmodifiableResolvedSelectorStyleMap = Collections.emptyMap();
-        
+
     }
-    
+
     /**
      * Returns a Map containing the selector String as the key and the Style Object
      * (contains all the css property names/values) as the value. This Map can then be used
-     * to get all the selector keys, or to get the Style Object for a Selector, or to 
+     * to get all the selector keys, or to get the Style Object for a Selector, or to
      * get all the selectors that match some criteria, like they contain a certain simple
selector.
-     * This map does not contain 'alias' (aka named) selectors. It only contains selectors

+     * This map does not contain 'alias' (aka named) selectors. It only contains selectors
      * that would be in the generated css file.
-     * 
+     *
      * @return unmodifiableMap of the resolved Selector -> Style map.
      */
-    @Override
     public Map<Selector, Style> getSelectorStyleMap()
     {
       return _unmodifiableResolvedSelectorStyleMap;
-    }  
-    
+    }
+
     /**
      * Returns the Selector in String form, converted to a format that
-     * is suitable to be written to the browse. This is the css-2 format which doesn't have

+     * is suitable to be written to the browse. This is the css-2 format which doesn't have
      * namespaces and our psuedo-elements.
      * @param selector Selector
      * @return String the Selector in a String form that is suitable to be
      * written to the client.
      */
-    @Override
     public String getNativeSelectorString(Selector selector)
     {
       // convert the selector to a valid css2 selector like the ones we write
@@ -1511,27 +1508,27 @@
         throw new IllegalArgumentException("selector cannot be null");
       // run the selector through a conversion map so the selector is closer to
       // what we write out to the css. e.g., af|inputText:error::content becomes
-      // af|inputText.p_AFError af|inputText::content. This way we don't have to 
+      // af|inputText.p_AFError af|inputText::content. This way we don't have to
       // do this when we write the css inline. We have the information now.
       String mappedSelector =  CSSGenerationUtils.getMappedSelector(
         _afSelectorMap, _namespacePrefixArray, selector.toString());
       // run through the compressed map if it is compressed.
       if (_compress)
-        mappedSelector  = 
-          CSSGenerationUtils.getShortSelector(_shortStyleClassMap, 
-                                              _namespacePrefixArray, 
+        mappedSelector  =
+          CSSGenerationUtils.getShortSelector(_shortStyleClassMap,
+                                              _namespacePrefixArray,
                                               mappedSelector);
-      
+
       return CSSGenerationUtils.getValidFullNameSelector(
         mappedSelector, _namespacePrefixArray);
     }
 
-    
+
     /**
-     * Given a StyleNode object, which is an internal API that denotes a Style object 
+     * Given a StyleNode object, which is an internal API that denotes a Style object
      * with additional information like includedSelectors, create a simple public
      * Style object which will be used in the SelectorStyleMap. The StyleNode object
-     * should already be resolved (included selectors have been merged in) 
+     * should already be resolved (included selectors have been merged in)
      * so that all the css properties are there.
      * @param styleNode
      * @return A Style object created from the information in the styleNode.
@@ -1550,18 +1547,18 @@
         if (name != null && value != null)
           styleProperties.put(name, value);
       }
-      
+
       return new CSSStyle(styleProperties);
 
     }
-    
-    private final Map<Selector, Style> _unmodifiableResolvedSelectorStyleMap;    
+
+    private final Map<Selector, Style> _unmodifiableResolvedSelectorStyleMap;
     private final Map<String, String>  _afSelectorMap;
     private final String[]             _namespacePrefixArray;
     private final Map<String, String>  _shortStyleClassMap;
     private final boolean              _compress;
   }
-  
+
   private class StyleWriterFactoryImpl
     implements StyleWriterFactory
   {



Mime
View raw message