]> source.dussan.org Git - vaadin-framework.git/commitdiff
Format project, once again
authorArtur Signell <artur@vaadin.com>
Fri, 9 Jan 2015 14:51:12 +0000 (16:51 +0200)
committerArtur Signell <artur@vaadin.com>
Fri, 9 Jan 2015 14:51:12 +0000 (16:51 +0200)
Change-Id: I57cb6208613ce4fc8fce52c07ac4a18982095d2e

17 files changed:
client/src/com/vaadin/client/metadata/ConnectorBundleLoader.java
client/src/com/vaadin/client/ui/VPopupView.java
client/src/com/vaadin/client/ui/VTabsheet.java
server/src/com/vaadin/data/RpcDataProviderExtension.java
server/src/com/vaadin/data/util/converter/StringToBigIntegerConverter.java
server/src/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java
server/src/com/vaadin/server/ClientMethodInvocation.java
server/src/com/vaadin/server/JavaScriptCallbackHelper.java
server/src/com/vaadin/server/JsonCodec.java
server/src/com/vaadin/server/LegacyCommunicationManager.java
server/src/com/vaadin/server/communication/ClientRpcWriter.java
server/src/com/vaadin/server/communication/JSONSerializer.java
server/src/com/vaadin/server/communication/ServerRpcHandler.java
server/src/com/vaadin/server/communication/UIInitHandler.java
server/src/com/vaadin/ui/UI.java
shared/src/com/vaadin/shared/ui/grid/EditorClientRpc.java
shared/src/com/vaadin/shared/ui/grid/EditorServerRpc.java

