diff options
author | Artur Signell <artur@vaadin.com> | 2015-06-24 11:29:50 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-06-26 07:54:06 +0000 |
commit | 7355f1a26277d7644cfc974f4c4d8b7bc898c366 (patch) | |
tree | 281633f608a704bbaaa8b564d3b55c422b2811be /server | |
parent | afefa100a75760a05519038e19e6b64669411549 (diff) | |
download | vaadin-framework-7355f1a26277d7644cfc974f4c4d8b7bc898c366.tar.gz vaadin-framework-7355f1a26277d7644cfc974f4c4d8b7bc898c366.zip |
Reformat with Luna SR2
Change-Id: I8a666061496022ef16ed44812b5728e1360b9c4d
Diffstat (limited to 'server')
25 files changed, 82 insertions, 51 deletions
diff --git a/server/src/com/vaadin/ui/Slider.java b/server/src/com/vaadin/ui/Slider.java index 2e00628eb0..15c94b6d3c 100644 --- a/server/src/com/vaadin/ui/Slider.java +++ b/server/src/com/vaadin/ui/Slider.java @@ -285,7 +285,7 @@ public class Slider extends AbstractField<Double> { final int resolution = getResolution(); double ratio = Math.pow(10, resolution); - if(v >= 0) { + if (v >= 0) { return Math.floor(v * ratio) / ratio; } else { return Math.ceil(v * ratio) / ratio; diff --git a/server/src/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java b/server/src/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java index 104e07f02f..57e8130b29 100644 --- a/server/src/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java +++ b/server/src/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java @@ -105,7 +105,8 @@ public abstract class AbstractJavaScriptRenderer<T> extends AbstractRenderer<T> private JavaScriptCallbackHelper callbackHelper = new JavaScriptCallbackHelper( this); - protected AbstractJavaScriptRenderer(Class<T> presentationType, String nullRepresentation) { + protected AbstractJavaScriptRenderer(Class<T> presentationType, + String nullRepresentation) { super(presentationType, nullRepresentation); } diff --git a/server/src/com/vaadin/ui/renderers/ButtonRenderer.java b/server/src/com/vaadin/ui/renderers/ButtonRenderer.java index a747e45713..e7e723ebd6 100644 --- a/server/src/com/vaadin/ui/renderers/ButtonRenderer.java +++ b/server/src/com/vaadin/ui/renderers/ButtonRenderer.java @@ -45,7 +45,8 @@ public class ButtonRenderer extends ClickableRenderer<String> { * @param nullRepresentation * the textual representation of {@code null} value */ - public ButtonRenderer(RendererClickListener listener, String nullRepresentation) { + public ButtonRenderer(RendererClickListener listener, + String nullRepresentation) { this(nullRepresentation); addClickListener(listener); } diff --git a/server/src/com/vaadin/ui/renderers/ClickableRenderer.java b/server/src/com/vaadin/ui/renderers/ClickableRenderer.java index 01e939bb67..7210eb7840 100644 --- a/server/src/com/vaadin/ui/renderers/ClickableRenderer.java +++ b/server/src/com/vaadin/ui/renderers/ClickableRenderer.java @@ -106,7 +106,8 @@ public class ClickableRenderer<T> extends AbstractRenderer<T> { this(presentationType, null); } - protected ClickableRenderer(Class<T> presentationType, String nullRepresentation) { + protected ClickableRenderer(Class<T> presentationType, + String nullRepresentation) { super(presentationType, nullRepresentation); registerRpc(new RendererClickRpc() { @Override diff --git a/server/src/com/vaadin/ui/renderers/DateRenderer.java b/server/src/com/vaadin/ui/renderers/DateRenderer.java index 092b3f405e..dddeb6cd77 100644 --- a/server/src/com/vaadin/ui/renderers/DateRenderer.java +++ b/server/src/com/vaadin/ui/renderers/DateRenderer.java @@ -72,7 +72,8 @@ public class DateRenderer extends AbstractRenderer<Date> { * @throws IllegalArgumentException * if {@code locale} is {@code null} */ - public DateRenderer(Locale locale, String nullRepresentation) throws IllegalArgumentException { + public DateRenderer(Locale locale, String nullRepresentation) + throws IllegalArgumentException { this("%s", locale, nullRepresentation); } @@ -110,7 +111,8 @@ public class DateRenderer extends AbstractRenderer<Date> { * href="http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format * String Syntax</a> */ - public DateRenderer(String formatString, String nullRepresentation) throws IllegalArgumentException { + public DateRenderer(String formatString, String nullRepresentation) + throws IllegalArgumentException { this(formatString, Locale.getDefault(), nullRepresentation); } @@ -132,8 +134,9 @@ public class DateRenderer extends AbstractRenderer<Date> { */ public DateRenderer(String formatString, Locale locale) throws IllegalArgumentException { - this(formatString,locale, ""); + this(formatString, locale, ""); } + /** * Creates a new date renderer. * <p> @@ -152,8 +155,8 @@ public class DateRenderer extends AbstractRenderer<Date> { * href="http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format * String Syntax</a> */ - public DateRenderer(String formatString, Locale locale, String nullRepresentation) - throws IllegalArgumentException { + public DateRenderer(String formatString, Locale locale, + String nullRepresentation) throws IllegalArgumentException { super(Date.class, nullRepresentation); if (formatString == null) { @@ -182,6 +185,7 @@ public class DateRenderer extends AbstractRenderer<Date> { public DateRenderer(DateFormat dateFormat) throws IllegalArgumentException { this(dateFormat, ""); } + /** * Creates a new date renderer. * <p> @@ -192,7 +196,8 @@ public class DateRenderer extends AbstractRenderer<Date> { * @throws IllegalArgumentException * if {@code dateFormat} is {@code null} */ - public DateRenderer(DateFormat dateFormat, String nullRepresentation) throws IllegalArgumentException { + public DateRenderer(DateFormat dateFormat, String nullRepresentation) + throws IllegalArgumentException { super(Date.class, nullRepresentation); if (dateFormat == null) { throw new IllegalArgumentException("date format may not be null"); diff --git a/server/src/com/vaadin/ui/renderers/HtmlRenderer.java b/server/src/com/vaadin/ui/renderers/HtmlRenderer.java index df89c60ad2..2ec43800c0 100644 --- a/server/src/com/vaadin/ui/renderers/HtmlRenderer.java +++ b/server/src/com/vaadin/ui/renderers/HtmlRenderer.java @@ -28,7 +28,8 @@ public class HtmlRenderer extends AbstractRenderer<String> { /** * Creates a new HTML renderer. * - * @param nullRepresentation the html representation of {@code null} value + * @param nullRepresentation + * the html representation of {@code null} value */ public HtmlRenderer(String nullRepresentation) { super(String.class, nullRepresentation); diff --git a/server/src/com/vaadin/ui/renderers/NumberRenderer.java b/server/src/com/vaadin/ui/renderers/NumberRenderer.java index 1d4d7e0ec9..b1ba309c9a 100644 --- a/server/src/com/vaadin/ui/renderers/NumberRenderer.java +++ b/server/src/com/vaadin/ui/renderers/NumberRenderer.java @@ -69,7 +69,7 @@ public class NumberRenderer extends AbstractRenderer<Number> { * @param nullRepresentation * the textual representation of {@code null} value * @throws IllegalArgumentException - * if {@code numberFormat} is {@code null} + * if {@code numberFormat} is {@code null} */ public NumberRenderer(NumberFormat numberFormat, String nullRepresentation) throws IllegalArgumentException { @@ -112,8 +112,10 @@ public class NumberRenderer extends AbstractRenderer<Number> { * @throws IllegalArgumentException * if {@code locale} is {@code null} */ - public NumberRenderer(String formatString, Locale locale) throws IllegalArgumentException { - this(formatString, locale, ""); //This will call #toString() during formatting + public NumberRenderer(String formatString, Locale locale) + throws IllegalArgumentException { + this(formatString, locale, ""); // This will call #toString() during + // formatting } /** @@ -122,8 +124,8 @@ public class NumberRenderer extends AbstractRenderer<Number> { * The renderer is configured to render with the given format string in the * default locale. * - * @param - * formatString the format string with which to format the number + * @param formatString + * the format string with which to format the number * @throws IllegalArgumentException * if {@code formatString} is {@code null} * @see <a @@ -150,7 +152,8 @@ public class NumberRenderer extends AbstractRenderer<Number> { * href="http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax">Format * String Syntax</a> */ - public NumberRenderer(String formatString, Locale locale, String nullRepresentation) { + public NumberRenderer(String formatString, Locale locale, + String nullRepresentation) { super(Number.class, nullRepresentation); if (formatString == null) { diff --git a/server/src/com/vaadin/ui/renderers/TextRenderer.java b/server/src/com/vaadin/ui/renderers/TextRenderer.java index 0045024b2f..ce8a73d057 100644 --- a/server/src/com/vaadin/ui/renderers/TextRenderer.java +++ b/server/src/com/vaadin/ui/renderers/TextRenderer.java @@ -35,6 +35,7 @@ public class TextRenderer extends AbstractRenderer<String> { /** * Creates a new text renderer + * * @param nullRepresentation * the textual representation of {@code null} value */ diff --git a/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java b/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java index 012d0ef0bc..1f42f4e935 100644 --- a/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java +++ b/server/tests/src/com/vaadin/data/util/filter/AndOrFilterTest.java @@ -6,7 +6,8 @@ import com.vaadin.data.Container.Filter; import com.vaadin.data.Item; import com.vaadin.data.util.BeanItem; -public class AndOrFilterTest extends AbstractFilterTestBase<AbstractJunctionFilter> { +public class AndOrFilterTest extends + AbstractFilterTestBase<AbstractJunctionFilter> { protected Item item1 = new BeanItem<Integer>(1); protected Item item2 = new BeanItem<Integer>(2); diff --git a/server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java b/server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java index 4115872fb7..85efa22c40 100644 --- a/server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java +++ b/server/tests/src/com/vaadin/tests/design/ComponentFactoryTest.java @@ -117,7 +117,7 @@ public class ComponentFactoryTest { currentComponentFactory.set(new ComponentFactory() { @Override public Component createComponent(String fullyQualifiedClassName, - DesignContext context) { + DesignContext context) { classes.add(fullyQualifiedClassName); return defaultFactory.createComponent(fullyQualifiedClassName, context); @@ -127,8 +127,10 @@ public class ComponentFactoryTest { DesignContext designContext = new DesignContext(); designContext.getDefaultInstance(new DefaultInstanceTestComponent()); - Assert.assertEquals("There should be one class requests", 1, classes.size()); - Assert.assertEquals("First class should be DefaultInstanceTestComponent", + Assert.assertEquals("There should be one class requests", 1, + classes.size()); + Assert.assertEquals( + "First class should be DefaultInstanceTestComponent", DefaultInstanceTestComponent.class.getName(), classes.get(0)); } diff --git a/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java b/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java index 5f901cd746..d944826f10 100644 --- a/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java +++ b/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java @@ -40,7 +40,7 @@ public class ParseAllSupportedComponentsTest { public void allComponentsAreParsed() throws FileNotFoundException { DesignContext ctx = Design .read(new FileInputStream( - "server/tests/src/com/vaadin/tests/design/all-components.html"), + "server/tests/src/com/vaadin/tests/design/all-components.html"), null); assertThat(ctx, is(not(nullValue()))); diff --git a/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java b/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java index 70376c79f8..50ab261195 100644 --- a/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java +++ b/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java @@ -138,7 +138,8 @@ public class ParseLayoutTest { return Design.read(in, null); } - private ByteArrayOutputStream serializeDesign(DesignContext context) throws IOException { + private ByteArrayOutputStream serializeDesign(DesignContext context) + throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); Design.write(context, out); @@ -192,7 +193,8 @@ public class ParseLayoutTest { assertThat(hlayout.getComponent(0).getCaption(), is("FooBar")); assertThat(hlayout.getComponent(1).getCaption(), is("Native click me")); assertThat(hlayout.getComponent(2).getCaption(), is("Another button")); - assertThat(hlayout.getComponent(3).getCaption(), is("Yet another button")); + assertThat(hlayout.getComponent(3).getCaption(), + is("Yet another button")); assertThat(hlayout.getComponent(4).getCaption(), is("Click me")); assertThat(hlayout.getComponent(4).getWidth(), is(150f)); diff --git a/server/tests/src/com/vaadin/tests/server/AbstractContainerListenersTest.java b/server/tests/src/com/vaadin/tests/server/AbstractContainerListenersTest.java index a5c7dc3ab2..91036c03ed 100644 --- a/server/tests/src/com/vaadin/tests/server/AbstractContainerListenersTest.java +++ b/server/tests/src/com/vaadin/tests/server/AbstractContainerListenersTest.java @@ -7,7 +7,8 @@ import com.vaadin.data.Container.PropertySetChangeListener; import com.vaadin.data.util.IndexedContainer; import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase; -public class AbstractContainerListenersTest extends AbstractListenerMethodsTestBase { +public class AbstractContainerListenersTest extends + AbstractListenerMethodsTestBase { public void testItemSetChangeListenerAddGetRemove() throws Exception { testListenerAddGetRemove(IndexedContainer.class, diff --git a/server/tests/src/com/vaadin/tests/server/AbstractPropertyListenersTest.java b/server/tests/src/com/vaadin/tests/server/AbstractPropertyListenersTest.java index 28e6f7e0a5..fd38b52a37 100644 --- a/server/tests/src/com/vaadin/tests/server/AbstractPropertyListenersTest.java +++ b/server/tests/src/com/vaadin/tests/server/AbstractPropertyListenersTest.java @@ -8,7 +8,8 @@ import com.vaadin.data.util.AbstractProperty; import com.vaadin.data.util.ObjectProperty; import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase; -public class AbstractPropertyListenersTest extends AbstractListenerMethodsTestBase { +public class AbstractPropertyListenersTest extends + AbstractListenerMethodsTestBase { public void testValueChangeListenerAddGetRemove() throws Exception { testListenerAddGetRemove(AbstractProperty.class, ValueChangeEvent.class, ValueChangeListener.class, diff --git a/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTest.java b/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTest.java index 18fbf70a2a..cd9beafa10 100644 --- a/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTest.java +++ b/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTest.java @@ -184,8 +184,8 @@ public class CsrfTokenMissingTest { rpcRequest.getCsrfToken()); } - private static Logger LOGGER = Logger - .getLogger(CsrfTokenMissingTest.class.getName()); + private static Logger LOGGER = Logger.getLogger(CsrfTokenMissingTest.class + .getName()); static { LOGGER.setLevel(Level.ALL); } diff --git a/server/tests/src/com/vaadin/tests/server/IndexedContainerListenersTest.java b/server/tests/src/com/vaadin/tests/server/IndexedContainerListenersTest.java index 2e1fa83540..594f5627dd 100644 --- a/server/tests/src/com/vaadin/tests/server/IndexedContainerListenersTest.java +++ b/server/tests/src/com/vaadin/tests/server/IndexedContainerListenersTest.java @@ -7,7 +7,8 @@ import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.data.util.IndexedContainer; import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase; -public class IndexedContainerListenersTest extends AbstractListenerMethodsTestBase { +public class IndexedContainerListenersTest extends + AbstractListenerMethodsTestBase { public void testValueChangeListenerAddGetRemove() throws Exception { testListenerAddGetRemove(IndexedContainer.class, ValueChangeEvent.class, ValueChangeListener.class); diff --git a/server/tests/src/com/vaadin/tests/server/PropertysetItemListenersTest.java b/server/tests/src/com/vaadin/tests/server/PropertysetItemListenersTest.java index 7edaa2826a..8a91ea1868 100644 --- a/server/tests/src/com/vaadin/tests/server/PropertysetItemListenersTest.java +++ b/server/tests/src/com/vaadin/tests/server/PropertysetItemListenersTest.java @@ -5,7 +5,8 @@ import com.vaadin.data.Item.PropertySetChangeListener; import com.vaadin.data.util.PropertysetItem; import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase; -public class PropertysetItemListenersTest extends AbstractListenerMethodsTestBase { +public class PropertysetItemListenersTest extends + AbstractListenerMethodsTestBase { public void testPropertySetChangeListenerAddGetRemove() throws Exception { testListenerAddGetRemove(PropertysetItem.class, PropertySetChangeEvent.class, PropertySetChangeListener.class); diff --git a/server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java b/server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java index ec3754d037..4e8f987def 100644 --- a/server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java +++ b/server/tests/src/com/vaadin/tests/server/component/AbstractListenerMethodsTestBase.java @@ -48,8 +48,8 @@ public abstract class AbstractListenerMethodsTestBase extends TestCase { System.out.println("package " + packageName + ";"); System.out.println("import " - + AbstractListenerMethodsTestBase.class.getName() - + ";"); + + AbstractListenerMethodsTestBase.class + .getName() + ";"); System.out.println("import " + c.getName() + ";"); System.out.println("public class " + c.getSimpleName() diff --git a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java index 062a89ad62..ece4b5f380 100644 --- a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/AbsoluteLayoutListenersTest.java @@ -5,7 +5,8 @@ import com.vaadin.event.LayoutEvents.LayoutClickListener; import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase; import com.vaadin.ui.AbsoluteLayout; -public class AbsoluteLayoutListenersTest extends AbstractListenerMethodsTestBase { +public class AbsoluteLayoutListenersTest extends + AbstractListenerMethodsTestBase { public void testLayoutClickListenerAddGetRemove() throws Exception { testListenerAddGetRemove(AbsoluteLayout.class, LayoutClickEvent.class, LayoutClickListener.class); diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java b/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java index 8ec0414e03..ee806cb5f7 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractselect/AbstractSelectListenersTest.java @@ -7,7 +7,8 @@ import com.vaadin.data.Container.PropertySetChangeListener; import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase; import com.vaadin.ui.ComboBox; -public class AbstractSelectListenersTest extends AbstractListenerMethodsTestBase { +public class AbstractSelectListenersTest extends + AbstractListenerMethodsTestBase { public void testItemSetChangeListenerAddGetRemove() throws Exception { testListenerAddGetRemove(ComboBox.class, ItemSetChangeEvent.class, ItemSetChangeListener.class); diff --git a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java index 1b7f4fdce1..0896b5d649 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java @@ -9,7 +9,8 @@ import com.vaadin.event.FieldEvents.TextChangeListener; import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase; import com.vaadin.ui.TextField; -public class AbstractTextFieldListenersTest extends AbstractListenerMethodsTestBase { +public class AbstractTextFieldListenersTest extends + AbstractListenerMethodsTestBase { public void testTextChangeListenerAddGetRemove() throws Exception { testListenerAddGetRemove(TextField.class, TextChangeEvent.class, TextChangeListener.class); diff --git a/server/tests/src/com/vaadin/tests/server/component/slider/SliderTest.java b/server/tests/src/com/vaadin/tests/server/component/slider/SliderTest.java index 7f20f29648..8c093fdf72 100644 --- a/server/tests/src/com/vaadin/tests/server/component/slider/SliderTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/slider/SliderTest.java @@ -88,7 +88,7 @@ public class SliderTest { @Test public void valuesGreaterThanIntMaxValueCanBeUsed() { - double minValue = (double)Integer.MAX_VALUE + 1; + double minValue = (double) Integer.MAX_VALUE + 1; Slider s = new Slider(minValue, minValue + 1, 0); diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java b/server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java index 5e33ff2f4a..69aaf2e3a9 100644 --- a/server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/table/TableColumnAlignmentsTest.java @@ -26,8 +26,8 @@ public class TableColumnAlignmentsTest { @Test public void explicitColumnAlignments() { int properties = 5; - Table t = TableGeneratorTest - .createTableWithDefaultContainer(properties, 10); + Table t = TableGeneratorTest.createTableWithDefaultContainer( + properties, 10); Align[] explicitAlignments = new Align[] { Align.CENTER, Align.LEFT, Align.RIGHT, Align.RIGHT, Align.LEFT }; @@ -122,8 +122,8 @@ public class TableColumnAlignmentsTest { @Test public void explicitColumnAlignmentOneByOne() { int properties = 5; - Table t = TableGeneratorTest - .createTableWithDefaultContainer(properties, 10); + Table t = TableGeneratorTest.createTableWithDefaultContainer( + properties, 10); Align[] explicitAlignments = new Align[] { Align.CENTER, Align.LEFT, Align.RIGHT, Align.RIGHT, Align.LEFT }; diff --git a/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java b/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java index be23a998a3..470f04c15c 100644 --- a/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/ui/CustomUIClassLoaderTest.java @@ -68,8 +68,8 @@ public class CustomUIClassLoaderTest extends TestCase { private static DeploymentConfiguration createConfigurationMock() { Properties properties = new Properties(); properties.put(VaadinSession.UI_PARAMETER, MyUI.class.getName()); - return new DefaultDeploymentConfiguration(CustomUIClassLoaderTest.class, - properties); + return new DefaultDeploymentConfiguration( + CustomUIClassLoaderTest.class, properties); } private static VaadinRequest createRequestMock(ClassLoader classloader) { diff --git a/server/tests/src/com/vaadin/tests/server/renderer/RendererTest.java b/server/tests/src/com/vaadin/tests/server/renderer/RendererTest.java index 8a01464180..eb07fae07f 100644 --- a/server/tests/src/com/vaadin/tests/server/renderer/RendererTest.java +++ b/server/tests/src/com/vaadin/tests/server/renderer/RendererTest.java @@ -67,14 +67,14 @@ public class RendererTest { @Override public TestBean convertToModel(String value, - Class<? extends TestBean> targetType, Locale locale) + Class<? extends TestBean> targetType, Locale locale) throws ConversionException { return null; } @Override public String convertToPresentation(TestBean value, - Class<? extends String> targetType, Locale locale) + Class<? extends String> targetType, Locale locale) throws ConversionException { if (value instanceof ExtendedBean) { return "ExtendedBean(" + value.i + ", " @@ -227,21 +227,27 @@ public class RendererTest { assertEquals("", dateColumn.getRenderer().encode(null).asString()); assertEquals("", buttonColumn.getRenderer().encode(null).asString()); } - @Test + @Test public void testNullEncodingWithDefault() { textColumn.setRenderer(new TextRenderer("default value")); htmlColumn.setRenderer(new HtmlRenderer("default value")); - numberColumn.setRenderer(new NumberRenderer("%s", Locale.getDefault(), "default value")); + numberColumn.setRenderer(new NumberRenderer("%s", Locale.getDefault(), + "default value")); dateColumn.setRenderer(new DateRenderer("%s", "default value")); buttonColumn.setRenderer(new ButtonRenderer("default value")); - assertEquals("default value", textColumn.getRenderer().encode(null).asString()); - assertEquals("default value", htmlColumn.getRenderer().encode(null).asString()); - assertEquals("default value", numberColumn.getRenderer().encode(null).asString()); - assertEquals("default value", dateColumn.getRenderer().encode(null).asString()); - assertEquals("default value", buttonColumn.getRenderer().encode(null).asString()); + assertEquals("default value", textColumn.getRenderer().encode(null) + .asString()); + assertEquals("default value", htmlColumn.getRenderer().encode(null) + .asString()); + assertEquals("default value", numberColumn.getRenderer().encode(null) + .asString()); + assertEquals("default value", dateColumn.getRenderer().encode(null) + .asString()); + assertEquals("default value", buttonColumn.getRenderer().encode(null) + .asString()); } private TestConverter converter() { |