Skip to content

Commit

Permalink
KAA-1279: Fixed about 250 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sashadidukh committed Oct 3, 2016
1 parent 1896f96 commit 578f3d2
Show file tree
Hide file tree
Showing 91 changed files with 576 additions and 476 deletions.
Expand Up @@ -327,11 +327,11 @@ private void doBeforeLayout() {
double horizDirection = isAnimationVertical ? 0.0 double horizDirection = isAnimationVertical ? 0.0
: LocaleInfo.getCurrentLocale().isRTL() ? -direction : direction; : LocaleInfo.getCurrentLocale().isRTL() ? -direction : direction;


/* /*
* Position the old widget in the center of the panel, and the new widget * Position the old widget in the center of the panel, and the new widget
* off to one side. If the old widget is the same as the new widget, then * off to one side. If the old widget is the same as the new widget, then
* skip this step. * skip this step.
*/ */
hidingWidget = null; hidingWidget = null;
if (visibleWidget != lastVisibleWidget) { if (visibleWidget != lastVisibleWidget) {
// Position the layers in their start positions. // Position the layers in their start positions.
Expand Down Expand Up @@ -362,12 +362,12 @@ private void doBeforeLayout() {
// The new layer ends centered in the panel. // The new layer ends centered in the panel.
newLayer.setTopHeight(0.0, Unit.PCT, 100.0, Unit.PCT); newLayer.setTopHeight(0.0, Unit.PCT, 100.0, Unit.PCT);
newLayer.setLeftWidth(0.0, Unit.PCT, 100.0, Unit.PCT); newLayer.setLeftWidth(0.0, Unit.PCT, 100.0, Unit.PCT);
/* /*
* The call to layout() above could have canceled an existing layout * The call to layout() above could have canceled an existing layout
* animation, which could cause this widget to be hidden if the user * animation, which could cause this widget to be hidden if the user
* toggles between two visible widgets. We set it visible again to ensure * toggles between two visible widgets. We set it visible again to ensure
* that it ends up visible. * that it ends up visible.
*/ */
setWidgetVisible(visibleWidget, newLayer, true); setWidgetVisible(visibleWidget, newLayer, true);
} }


Expand All @@ -377,10 +377,10 @@ private void doBeforeLayout() {
private void setWidgetVisible(Widget widget, Layer layer, boolean visible) { private void setWidgetVisible(Widget widget, Layer layer, boolean visible) {
layer.setVisible(visible); layer.setVisible(visible);


/* /*
* Set the visibility of the widget. This is used by lazy panel to * Set the visibility of the widget. This is used by lazy panel to
* initialize the widget. * initialize the widget.
*/ */
widget.setVisible(visible); widget.setVisible(visible);
} }


Expand Down
Expand Up @@ -27,8 +27,8 @@
import org.kaaproject.kaa.server.admin.client.mvp.view.UserView; import org.kaaproject.kaa.server.admin.client.mvp.view.UserView;
import org.kaaproject.kaa.server.admin.client.util.Utils; import org.kaaproject.kaa.server.admin.client.util.Utils;


public abstract class AbstractUserActivity<T extends UserDto, V extends UserView, P extends UserPlace> extends public abstract class AbstractUserActivity<T extends UserDto, V extends UserView, P extends
AbstractDetailsActivity<T, V, P> { UserPlace> extends AbstractDetailsActivity<T, V, P> {




public AbstractUserActivity(P place, ClientFactory clientFactory) { public AbstractUserActivity(P place, ClientFactory clientFactory) {
Expand Down Expand Up @@ -59,7 +59,8 @@ protected void doSave(final EventBus eventBus) {
detailsView.clearError(); detailsView.clearError();


if (create) { if (create) {
KaaAdmin.getAuthService().checkUserNameOccupied(entity.getUsername(), null, new BusyAsyncCallback<ResultCode>() { KaaAdmin.getAuthService().checkUserNameOccupied(
entity.getUsername(), null, new BusyAsyncCallback<ResultCode>() {
@Override @Override
public void onFailureImpl(Throwable caught) { public void onFailureImpl(Throwable caught) {
Utils.handleException(caught, detailsView); Utils.handleException(caught, detailsView);
Expand All @@ -81,7 +82,8 @@ public void onSuccessImpl(ResultCode result) {


private void checkEmail() { private void checkEmail() {
final Long userId = !create ? Long.valueOf(entity.getExternalUid()) : null; final Long userId = !create ? Long.valueOf(entity.getExternalUid()) : null;
KaaAdmin.getAuthService().checkEmailOccupied(entity.getMail(), userId, new BusyAsyncCallback<ResultCode>() { KaaAdmin.getAuthService().checkEmailOccupied(
entity.getMail(), userId, new BusyAsyncCallback<ResultCode>() {
@Override @Override
public void onFailureImpl(Throwable caught) { public void onFailureImpl(Throwable caught) {
Utils.handleException(caught, detailsView); Utils.handleException(caught, detailsView);
Expand Down
Expand Up @@ -61,8 +61,9 @@
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;


public class CtlSchemaActivity extends AbstractDetailsActivity<CtlSchemaFormDto, CtlSchemaView, CtlSchemaPlace> public class CtlSchemaActivity extends
implements ErrorMessageCustomizer, FormDataLoader { AbstractDetailsActivity<CtlSchemaFormDto, CtlSchemaView, CtlSchemaPlace>
implements ErrorMessageCustomizer, FormDataLoader {


protected static final ErrorMessageCustomizer schemaErrorMessageCustomizer protected static final ErrorMessageCustomizer schemaErrorMessageCustomizer
= new SchemaErrorMessageCustomizer(); = new SchemaErrorMessageCustomizer();
Expand Down
Expand Up @@ -54,7 +54,8 @@ protected BaseListView<LogAppenderDto> getView() {
} }


@Override @Override
protected AbstractDataProvider<LogAppenderDto, String> getDataProvider(AbstractGrid<LogAppenderDto, String> dataGrid) { protected AbstractDataProvider<LogAppenderDto, String> getDataProvider(
AbstractGrid<LogAppenderDto, String> dataGrid) {
return new AppendersDataProvider(dataGrid, listView, applicationId); return new AppendersDataProvider(dataGrid, listView, applicationId);
} }


Expand Down
Expand Up @@ -304,7 +304,7 @@ protected void onResult(PropertiesDto result) {
} }


/** /**
* Edits general properties * Edits general properties.
* *
* @param generalProperties new general properties * @param generalProperties new general properties
* @param callback callback which should be called with a result * @param callback callback which should be called with a result
Expand Down Expand Up @@ -929,7 +929,7 @@ protected void onResult(CtlSchemaReferenceDto result) {
} }


/** /**
* Adds an event class family version * Adds an event class family version.
* *
* @param eventClassFamilyId event class family identifier * @param eventClassFamilyId event class family identifier
* @param eventClassViewDto event class family view * @param eventClassViewDto event class family view
Expand Down Expand Up @@ -1087,7 +1087,7 @@ protected void onResult(List<ServerProfileSchemaDto> result) {
} }


/** /**
* Returns a server profile schema info list * Returns a server profile schema info list.
* *
* @param applicationId application identifier * @param applicationId application identifier
* @param callback callback which should be called with a result * @param callback callback which should be called with a result
Expand Down Expand Up @@ -1546,7 +1546,7 @@ protected void onResult(List<CTLSchemaMetaInfoDto> result) {
} }


/** /**
* Returns the latest CTL schema form * Returns the latest CTL schema form.
* *
* @param metaInfoId meta information identifier * @param metaInfoId meta information identifier
* @param callback callback which should be called with a result * @param callback callback which should be called with a result
Expand All @@ -1562,7 +1562,7 @@ protected void onResult(CtlSchemaFormDto result) {
} }


/** /**
* Returns the CTL schema form * Returns the CTL schema form.
* *
* @param metaInfoId meta information identifier * @param metaInfoId meta information identifier
* @param version CTL schema version * @param version CTL schema version
Expand Down Expand Up @@ -1652,7 +1652,7 @@ protected void onResult(Boolean result) {
} }


/** /**
* Promotes a scope * Promotes a scope.
* *
* @param applicationId application identifier * @param applicationId application identifier
* @param fqn fully qualified name * @param fqn fully qualified name
Expand Down Expand Up @@ -1865,14 +1865,14 @@ protected void onResult(EndpointGroupDto result) {
/** /**
* Returns en endpoint profile. * Returns en endpoint profile.
* *
* @param groupID endpoint group identifier * @param groupId endpoint group identifier
* @param limit limit * @param limit limit
* @param offset offset * @param offset offset
* @param callback callback which should be called with a result * @param callback callback which should be called with a result
*/ */
public void getEndpointProfileByGroupId(String groupID, String limit, String offset, public void getEndpointProfileByGroupId(String groupId, String limit, String offset,
AsyncCallback<EndpointProfilesPageDto> callback) { AsyncCallback<EndpointProfilesPageDto> callback) {
groupRpcService.getEndpointProfileByEndpointGroupId(groupID, limit, offset, callback); groupRpcService.getEndpointProfileByEndpointGroupId(groupId, limit, offset, callback);
} }


/** /**
Expand Down Expand Up @@ -2710,7 +2710,7 @@ protected void onResult(Void result) {
} }


/** /**
* Returns the SDK profile * Returns the SDK profile.
* *
* @param sdkProfileId SDK profile identifier * @param sdkProfileId SDK profile identifier
* @param callback callback which should be called with a result * @param callback callback which should be called with a result
Expand Down
Expand Up @@ -30,6 +30,7 @@


public class UserVerifiersDataProvider extends AbstractDataProvider<UserVerifierDto, String> { public class UserVerifiersDataProvider extends AbstractDataProvider<UserVerifierDto, String> {
private String applicationId; private String applicationId;

/** /**
* All-args constructor. * All-args constructor.
*/ */
Expand Down
Expand Up @@ -68,7 +68,7 @@ public TreePlaceDataProvider getDataProvider(EventBus eventBus) {
return null; return null;
} }


public static abstract class Tokenizer<P extends AbstractPluginsPlace> public abstract static class Tokenizer<P extends AbstractPluginsPlace>
implements PlaceTokenizer<P>, PlaceConstants { implements PlaceTokenizer<P>, PlaceConstants {


@Override @Override
Expand Down
Expand Up @@ -54,7 +54,7 @@ public boolean equals(Object obj) {


ApplicationCtlSchemasPlace other = (ApplicationCtlSchemasPlace) obj; ApplicationCtlSchemasPlace other = (ApplicationCtlSchemasPlace) obj;
if (applicationId == null && other.applicationId != null) { if (applicationId == null && other.applicationId != null) {
return false; return false;
} else if (!applicationId.equals(other.applicationId)) { } else if (!applicationId.equals(other.applicationId)) {
return false; return false;
} }
Expand Down
Expand Up @@ -143,7 +143,7 @@ public boolean equals(Object obj) {
} }


if (metaInfoId == null && other.metaInfoId != null) { if (metaInfoId == null && other.metaInfoId != null) {
return false; return false;
} else if (!metaInfoId.equals(other.metaInfoId)) { } else if (!metaInfoId.equals(other.metaInfoId)) {
return false; return false;
} }
Expand All @@ -157,7 +157,7 @@ public boolean equals(Object obj) {
} }


if (version == null && other.version != null) { if (version == null && other.version != null) {
return false; return false;
} else if (!version.equals(other.version)) { } else if (!version.equals(other.version)) {
return false; return false;
} }
Expand Down
Expand Up @@ -96,7 +96,8 @@ public int hashCode() {
public static class Tokenizer extends AbstractSchemaPlaceEvent.Tokenizer<EventClassPlace> { public static class Tokenizer extends AbstractSchemaPlaceEvent.Tokenizer<EventClassPlace> {


@Override @Override
protected EventClassPlace getPlaceImpl(String ecfId, String ecfVersionId, int ecfVersion, String schemaId) { protected EventClassPlace getPlaceImpl(
String ecfId, String ecfVersionId, int ecfVersion, String schemaId) {
return new EventClassPlace(ecfId, ecfVersionId, ecfVersion, schemaId); return new EventClassPlace(ecfId, ecfVersionId, ecfVersion, schemaId);
} }


Expand Down
Expand Up @@ -64,24 +64,25 @@ protected float constructActions(DataGrid<ConfigurationSchemaDto> table, float p
} }


private Column<ConfigurationSchemaDto, ConfigurationSchemaDto> private Column<ConfigurationSchemaDto, ConfigurationSchemaDto>
constructDownloadBaseSchemaColumnColumn(String text) { constructDownloadBaseSchemaColumnColumn(String text) {
ActionButtonCell<ConfigurationSchemaDto> cell = new ActionButtonCell<>( ActionButtonCell<ConfigurationSchemaDto> cell = new ActionButtonCell<>(
Utils.resources.download_grey(), text, embedded, Utils.resources.download_grey(), text, embedded,
new ActionButtonCell.ActionListener<ConfigurationSchemaDto>() { new ActionButtonCell.ActionListener<ConfigurationSchemaDto>() {
@Override @Override
public void onItemAction(ConfigurationSchemaDto value) { public void onItemAction(ConfigurationSchemaDto value) {
Integer schemaVersion = value.getVersion(); Integer schemaVersion = value.getVersion();
RowActionEvent<String> rowDownloadBaseSchemaEvent = new RowActionEvent<>( RowActionEvent<String> rowDownloadBaseSchemaEvent = new RowActionEvent<>(
String.valueOf(schemaVersion), KaaRowAction.DOWNLOAD_BASE_SCHEMA); String.valueOf(schemaVersion), KaaRowAction.DOWNLOAD_BASE_SCHEMA);
fireEvent(rowDownloadBaseSchemaEvent); fireEvent(rowDownloadBaseSchemaEvent);
} }
}, new ActionButtonCell.ActionValidator<ConfigurationSchemaDto>() { }, new ActionButtonCell.ActionValidator<ConfigurationSchemaDto>() {
@Override @Override
public boolean canPerformAction(ConfigurationSchemaDto value) { public boolean canPerformAction(ConfigurationSchemaDto value) {
return !embedded; return !embedded;
} }
}); });
Column<ConfigurationSchemaDto, ConfigurationSchemaDto> column = new Column<ConfigurationSchemaDto, ConfigurationSchemaDto>(cell) { Column<ConfigurationSchemaDto, ConfigurationSchemaDto> column =
new Column<ConfigurationSchemaDto, ConfigurationSchemaDto>(cell) {
@Override @Override
public ConfigurationSchemaDto getValue(ConfigurationSchemaDto item) { public ConfigurationSchemaDto getValue(ConfigurationSchemaDto item) {
return item; return item;
Expand All @@ -90,26 +91,26 @@ public ConfigurationSchemaDto getValue(ConfigurationSchemaDto item) {
return column; return column;
} }



private Column<ConfigurationSchemaDto, ConfigurationSchemaDto> private Column<ConfigurationSchemaDto, ConfigurationSchemaDto>
constructDownloadOverrideSchemaColumnColumn(String text) { constructDownloadOverrideSchemaColumnColumn(String text) {
ActionButtonCell<ConfigurationSchemaDto> cell = new ActionButtonCell<>( ActionButtonCell<ConfigurationSchemaDto> cell = new ActionButtonCell<>(
Utils.resources.download_grey(), text, embedded, Utils.resources.download_grey(), text, embedded,
new ActionButtonCell.ActionListener<ConfigurationSchemaDto>() { new ActionButtonCell.ActionListener<ConfigurationSchemaDto>() {
@Override @Override
public void onItemAction(ConfigurationSchemaDto value) { public void onItemAction(ConfigurationSchemaDto value) {
Integer schemaVersion = value.getVersion(); Integer schemaVersion = value.getVersion();
RowActionEvent<String> rowDownloadOverrideSchemaEvent = new RowActionEvent<>( RowActionEvent<String> rowDownloadOverrideSchemaEvent = new RowActionEvent<>(
String.valueOf(schemaVersion), KaaRowAction.DOWNLOAD_OVERRIDE_SCHEMA); String.valueOf(schemaVersion), KaaRowAction.DOWNLOAD_OVERRIDE_SCHEMA);
fireEvent(rowDownloadOverrideSchemaEvent); fireEvent(rowDownloadOverrideSchemaEvent);
} }
}, new ActionButtonCell.ActionValidator<ConfigurationSchemaDto>() { }, new ActionButtonCell.ActionValidator<ConfigurationSchemaDto>() {
@Override @Override
public boolean canPerformAction(ConfigurationSchemaDto value) { public boolean canPerformAction(ConfigurationSchemaDto value) {
return !embedded; return !embedded;
} }
}); });
Column<ConfigurationSchemaDto, ConfigurationSchemaDto> column = new Column<ConfigurationSchemaDto, ConfigurationSchemaDto>(cell) { Column<ConfigurationSchemaDto, ConfigurationSchemaDto> column =
new Column<ConfigurationSchemaDto, ConfigurationSchemaDto>(cell) {
@Override @Override
public ConfigurationSchemaDto getValue(ConfigurationSchemaDto item) { public ConfigurationSchemaDto getValue(ConfigurationSchemaDto item) {
return item; return item;
Expand Down
Expand Up @@ -93,12 +93,12 @@ public void onInputChanged(InputEvent event) {
dialogContents.add(table); dialogContents.add(table);


sendResetPasswordLinkButton = new Button( sendResetPasswordLinkButton = new Button(
Utils.constants.sendResetPasswordLink(), new ClickHandler() { Utils.constants.sendResetPasswordLink(), new ClickHandler() {
@Override @Override
public void onClick(ClickEvent event) { public void onClick(ClickEvent event) {
validateUsernameOrEmail(); validateUsernameOrEmail();
} }
}); });


Button cancelButton = new Button(Utils.constants.cancel(), new ClickHandler() { Button cancelButton = new Button(Utils.constants.cancel(), new ClickHandler() {
@Override @Override
Expand Down
Expand Up @@ -69,8 +69,8 @@ public void onValueChange(ValueChangeEvent<SchemaInfoDto> event) {


getFooter().addStyleName(Utils.kaaAdminStyle.bAppContentDetailsTable()); getFooter().addStyleName(Utils.kaaAdminStyle.bAppContentDetailsTable());


configurationData = new RecordPanel(new AvroWidgetsConfig.Builder(). configurationData = new RecordPanel(new AvroWidgetsConfig.Builder()
recordPanelWidth(900) .recordPanelWidth(900)
.gridHeight(250) .gridHeight(250)
.tableHeight(230) .tableHeight(230)
.createConfig(), .createConfig(),
Expand Down
Expand Up @@ -94,7 +94,8 @@ public ApplicationEventAction getValue(ApplicationEventMapDto object) {
actionColumn.setFieldUpdater( actionColumn.setFieldUpdater(
new FieldUpdater<ApplicationEventMapDto, ApplicationEventAction>() { new FieldUpdater<ApplicationEventMapDto, ApplicationEventAction>() {
@Override @Override
public void update(int index, ApplicationEventMapDto object, ApplicationEventAction value) { public void update(int index, ApplicationEventMapDto object,
ApplicationEventAction value) {
object.setAction(value); object.setAction(value);
} }
}); });
Expand Down
Expand Up @@ -78,11 +78,11 @@ public void onItemAction(LogSchemaDto value) {
fireEvent(rowDownloadLibraryEvent); fireEvent(rowDownloadLibraryEvent);
} }
}, new ActionValidator<LogSchemaDto>() { }, new ActionValidator<LogSchemaDto>() {
@Override @Override
public boolean canPerformAction(LogSchemaDto value) { public boolean canPerformAction(LogSchemaDto value) {
return !embedded; return !embedded;
} }
}); });
Column<LogSchemaDto, LogSchemaDto> column = new Column<LogSchemaDto, LogSchemaDto>(cell) { Column<LogSchemaDto, LogSchemaDto> column = new Column<LogSchemaDto, LogSchemaDto>(cell) {
@Override @Override
public LogSchemaDto getValue(LogSchemaDto item) { public LogSchemaDto getValue(LogSchemaDto item) {
Expand Down
Expand Up @@ -89,11 +89,11 @@ public void onItemAction(T value) {
fireEvent(rowDownloadSchemaEvent); fireEvent(rowDownloadSchemaEvent);
} }
}, new ActionButtonCell.ActionValidator<T>() { }, new ActionButtonCell.ActionValidator<T>() {
@Override @Override
public boolean canPerformAction(T value) { public boolean canPerformAction(T value) {
return !embedded; return !embedded;
} }
}); });
Column<T, T> column = new Column<T, T>(cell) { Column<T, T> column = new Column<T, T>(cell) {
@Override @Override
public T getValue(T item) { public T getValue(T item) {
Expand Down

0 comments on commit 578f3d2

Please sign in to comment.