index dca5931640e09fa0e01f72d6a4ce17bb866f1339..e67fee96cfc23f8b0264a13ba9be9c754fcce459 100644 (file)
@@ -161,7 +161,7 @@ public abstract class ConnectorBundleLoader {
     private HTML notice;
 
     // Not using Vaadin notifications (#14597)
-    private  void notice(String productName) {
+    private void notice(String productName) {
         if (notice == null) {
             notice = new HTML();
             notice.addClickHandler(new ClickHandler() {
index 5b37a9091522b96efa5d0f13c30376a0fce82f92..1923fc55e6715ba202a63be09d91d63ae57392e2 100644 (file)
@@ -92,7 +92,7 @@ public class VPopupView extends HTML implements HasEnabled, Iterable<Widget>,
         addClickHandler(new ClickHandler() {
             @Override
             public void onClick(ClickEvent event) {
-                if(isEnabled()) {
+                if (isEnabled()) {
                     preparePopup(popup);
                     showPopup(popup);
                     center();
@@ -206,8 +206,9 @@ public class VPopupView extends HTML implements HasEnabled, Iterable<Widget>,
     /**
      * Sets whether this popup is enabled.
      *
-     * @param enabled <code>true</code> to enable the popup, <code>false</code>
-     *          to disable it
+     * @param enabled
+     *            <code>true</code> to enable the popup, <code>false</code> to
+     *            disable it
      * @since 7.3.4
      */
     @Override
index 2d348979865d4dc9665663283c1296d642d114cb..96af09bb323e196886b1a6461d7e7054daf8d46f 100644 (file)
@@ -735,9 +735,10 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
     /**
      * The id of the tab at position scrollerIndex. This is used for keeping the
      * scroll position unchanged when a tab is removed from the server side and
-     * the removed tab lies to the left of the current scroll position. For other
-     * cases scrollerIndex alone would be sufficient. Since the tab at the current
-     * scroll position can be removed, scrollerIndex is required in addition to this variable.
+     * the removed tab lies to the left of the current scroll position. For
+     * other cases scrollerIndex alone would be sufficient. Since the tab at the
+     * current scroll position can be removed, scrollerIndex is required in
+     * addition to this variable.
      */
     private String scrollerPositionTabId;
 
@@ -1081,7 +1082,8 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
     }
 
     private boolean isScrollerPrevDisabled() {
-        return scrollerPrev.getClassName().contains(PREV_SCROLLER_DISABLED_CLASSNAME);
+        return scrollerPrev.getClassName().contains(
+                PREV_SCROLLER_DISABLED_CLASSNAME);
     }
 
     private boolean isIndexSkippingHiddenTabs() {
@@ -1103,9 +1105,9 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
             // Should not set tabs visible if they are scrolled out of view
             tab.setVisible(false);
         } else {
-            //reset the scroller index back to zero if tab is visible
-            //again and tab is in view
-            if(isIndexSkippingHiddenTabs() && tabState.visible) {
+            // reset the scroller index back to zero if tab is visible
+            // again and tab is in view
+            if (isIndexSkippingHiddenTabs() && tabState.visible) {
                 scrollerIndex = 0;
             }
             tab.setVisible(tabState.visible);
@@ -1247,7 +1249,9 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
         if (tb.getTabCount() > 0 && tb.isVisible() && (scrolled || clipped)) {
             scroller.getStyle().clearDisplay();
             DOM.setElementProperty(scrollerPrev, "className",
-                    SCROLLER_CLASSNAME + (scrolled ? "Prev" : PREV_SCROLLER_DISABLED_CLASSNAME));
+                    SCROLLER_CLASSNAME
+                            + (scrolled ? "Prev"
+                                    : PREV_SCROLLER_DISABLED_CLASSNAME));
             DOM.setElementProperty(scrollerNext, "className",
                     SCROLLER_CLASSNAME + (clipped ? "Next" : "Next-disabled"));
 
@@ -1861,8 +1865,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
             }
             if (scrollerIndex >= 0 && scrollerIndex < tb.getTabCount()) {
                 scrollerPositionTabId = tb.getTab(scrollerIndex).id;
-            }
-            else{
+            } else {
                 scrollerPositionTabId = null;
             }
         }
index c968cb1888e9b878a6cce65b12ca7effc1fc202e..10857f8d6a08ad2ec99912b1ccf218b4bf139321 100644 (file)
@@ -441,8 +441,8 @@ public class RpcDataProviderExtension extends AbstractExtension {
          * @param removedPropertyIds
          *            the property ids that have been removed from the container
          */
-        public void propertiesRemoved(@SuppressWarnings("unused")
-        Collection<Object> removedPropertyIds) {
+        public void propertiesRemoved(
+                @SuppressWarnings("unused") Collection<Object> removedPropertyIds) {
             /*
              * no-op, for now.
              * 
index 6695aa71acb6cad0b64614382efc12f682022cf0..adaa8c611126cd83de81ea904a5865b0c7331311 100644 (file)
@@ -56,7 +56,8 @@ public class StringToBigIntegerConverter extends
         BigDecimal bigDecimalValue = (BigDecimal) convertToNumber(value,
                 BigDecimal.class, locale);
 
-        return (bigDecimalValue != null) ? bigDecimalValue.toBigInteger() : null;
+        return (bigDecimalValue != null) ? bigDecimalValue.toBigInteger()
+                : null;
     }
 
     @Override
index 21a486a017f13a93d69209027ddc5d78fdb3e83f..2fc7ebd544f125b53599201ead3bb98f0fbb583d 100644 (file)
@@ -262,7 +262,7 @@ public class DefaultSQLGenerator implements SQLGenerator {
             count++;
         }
         if (versionColumn != null) {
-            if(!item.getItemPropertyIds().contains(versionColumn)) {
+            if (!item.getItemPropertyIds().contains(versionColumn)) {
                 throw new IllegalArgumentException(String.format(
                         "Table '%s' does not contain version column '%s'.",
                         tableName, versionColumn));
index 97caa7614a51499fc5a629abe2c159a98483e86e..33b88a168b1d0ef24a77d2066b4e9e7bab38c116 100644 (file)
@@ -109,7 +109,8 @@ public class ClientMethodInvocation implements Serializable,
             if (type instanceof Class<?>) {
                 Class<?> clazz = (Class<?>) type;
                 if (JsonArray.class.isAssignableFrom(clazz)) {
-                    parameters[i] = JsonUtil.stringify((JsonArray) parameters[i]);
+                    parameters[i] = JsonUtil
+                            .stringify((JsonArray) parameters[i]);
                 }
             }
         }
@@ -127,7 +128,8 @@ public class ClientMethodInvocation implements Serializable,
                 Class<?> clazz = (Class<?>) type;
                 if (JsonArray.class.isAssignableFrom(clazz)) {
                     try {
-                        parameters[i] = JsonUtil.<JsonArray>parse((String) parameters[i]);
+                        parameters[i] = JsonUtil
+                                .<JsonArray> parse((String) parameters[i]);
                     } catch (JsonException e) {
                         throw new IOException(e);
                     }
index 2552db6d136113ff3fdbc10505d57bd2822426a9..ac4a586d00df9c29b98784c1095eeabf72a9bc0f 100644 (file)
@@ -94,7 +94,8 @@ public class JavaScriptCallbackHelper implements Serializable {
                             + name
                             + " on the client because a callback with the same name is registered on the server.");
         }
-        JsonArray args = (JsonArray) JsonCodec.encode(arguments, null, Object[].class, null).getEncodedValue();
+        JsonArray args = (JsonArray) JsonCodec.encode(arguments, null,
+                Object[].class, null).getEncodedValue();
         connector.addMethodInvocationToQueue(
                 JavaScriptCallbackRpc.class.getName(), CALL_METHOD,
                 new Object[] { name, args });
index 1e9438453a733a3282180d156012a5454acf7601..1f7b4ead438670d51f017d614866411749f1f148 100644 (file)
@@ -66,10 +66,12 @@ import elemental.json.impl.JreJsonArray;
 public class JsonCodec implements Serializable {
 
     /* Immutable Encode Result representing null */
-    private static final EncodeResult ENCODE_RESULT_NULL = new EncodeResult(Json.createNull());
+    private static final EncodeResult ENCODE_RESULT_NULL = new EncodeResult(
+            Json.createNull());
 
     /* Immutable empty JSONArray */
-    private static final JsonArray EMPTY_JSON_ARRAY = new JreJsonArray(Json.instance()) {
+    private static final JsonArray EMPTY_JSON_ARRAY = new JreJsonArray(
+            Json.instance()) {
         @Override
         public void set(int index, JsonValue value) {
             throw new UnsupportedOperationException(
@@ -316,7 +318,8 @@ public class JsonCodec implements Serializable {
                     .getGenericComponentType();
             return decodeArray(componentType, (JsonArray) value,
                     connectorTracker);
-        } else if (JsonValue.class.isAssignableFrom(getClassForType(targetType))) {
+        } else if (JsonValue.class
+                .isAssignableFrom(getClassForType(targetType))) {
             return value;
         } else if (Enum.class.isAssignableFrom(getClassForType(targetType))) {
             Class<?> classForType = getClassForType(targetType);
@@ -479,8 +482,7 @@ public class JsonCodec implements Serializable {
     }
 
     private static Map<Object, Object> decodeObjectMap(Type keyType,
-            Type valueType, JsonArray jsonMap, ConnectorTracker connectorTracker)
-            {
+            Type valueType, JsonArray jsonMap, ConnectorTracker connectorTracker) {
 
         JsonArray keys = jsonMap.getArray(0);
         JsonArray values = jsonMap.getArray(1);
@@ -766,7 +768,8 @@ public class JsonCodec implements Serializable {
      * @param referenceValue
      * @return
      */
-    private static boolean jsonEquals(JsonValue fieldValue, JsonValue referenceValue) {
+    private static boolean jsonEquals(JsonValue fieldValue,
+            JsonValue referenceValue) {
         if (fieldValue instanceof JsonNull) {
             fieldValue = null;
         }
@@ -795,13 +798,14 @@ public class JsonCodec implements Serializable {
             Collection<?> collection, ConnectorTracker connectorTracker) {
         JsonArray jsonArray = Json.createArray();
         for (Object o : collection) {
-            jsonArray.set(jsonArray.length(), encodeChild(targetType, 0, o, connectorTracker));
+            jsonArray.set(jsonArray.length(),
+                    encodeChild(targetType, 0, o, connectorTracker));
         }
         return jsonArray;
     }
 
-    private static JsonValue encodeChild(Type targetType, int typeIndex, Object o,
-            ConnectorTracker connectorTracker) {
+    private static JsonValue encodeChild(Type targetType, int typeIndex,
+            Object o, ConnectorTracker connectorTracker) {
         if (targetType instanceof ParameterizedType) {
             Type childType = ((ParameterizedType) targetType)
                     .getActualTypeArguments()[typeIndex];
index e1beb1153c2bbf441834dc896409903322055d4f..485084b515df4dc416f9403a30d1852bf853f09a 100644 (file)
@@ -85,7 +85,8 @@ public class LegacyCommunicationManager implements Serializable {
      * @deprecated As of 7.1. See #11411.
      */
     @Deprecated
-    public static JsonObject encodeState(ClientConnector connector, SharedState state) {
+    public static JsonObject encodeState(ClientConnector connector,
+            SharedState state) {
         UI uI = connector.getUI();
         ConnectorTracker connectorTracker = uI.getConnectorTracker();
         Class<? extends SharedState> stateType = connector.getStateType();
index 6631f6176d8dcf98515bed243e3b87c740db124e..2ecf81287e31612d1d9a2096e2211bbd3588bf38 100644 (file)
@@ -67,7 +67,8 @@ public class ClientRpcWriter implements Serializable {
             // add invocation to rpcCalls
             try {
                 JsonArray invocationJson = Json.createArray();
-                invocationJson.set(0, invocation.getConnector().getConnectorId());
+                invocationJson.set(0, invocation.getConnector()
+                        .getConnectorId());
                 invocationJson.set(1, invocation.getInterfaceName());
                 invocationJson.set(2, invocation.getMethodName());
                 JsonArray paramJson = Json.createArray();
index e318b6b1455c324fdc1c3641a8602045241d4899..7f673d01e8afba111fa3c79c80ede1d269b8536a 100644 (file)
@@ -52,12 +52,13 @@ public interface JSONSerializer<T> {
      *            the connector tracker instance for the UI
      * @return A deserialized object
      */
-    T deserialize(Type type, JsonValue jsonValue, ConnectorTracker connectorTracker);
+    T deserialize(Type type, JsonValue jsonValue,
+            ConnectorTracker connectorTracker);
 
     /**
      * Serialize the given object into JSON. Must be compatible with
-     * {@link #deserialize(Type, JsonValue, ConnectorTracker)} and the client side
-     * com.vaadin.client.communication.JSONSerializer
+     * {@link #deserialize(Type, JsonValue, ConnectorTracker)} and the client
+     * side com.vaadin.client.communication.JSONSerializer
      * 
      * @param value
      *            The object to serialize
index d1b1be6b977901ace78819225c3dd06687928ce7..450c11f5c45f987cef18f992b39a56f3fbada05f 100644 (file)
@@ -93,7 +93,8 @@ public class ServerRpcHandler implements Serializable {
 
             if (request.getService().getDeploymentConfiguration()
                     .isSyncIdCheckEnabled()) {
-                syncId = (int) json.getNumber(ApplicationConstants.SERVER_SYNC_ID);
+                syncId = (int) json
+                        .getNumber(ApplicationConstants.SERVER_SYNC_ID);
             } else {
                 syncId = -1;
             }
@@ -373,7 +374,8 @@ public class ServerRpcHandler implements Serializable {
         String methodName = invocationJson.getString(2);
 
         if (connectorTracker.getConnector(connectorId) == null
-                && !connectorId.equals(ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID)) {
+                && !connectorId
+                        .equals(ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID)) {
 
             if (!connectorTracker.connectorWasPresentAsRequestWasSent(
                     connectorId, lastSyncIdSeenByClient)) {
index 1216d2b689918a9b813c831649444dc1065fdac6..018274330fe4abfeb742995042aed4861adf23da 100644 (file)
@@ -80,7 +80,8 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler {
             String initialUIDL = getInitialUidl(request, uI);
             params.put("uidl", initialUIDL);
 
-            return commitJsonResponse(request, response, JsonUtil.stringify(params));
+            return commitJsonResponse(request, response,
+                    JsonUtil.stringify(params));
         } catch (JsonException e) {
             throw new IOException("Error producing initial UIDL", e);
         }
index 4bd4b67259c279d67100f5ebbe37cce867d1d760..66f893e04ae2314b0c860fded2f86e99a6c03cd8 100644 (file)
@@ -1164,7 +1164,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
      *            The new theme name
      */
     public void setTheme(String theme) {
-        if(theme == null) {
+        if (theme == null) {
             getState().theme = null;
         } else {
             getState().theme = VaadinServlet.stripSpecialChars(theme);
index bff5d95c6c4d7068d8b925ca2c0310653cf7c423..7466df9c99a9002ab492747c75734dad6fdc7251 100644 (file)
@@ -42,14 +42,14 @@ public interface EditorClientRpc extends ClientRpc {
     void cancel(int rowIndex);
 
     /**
-     * Confirms a pending {@link EditorServerRpc#bind(int) bind request}
-     * sent by the client.
+     * Confirms a pending {@link EditorServerRpc#bind(int) bind request} sent by
+     * the client.
      */
     void confirmBind();
 
     /**
-     * Confirms a pending {@link EditorServerRpc#save(int) save request}
-     * sent by the client.
+     * Confirms a pending {@link EditorServerRpc#save(int) save request} sent by
+     * the client.
      */
     void confirmSave();
 }
index 8637e346068ebc7463dfcd6e5d54a96380c9c1aa..34a16ccb38e9b5f1c52695ceb745a86d6a06e4df 100644 (file)
@@ -28,8 +28,8 @@ public interface EditorServerRpc extends ServerRpc {
     /**
      * Asks the server to open the editor and bind data to it. When a bind
      * request is sent, it must be acknowledged with a
-     * {@link EditorClientRpc#confirmBind() confirm call} before the client
-     * can open the editor.
+     * {@link EditorClientRpc#confirmBind() confirm call} before the client can
+     * open the editor.
      * 
      * @param rowIndex
      *            the index of the edited row