Author: nbelaevski
Date: 2011-03-09 07:03:27 -0500 (Wed, 09 Mar 2011)
New Revision: 22098
Removed:
branches/4.0.X/core/impl/src/test/java/org/richfaces/skin/SkinThreadsTestCase.java
Modified:
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/JSObject.java
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/JSReference.java
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/PropertyUtils.java
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/model/SequenceDataModel.java
branches/4.0.X/core/api/src/main/java/org/richfaces/cache/CacheFactory.java
branches/4.0.X/core/api/src/main/java/org/richfaces/renderkit/AjaxConstants.java
branches/4.0.X/core/api/src/main/java/org/richfaces/renderkit/util/CoreAjaxRendererUtils.java
branches/4.0.X/core/api/src/main/java/org/richfaces/resource/ImageType.java
branches/4.0.X/core/api/src/main/java/org/richfaces/skin/SkinFactory.java
branches/4.0.X/core/api/src/main/java/org/richfaces/skin/SkinNotFoundException.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/application/push/impl/AtmospherePushHandler.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/cache/JBossCacheCache.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/cache/JBossCacheCacheFactory.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/cache/OSCacheCacheFactory.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/context/RenderComponentCallback.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/util/CoreRendererUtils.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/resource/ExternalStaticResource.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/resource/ResourceFactoryImpl.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/skin/SkinBean.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/util/Util.java
branches/4.0.X/core/impl/src/test/java/org/richfaces/cache/BaseCacheTest.java
branches/4.0.X/core/impl/src/test/java/org/richfaces/context/AjaxTableComponentImpl.java
Log:
TODOs and small refactorings
Modified: branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/JSObject.java
===================================================================
--- branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/JSObject.java 2011-03-09
10:35:12 UTC (rev 22097)
+++ branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/JSObject.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -38,8 +38,6 @@
*/
public JSObject(String name, Object... parameters) {
super(name, parameters);
-
- // TODO Auto-generated constructor stub
}
public void appendScript(Appendable target) throws IOException {
Modified: branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/JSReference.java
===================================================================
---
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/JSReference.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/JSReference.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -54,8 +54,6 @@
* @param index
*/
public JSReference(String name, Object index) {
-
- // TODO Auto-generated constructor stub
this.name = name;
this.index = index;
}
Modified:
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/PropertyUtils.java
===================================================================
---
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/PropertyUtils.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/PropertyUtils.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -56,8 +56,6 @@
PropertyDescriptor[] descriptors = null;
try {
-
- // TODO - cache introspection info?
BeanInfo beanInfo = Introspector.getBeanInfo(bean.getClass());
descriptors = beanInfo.getPropertyDescriptors();
Modified: branches/4.0.X/core/api/src/main/java/org/ajax4jsf/model/SequenceDataModel.java
===================================================================
---
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/model/SequenceDataModel.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/model/SequenceDataModel.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -42,46 +42,6 @@
this.wrappedModel = wrapped;
}
- /*
- * (non-Javadoc)
- * @see
org.ajax4jsf.ajax.repeat.ExtendedDataModel#dataIterator(org.ajax4jsf.ajax.repeat.Range)
- */
-
-/* public Iterator dataIterator(Range range) {
- final SequenceRange seqRange = (SequenceRange) range;
- int rows = seqRange.getRows();
- int rowCount = wrapped.getRowCount();
- final int firstRow = seqRange.getFirstRow();
- if(rows > 0){
- rows += firstRow;
- if(rowCount >=0){
- rows = Math.min(rows, rowCount);
- }
- } else if(rowCount >=0 ){
- rows = rowCount;
- }
- final int maxRow = rows;
- return new Iterator(){
-
- int rowIndex = firstRow;
-
- public boolean hasNext() {
- // TODO Auto-generated method stub
- return maxRow < 0 || rowIndex < maxRow;
- }
-
- public Object next() {
- // TODO Auto-generated method stub
- return new Integer(rowIndex++);
- }
-
- public void remove() {
- throw new IllegalStateException();
- }
-
- };
- }
-*/
public void walk(FacesContext context, DataVisitor visitor, Range range, Object
argument) {
final SequenceRange seqRange = (SequenceRange) range;
int rows = seqRange.getRows();
@@ -152,8 +112,6 @@
* @see javax.faces.model.DataModel#getRowCount()
*/
public int getRowCount() {
-
- // TODO Auto-generated method stub
return wrappedModel.getRowCount();
}
@@ -162,8 +120,6 @@
* @see javax.faces.model.DataModel#getRowData()
*/
public E getRowData() {
-
- // TODO Auto-generated method stub
return wrappedModel.getRowData();
}
@@ -172,8 +128,6 @@
* @see javax.faces.model.DataModel#getRowIndex()
*/
public int getRowIndex() {
-
- // TODO Auto-generated method stub
return wrappedModel.getRowIndex();
}
@@ -182,8 +136,6 @@
* @see javax.faces.model.DataModel#getWrappedData()
*/
public Object getWrappedData() {
-
- // TODO Auto-generated method stub
return wrappedModel.getWrappedData();
}
@@ -192,8 +144,6 @@
* @see javax.faces.model.DataModel#isRowAvailable()
*/
public boolean isRowAvailable() {
-
- // TODO Auto-generated method stub
return wrappedModel.isRowAvailable();
}
Modified: branches/4.0.X/core/api/src/main/java/org/richfaces/cache/CacheFactory.java
===================================================================
--- branches/4.0.X/core/api/src/main/java/org/richfaces/cache/CacheFactory.java 2011-03-09
10:35:12 UTC (rev 22097)
+++ branches/4.0.X/core/api/src/main/java/org/richfaces/cache/CacheFactory.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -35,13 +35,11 @@
public interface CacheFactory {
/**
- * creates a new implementation specific Cache object using the env parameters.
- * @param env implementation specific environment parameters passed to the
- * CacheFactory.
- * @param cacheLoader implementation of the {@link CacheLoader} to use
- * @param cacheConfigurationloader TODO
+ * Creates a new implementation specific Cache object using the env parameters.
+ * @param facesContext
+ * @param cacheName
+ * @param env
* @return an implementation specific Cache object.
- * @throws CacheException if any error occurs.
*/
public Cache createCache(FacesContext facesContext, String cacheName, Map<?, ?>
env);
Modified:
branches/4.0.X/core/api/src/main/java/org/richfaces/renderkit/AjaxConstants.java
===================================================================
---
branches/4.0.X/core/api/src/main/java/org/richfaces/renderkit/AjaxConstants.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/api/src/main/java/org/richfaces/renderkit/AjaxConstants.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -35,7 +35,6 @@
public static final String BEHAVIOR_EVENT_PARAMETER =
"javax.faces.behavior.event";
- //TODO - review
public static final String AJAX_COMPONENT_ID_PARAMETER =
"org.richfaces.ajax.component";
}
Modified:
branches/4.0.X/core/api/src/main/java/org/richfaces/renderkit/util/CoreAjaxRendererUtils.java
===================================================================
---
branches/4.0.X/core/api/src/main/java/org/richfaces/renderkit/util/CoreAjaxRendererUtils.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/api/src/main/java/org/richfaces/renderkit/util/CoreAjaxRendererUtils.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -50,25 +50,6 @@
public final class CoreAjaxRendererUtils {
/**
- * Attribute for keep JavaScript function name for call before updating
- * DOM tree.
- */
- public static final String ONBEFOREDOMUPDATE_ATTR_NAME =
"onbeforedomupdate";
-
- /**
- * Attribute for keep JavaScript function name for call after complete
- * request.
- */
- public static final String ONCOMPLETE_ATTR_NAME = "oncomplete";
-
- public static final String DATA_ATTR_NAME = "data";
-
- /**
- * Attribute to keep
- */
- public static final String LIMITRENDER_ATTR_NAME = "limitRender";
-
- /**
* @since 3.3.0
*/
public static final String AJAX_PROCESS_ATTRIBUTE = "process";
@@ -238,57 +219,4 @@
return null;
}
-
- /**
- * Calculate, must be component render only given areas, or all sended from
- * server.
- *
- * @param component
- * @return <code>true</code> if client must render ONLY given areas.
- */
- public static boolean isAjaxLimitRender(UIComponent component) {
- boolean result = false;
-
- Object limitRenderObject = component.getAttributes().get(LIMITRENDER_ATTR_NAME);
- if (limitRenderObject instanceof Boolean) {
- result = ((Boolean) limitRenderObject).booleanValue();
- } else {
- result = Boolean.valueOf(String.valueOf(limitRenderObject));
- }
-
- return result;
- }
-
-
- /**
- * Get function name for call on completed ajax request.
- *
- * @param component for wich calculate function name
- * @return name of JavaScript function or <code>null</code>
- */
- //TODO nick - refactor - remove this method?
- public static String getAjaxOncomplete(UIComponent component) {
- return (String) component.getAttributes().get(ONCOMPLETE_ATTR_NAME);
- }
-
- /**
- * Get function name for call before update DOM.
- *
- * @param component for wich calculate function name
- * @return name of JavaScript function or <code>null</code>
- */
- //TODO nick - refactor - remove this method?
- public static String getAjaxOnBeforeDomUpdate(UIComponent component) {
- return (String) component.getAttributes().get(ONBEFOREDOMUPDATE_ATTR_NAME);
- }
-
- /**
- * @param component
- * @return
- * @since 4.0
- */
- public static Object getAjaxData(UIComponent component) {
- return component.getAttributes().get(DATA_ATTR_NAME);
- }
-
}
Modified: branches/4.0.X/core/api/src/main/java/org/richfaces/resource/ImageType.java
===================================================================
--- branches/4.0.X/core/api/src/main/java/org/richfaces/resource/ImageType.java 2011-03-09
10:35:12 UTC (rev 22097)
+++ branches/4.0.X/core/api/src/main/java/org/richfaces/resource/ImageType.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -50,8 +50,6 @@
return new BufferedImage(width, height, BufferedImage.TYPE_BYTE_INDEXED,
SAFE_WEB_COLORS_MODEL);
}
},
-
- // TODO - add common png8
JPEG("jpeg") {
@Override
public BufferedImage createImage(int width, int height) {
Modified: branches/4.0.X/core/api/src/main/java/org/richfaces/skin/SkinFactory.java
===================================================================
--- branches/4.0.X/core/api/src/main/java/org/richfaces/skin/SkinFactory.java 2011-03-09
10:35:12 UTC (rev 22097)
+++ branches/4.0.X/core/api/src/main/java/org/richfaces/skin/SkinFactory.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -28,22 +28,13 @@
/**
* Base factory class ( implement Singleton design pattern ). Produce self
* instance to build current skin configuration. At present, realised as lazy
- * creation factory. TODO - select point to initialize.
+ * creation factory.
*
* @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
* @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:43 $
*/
public abstract class SkinFactory {
- /**
- * Initialize skin factory. TODO - make call from init() method of any
- * servlet or custom faces element method ??? If exist resource
- * META-INF/services/org.richfaces.skin.SkinFactory , create
- * instance of class by name from first line of this file. If such class
- * have constructor with {@link SkinFactory} parameter, instantiate it with
- * instance of default factory ( as usual in JSF ). If any error occurs in
- * instantiate custom factory, return default.
- */
@Deprecated
public static final SkinFactory getInstance() {
return getInstance(FacesContext.getCurrentInstance());
Modified:
branches/4.0.X/core/api/src/main/java/org/richfaces/skin/SkinNotFoundException.java
===================================================================
---
branches/4.0.X/core/api/src/main/java/org/richfaces/skin/SkinNotFoundException.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/api/src/main/java/org/richfaces/skin/SkinNotFoundException.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -34,25 +34,17 @@
public SkinNotFoundException() {
super();
-
- // TODO Auto-generated constructor stub
}
public SkinNotFoundException(String arg0) {
super(arg0);
-
- // TODO Auto-generated constructor stub
}
public SkinNotFoundException(Throwable arg0) {
super(arg0);
-
- // TODO Auto-generated constructor stub
}
public SkinNotFoundException(String arg0, Throwable arg1) {
super(arg0, arg1);
-
- // TODO Auto-generated constructor stub
}
}
Modified:
branches/4.0.X/core/impl/src/main/java/org/richfaces/application/push/impl/AtmospherePushHandler.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/application/push/impl/AtmospherePushHandler.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/application/push/impl/AtmospherePushHandler.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -22,6 +22,7 @@
package org.richfaces.application.push.impl;
import java.io.IOException;
+import java.text.MessageFormat;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
@@ -73,8 +74,6 @@
}
public void onRequest(AtmosphereResource<HttpServletRequest,
HttpServletResponse> resource) throws IOException {
- // TODO Auto-generated method stub
-
HttpServletRequest req = resource.getRequest();
HttpServletResponse resp = resource.getResponse();
@@ -87,7 +86,9 @@
}
if (session == null) {
- //TODO - debug log
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(MessageFormat.format("Session {0} was not found",
pushSessionId));
+ }
resp.sendError(HttpServletResponse.SC_BAD_REQUEST);
return;
}
@@ -98,8 +99,7 @@
Request request = createRequest(resource, session);
request.suspend();
} catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ LOGGER.error(e.getMessage(), e);
}
}
Modified: branches/4.0.X/core/impl/src/main/java/org/richfaces/cache/JBossCacheCache.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/cache/JBossCacheCache.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/cache/JBossCacheCache.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -17,12 +17,17 @@
import org.jboss.cache.Cache;
import org.jboss.cache.Fqn;
import org.jboss.cache.eviction.ExpirationAlgorithmConfig;
+import org.richfaces.log.Logger;
+import org.richfaces.log.RichfacesLogger;
/**
* @author Nick Belaevski
* @since 4.0
*/
public class JBossCacheCache implements org.richfaces.cache.Cache {
+
+ private static final Logger LOGGER = RichfacesLogger.CACHE.getLogger();
+
private static final String RESOURCE = "resource";
private Cache<String, Object> cache;
@@ -59,29 +64,17 @@
transaction.commit();
}
} catch (SystemException e) {
-
- // TODO Auto-generated catch block
- e.printStackTrace();
+ LOGGER.error(e.getMessage(), e);
} catch (SecurityException e) {
-
- // TODO Auto-generated catch block
- e.printStackTrace();
+ LOGGER.error(e.getMessage(), e);
} catch (IllegalStateException e) {
-
- // TODO Auto-generated catch block
- e.printStackTrace();
+ LOGGER.error(e.getMessage(), e);
} catch (RollbackException e) {
-
- // TODO Auto-generated catch block
- e.printStackTrace();
+ LOGGER.error(e.getMessage(), e);
} catch (HeuristicMixedException e) {
-
- // TODO Auto-generated catch block
- e.printStackTrace();
+ LOGGER.error(e.getMessage(), e);
} catch (HeuristicRollbackException e) {
-
- // TODO Auto-generated catch block
- e.printStackTrace();
+ LOGGER.error(e.getMessage(), e);
}
}
Modified:
branches/4.0.X/core/impl/src/main/java/org/richfaces/cache/JBossCacheCacheFactory.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/cache/JBossCacheCacheFactory.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/cache/JBossCacheCacheFactory.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -82,9 +82,7 @@
try {
stream.close();
} catch (IOException e) {
-
- // TODO Auto-generated catch block
- e.printStackTrace();
+ LOG.debug(e.getMessage(), e);
}
}
}
Modified:
branches/4.0.X/core/impl/src/main/java/org/richfaces/cache/OSCacheCacheFactory.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/cache/OSCacheCacheFactory.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/cache/OSCacheCacheFactory.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -32,6 +32,7 @@
import java.util.Map;
import java.util.Properties;
+import javax.faces.FacesException;
import javax.faces.context.FacesContext;
import org.ajax4jsf.resource.util.URLToStreamHelper;
@@ -75,8 +76,7 @@
try {
stream.close();
} catch (IOException e) {
-
- // TODO: handle exception
+ LOG.debug(e.getMessage(), e);
}
}
}
@@ -91,17 +91,13 @@
try {
cacheProperties.putAll(loadProperties());
} catch (IOException e) {
-
- // TODO Auto-generated catch block
- e.printStackTrace();
+ throw new FacesException(e.getMessage(), e);
}
try {
cacheProperties.putAll(loadProperties());
} catch (IOException e) {
-
- // TODO Auto-generated catch block
- e.printStackTrace();
+ throw new FacesException(e.getMessage(), e);
}
cacheProperties.putAll(env);
Modified:
branches/4.0.X/core/impl/src/main/java/org/richfaces/context/RenderComponentCallback.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/context/RenderComponentCallback.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/context/RenderComponentCallback.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -28,7 +28,6 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.component.AjaxClientBehavior;
-import org.richfaces.renderkit.util.CoreAjaxRendererUtils;
import org.richfaces.renderkit.util.CoreRendererUtils;
/**
@@ -82,10 +81,10 @@
data = behavior.getData();
} else {
renderValue = target.getAttributes().get("render");
- limitRender = CoreAjaxRendererUtils.isAjaxLimitRender(target);
- onbeforedomupdate = CoreAjaxRendererUtils.getAjaxOnBeforeDomUpdate(target);
- oncomplete = CoreAjaxRendererUtils.getAjaxOncomplete(target);
- data = CoreAjaxRendererUtils.getAjaxData(target);
+ limitRender = isTrue(target.getAttributes().get("limitRender"));
+ onbeforedomupdate = (String)
target.getAttributes().get("onbeforedomupdate");
+ oncomplete = (String) target.getAttributes().get("oncomplete");
+ data = target.getAttributes().get("data");
}
Collection<String> unresolvedRenderIds = toCollection(renderValue);
@@ -93,4 +92,16 @@
renderIds = CoreRendererUtils.INSTANCE.findComponentsFor(facesContext, target,
unresolvedRenderIds);
}
+ private boolean isTrue(Object value) {
+ boolean result = false;
+
+ if (value instanceof Boolean) {
+ result = ((Boolean) value).booleanValue();
+ } else {
+ result = Boolean.valueOf(String.valueOf(value));
+ }
+
+ return result;
+ }
+
}
Modified:
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/util/CoreRendererUtils.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/util/CoreRendererUtils.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/util/CoreRendererUtils.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -118,9 +118,6 @@
*/
public Collection<String> findComponentsFor(FacesContext context, UIComponent
component,
Collection<String> shortIds) {
-
- // TODO - implement
- // TODO add support for @*
Set<String> result = new LinkedHashSet<String>(shortIds.size());
if (checkKeyword(shortIds, ALL)) {
Modified:
branches/4.0.X/core/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -56,7 +56,6 @@
super();
}
- // TODO remove FacesContext argument?
protected int getContentLength(FacesContext context) {
return -1;
}
@@ -116,9 +115,7 @@
}
}
} catch (IOException e) {
-
- // TODO Auto-generated catch block
- e.printStackTrace();
+ LOGGER.error(e.getMessage(), e);
}
} else {
if (LOGGER.isDebugEnabled()) {
@@ -140,7 +137,6 @@
return classLoader;
}
- //TODO nick - review
private String getResourceVersion() {
if (this instanceof VersionedResource) {
return ((VersionedResource) this).getVersion();
@@ -151,8 +147,6 @@
@Override
public String getRequestPath() {
-
- // TODO - cache resource request path in request scope
FacesContext context = FacesContext.getCurrentInstance();
ResourceCodec resourceCodec = ServiceTracker.getService(context,
ResourceCodec.class);
String libraryName = getLibraryName();
@@ -207,8 +201,6 @@
String contentType = getContentType();
if (contentType != null) {
-
- // TODO add content-encoding?
headers.put("Content-Type", contentType);
}
Modified:
branches/4.0.X/core/impl/src/main/java/org/richfaces/resource/ExternalStaticResource.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/resource/ExternalStaticResource.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/resource/ExternalStaticResource.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -98,7 +98,6 @@
@Override
public URL getURL() {
- //TODO - review
throw new UnsupportedOperationException();
}
Modified:
branches/4.0.X/core/impl/src/main/java/org/richfaces/resource/ResourceFactoryImpl.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/resource/ResourceFactoryImpl.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/resource/ResourceFactoryImpl.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -303,7 +303,6 @@
* @return
*/
protected Resource createHandlerDependentResource(ResourceKey resourceKey,
Map<String, String> parameters) {
- // TODO nick - libraryName as package name?
if (!Strings.isNullOrEmpty(resourceKey.getLibraryName())) {
return null;
}
@@ -357,7 +356,6 @@
private boolean checkResourceMarker(String resourceName) {
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
- // TODO resource marker extension name?
URL resourceMarkerUrl = contextClassLoader.getResource("META-INF/" +
resourceName
+ ".resource.properties");
Modified: branches/4.0.X/core/impl/src/main/java/org/richfaces/skin/SkinBean.java
===================================================================
--- branches/4.0.X/core/impl/src/main/java/org/richfaces/skin/SkinBean.java 2011-03-09
10:35:12 UTC (rev 22097)
+++ branches/4.0.X/core/impl/src/main/java/org/richfaces/skin/SkinBean.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -39,8 +39,6 @@
* @see org.richfaces.skin.Skin#hashCode(javax.faces.context.FacesContext)
*/
public int hashCode(FacesContext context) {
-
- // TODO Auto-generated method stub
return getSkin().hashCode(context);
}
@@ -50,8 +48,6 @@
*/
@Override
public Set entrySet() {
-
- // TODO Auto-generated method stub
return Collections.EMPTY_SET;
}
@@ -84,7 +80,7 @@
private Skin getSkin() {
FacesContext context = FacesContext.getCurrentInstance();
- return SkinFactory.getInstance().getSkin(context);
+ return SkinFactory.getInstance(context).getSkin(context);
}
/*
@@ -102,8 +98,6 @@
*/
@Override
public boolean isEmpty() {
-
- // TODO Auto-generated method stub
return false;
}
@@ -130,7 +124,7 @@
/* Static methods for manipulate skins */
public static Object skinHashCode() {
FacesContext context = FacesContext.getCurrentInstance();
- int hashCode = SkinFactory.getInstance().getSkin(context).hashCode(context);
+ int hashCode =
SkinFactory.getInstance(context).getSkin(context).hashCode(context);
byte[] bs = ByteBuffer.allocate(4).putInt(hashCode).array();
return bs;
Modified: branches/4.0.X/core/impl/src/main/java/org/richfaces/util/Util.java
===================================================================
--- branches/4.0.X/core/impl/src/main/java/org/richfaces/util/Util.java 2011-03-09
10:35:12 UTC (rev 22097)
+++ branches/4.0.X/core/impl/src/main/java/org/richfaces/util/Util.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -167,9 +167,7 @@
try {
result = (Date) ((Format)
RFC1123_DATE_FORMATTER.clone()).parseObject(s);
} catch (ParseException e) {
-
- // TODO Auto-generated catch block
- e.printStackTrace();
+ RESOURCE_LOGGER.error(e.getMessage(), e);
}
}
Modified: branches/4.0.X/core/impl/src/test/java/org/richfaces/cache/BaseCacheTest.java
===================================================================
---
branches/4.0.X/core/impl/src/test/java/org/richfaces/cache/BaseCacheTest.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/impl/src/test/java/org/richfaces/cache/BaseCacheTest.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -203,8 +203,6 @@
try {
thread.join();
} catch (InterruptedException e) {
-
- // TODO Auto-generated catch block
failure.set(true);
}
}
Modified:
branches/4.0.X/core/impl/src/test/java/org/richfaces/context/AjaxTableComponentImpl.java
===================================================================
---
branches/4.0.X/core/impl/src/test/java/org/richfaces/context/AjaxTableComponentImpl.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/impl/src/test/java/org/richfaces/context/AjaxTableComponentImpl.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -65,10 +65,6 @@
assert idsToVisit != null;
- if (idsToVisit == VisitContext.ALL_IDS) {
- // TODO
- }
-
// All ids or non-empty collection means we need to visit our children.
return !idsToVisit.isEmpty();
}
@@ -124,8 +120,6 @@
try {
setRowIndex(oldRowIndex);
} catch (Exception e) {
-
- // TODO: handle exception
LOG.error(e.getMessage(), e);
}
}
Deleted:
branches/4.0.X/core/impl/src/test/java/org/richfaces/skin/SkinThreadsTestCase.java
===================================================================
---
branches/4.0.X/core/impl/src/test/java/org/richfaces/skin/SkinThreadsTestCase.java 2011-03-09
10:35:12 UTC (rev 22097)
+++
branches/4.0.X/core/impl/src/test/java/org/richfaces/skin/SkinThreadsTestCase.java 2011-03-09
12:03:27 UTC (rev 22098)
@@ -1,115 +0,0 @@
-///**
-// * License Agreement.
-// *
-// * Rich Faces - Natural Ajax for Java Server Faces (JSF)
-// *
-// * Copyright (C) 2007 Exadel, Inc.
-// *
-// * This library is free software; you can redistribute it and/or
-// * modify it under the terms of the GNU Lesser General Public
-// * License version 2.1 as published by the Free Software Foundation.
-// *
-// * This library is distributed in the hope that it will be useful,
-// * but WITHOUT ANY WARRANTY; without even the implied warranty of
-// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// * Lesser General Public License for more details.
-// *
-// * You should have received a copy of the GNU Lesser General Public
-// * License along with this library; if not, write to the Free Software
-// * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-// */
-//
-//package org.richfaces.skin;
-//
-//import javax.faces.context.FacesContext;
-//
-//import org.ajax4jsf.tests.AbstractThreadedAjax4JsfTestCase;
-//import org.richfaces.skin.Skin;
-//import org.richfaces.skin.SkinFactory;
-//
-///**
-// * @author asmirnov(a)exadel.com (latest modification by $Author: ishabalov $)
-// * @version $Revision: 1.1.2.2 $ $Date: 2007/02/20 20:58:11 $
-// *
-// */
-//public class SkinThreadsTestCase extends AbstractThreadedAjax4JsfTestCase {
-//
-// /**
-// * @param s
-// */
-// public SkinThreadsTestCase(String s) {
-// super(s);
-// // TODO Auto-generated constructor stub
-// }
-//
-// /*
-// * (non-Javadoc)
-// *
-// * @see com.exadel.vcp.tests.VcpJsfTestCase#setUp()
-// */
-//public void setUp() throws Exception {
-// // TODO Auto-generated method stub
-// super.setUp();
-// servletContext.setAttribute("skin", new Bean());
-// }
-// /*
-// * (non-Javadoc)
-// *
-// * @see com.exadel.vcp.tests.VcpJsfTestCase#tearDown()
-// */
-// public void tearDown() throws Exception {
-// // TODO Auto-generated method stub
-// super.tearDown();
-// }
-//
-//
-// public class SkinTestRunnable extends TestCaseRunnable {
-//
-//
-// /**
-// *
-// */
-// public SkinTestRunnable() {
-// // TODO Auto-generated constructor stub
-// }
-//
-// /* (non-Javadoc)
-// * @see
com.exadel.vcp.tests.ThreadedVcpJsfTestCase.TestCaseRunnable#runTestCase(javax.faces.context.FacesContext)
-// */
-// public void runTestCase(FacesContext context) throws Throwable {
-// context.getExternalContext().getRequestMap().put("test", new
Bean());
-// Skin skin = SkinFactory.getInstance().getSkin(context);
-// assertNotNull(skin);
-// assertEquals("TEST", skin.getRenderKitId(context));
-// assertEquals("binded.string", skin.getParameter(context,
"bind.property"));
-// assertEquals("bindedstring", skin.getParameter(context,
"string.property"));
-// assertEquals("10", skin.getParameter(context,
"int.property"));
-// assertNull(skin.getParameter(context, "notexist"));
-// }
-//
-// }
-//
-// /**
-// * Test skin factory for thread-safe.
-// */
-// public void testThreadsafe() {
-// TestCaseRunnable[] runnables = new TestCaseRunnable[20];
-// for (int i = 0; i < runnables.length; i++) {
-// runnables[i] = new SkinTestRunnable();
-//
-// }
-// this.runTestCaseRunnables(runnables);
-// }
-// /*
-// * (non-Javadoc)
-// *
-// * @see com.exadel.vcp.tests.VcpJsfTestCase#getSkinName()
-// */
-// protected String getSkinName() {
-// // TODO Auto-generated method stub
-// return "#{skin.name}";
-// }
-//}
-
-
-