Author: nbelaevski
Date: 2011-04-01 11:23:27 -0400 (Fri, 01 Apr 2011)
New Revision: 22355
Modified:
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/RenderKitUtils.java
trunk/ui/common/ui/src/test/java/org/richfaces/renderkit/RenderKitUtilsTest.java
trunk/ui/input/ui/src/test/java/org/richfaces/renderkit/InplaceInputRendererTest.java
trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java
Log:
Imports optimization
Removed dead code
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/RenderKitUtils.java
===================================================================
---
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/RenderKitUtils.java 2011-04-01
15:13:53 UTC (rev 22354)
+++
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/RenderKitUtils.java 2011-04-01
15:23:27 UTC (rev 22355)
@@ -645,22 +645,6 @@
}
}
- public static String concat(String... strings) {
- if (strings == null) {
- return "";
- }
-
- StringBuilder sb = new StringBuilder();
- for (String s : strings) {
- if (s == null || s.length() == 0) {
- continue;
- }
-
- sb.append(s);
- }
- return sb.toString();
- }
-
public static String toScriptArgs(Object... objects) {
if (objects == null) {
return "";
Modified:
trunk/ui/common/ui/src/test/java/org/richfaces/renderkit/RenderKitUtilsTest.java
===================================================================
---
trunk/ui/common/ui/src/test/java/org/richfaces/renderkit/RenderKitUtilsTest.java 2011-04-01
15:13:53 UTC (rev 22354)
+++
trunk/ui/common/ui/src/test/java/org/richfaces/renderkit/RenderKitUtilsTest.java 2011-04-01
15:23:27 UTC (rev 22355)
@@ -27,7 +27,6 @@
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.richfaces.renderkit.RenderKitUtils.addToScriptHash;
-import static org.richfaces.renderkit.RenderKitUtils.concat;
import static org.richfaces.renderkit.RenderKitUtils.toScriptArgs;
import java.util.ArrayList;
@@ -123,17 +122,6 @@
assertFalse(RenderKitUtils.shouldRenderAttribute(Boolean.FALSE));
}
- @Test
- public void testConcat() throws Exception {
- assertEquals("", concat());
- assertEquals("", concat((String) null));
- assertEquals("", concat((String[]) null));
- assertEquals("", concat(""));
- assertEquals("test", concat("test"));
- assertEquals("build a string", concat("build", " a
", "string"));
- assertEquals("omit nulls", concat(null, "omit", null, "
", null, "nulls", null));
- }
-
private static String dehydrate(String s) {
return s.replaceAll("\\s+", "");
}
Modified:
trunk/ui/input/ui/src/test/java/org/richfaces/renderkit/InplaceInputRendererTest.java
===================================================================
---
trunk/ui/input/ui/src/test/java/org/richfaces/renderkit/InplaceInputRendererTest.java 2011-04-01
15:13:53 UTC (rev 22354)
+++
trunk/ui/input/ui/src/test/java/org/richfaces/renderkit/InplaceInputRendererTest.java 2011-04-01
15:23:27 UTC (rev 22355)
@@ -5,7 +5,6 @@
import java.io.IOException;
-import org.junit.Ignore;
import org.junit.Test;
import org.xml.sax.SAXException;
Modified:
trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
===================================================================
---
trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java 2011-04-01
15:13:53 UTC (rev 22354)
+++
trunk/ui/misc/ui/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java 2011-04-01
15:23:27 UTC (rev 22355)
@@ -27,7 +27,6 @@
import javax.faces.component.UIComponent;
-import org.ajax4jsf.component.behavior.ClientBehavior;
import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.JsfBehavior;
import org.richfaces.cdk.annotations.Tag;
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java 2011-04-01
15:13:53 UTC (rev 22354)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java 2011-04-01
15:23:27 UTC (rev 22355)
@@ -28,7 +28,6 @@
import javax.faces.component.behavior.ClientBehaviorContext;
import javax.faces.context.FacesContext;
-import org.ajax4jsf.component.behavior.ClientBehavior;
import org.richfaces.cdk.annotations.*;
import org.richfaces.component.AbstractTogglePanel;
import org.richfaces.component.ComponentIterators;
Show replies by date