fixed PMD warnings
This commit is contained in:
parent
e5560ea2f3
commit
54cf9fc5fe
13 changed files with 27 additions and 36 deletions
|
@ -29,7 +29,7 @@ public class ProxyData {
|
|||
final int proxyPort,
|
||||
final CharSequence proxyAuthUsername,
|
||||
final CharSequence proxyAuthSecret) {
|
||||
;
|
||||
|
||||
this.proxyAuthType = proxyAuthType;
|
||||
this.proxyName = proxyName;
|
||||
this.proxyPort = proxyPort;
|
||||
|
|
|
@ -220,11 +220,6 @@ public final class UserInfo implements UserAccount, Activatable, Serializable {
|
|||
return new EntityKey(this.uuid, entityType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
return UserInfo.of(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
|
|
|
@ -121,7 +121,6 @@ public class InstitutionList implements TemplateComposer {
|
|||
.newAction(ActionDefinition.INSTITUTION_MODIFY_FROM_LIST)
|
||||
.withSelect(table::getSelection, PageAction::applySingleSelection, EMPTY_SELECTION_TEXT_KEY)
|
||||
.publishIf(() -> instGrant.m() && table.hasAnyContent());
|
||||
;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -215,8 +215,6 @@ public class LmsSetupForm implements TemplateComposer {
|
|||
? restService.getRestCall(NewLmsSetup.class)
|
||||
: restService.getRestCall(SaveLmsSetup.class));
|
||||
|
||||
;
|
||||
|
||||
// propagate content actions to action-pane
|
||||
this.pageService.pageActionBuilder(formContext.clearEntityKeys())
|
||||
|
||||
|
|
|
@ -468,7 +468,7 @@ public class ActivitiesPane implements TemplateComposer {
|
|||
}
|
||||
|
||||
for (final TreeItem item : items) {
|
||||
if (item == currentSelection) {
|
||||
if (item.equals(currentSelection)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,6 +107,7 @@ interface CellFieldBuilderAdapter {
|
|||
|
||||
default: {
|
||||
label.setAlignment(SWT.LEFT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
label.setLayoutData(gridData);
|
||||
|
|
|
@ -79,6 +79,7 @@ public class TextFieldBuilder implements InputFieldBuilder {
|
|||
}
|
||||
default: {
|
||||
text = new Text(innerGrid, SWT.LEFT | SWT.BORDER);
|
||||
break;
|
||||
}
|
||||
}
|
||||
text.setLayoutData(gridData);
|
||||
|
|
|
@ -312,7 +312,7 @@ public class DefaultPageLayout implements TemplateComposer {
|
|||
urlLauncher.openURL(link);
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
|
||||
log.error("Invalid Help link", e);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -233,7 +233,8 @@ public class PageServiceImpl implements PageService {
|
|||
.logout();
|
||||
|
||||
if (!logoutSuccessful) {
|
||||
// TODO error handling
|
||||
log.error("Failed to logout. See logfiles for more information");
|
||||
pageContext.notifyError(new RuntimeException("Failed to logout. See logfiles for more information"));
|
||||
}
|
||||
|
||||
} catch (final Exception e) {
|
||||
|
|
|
@ -455,10 +455,10 @@ public class EntityTable<ROW extends Entity> {
|
|||
final Widget widget = event.widget;
|
||||
if (widget instanceof TableColumn) {
|
||||
final TableColumn tableColumn = ((TableColumn) widget);
|
||||
if (this.filter != null &&
|
||||
this.filter.adaptColumnWidth(
|
||||
this.table.indexOf(tableColumn),
|
||||
tableColumn.getWidth())) {
|
||||
if (this.filter != null) {
|
||||
this.filter.adaptColumnWidth(
|
||||
this.table.indexOf(tableColumn),
|
||||
tableColumn.getWidth());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -352,33 +352,33 @@ public class GridTable extends Composite {
|
|||
|
||||
private static class CheckBox implements ControlAdapter {
|
||||
|
||||
private final Button checkbox;
|
||||
private final Button checkboxButton;
|
||||
private final ColumnDef columnDef;
|
||||
|
||||
CheckBox(final Composite parent, final ColumnDef columnDef, final Listener listener) {
|
||||
this.checkbox = new Button(parent, SWT.CHECK);
|
||||
this.checkbox.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
|
||||
this.checkboxButton = new Button(parent, SWT.CHECK);
|
||||
this.checkboxButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
|
||||
this.columnDef = columnDef;
|
||||
if (listener != null) {
|
||||
this.checkbox.addListener(SWT.Selection, listener);
|
||||
this.checkboxButton.addListener(SWT.Selection, listener);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return this.checkbox.getSelection()
|
||||
return this.checkboxButton.getSelection()
|
||||
? Constants.TRUE_STRING
|
||||
: Constants.FALSE_STRING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(final String value) {
|
||||
this.checkbox.setSelection(BooleanUtils.toBoolean(value));
|
||||
this.checkboxButton.setSelection(BooleanUtils.toBoolean(value));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
this.checkbox.dispose();
|
||||
this.checkboxButton.dispose();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -389,30 +389,30 @@ public class GridTable extends Composite {
|
|||
|
||||
private static class TextField implements ControlAdapter {
|
||||
|
||||
private final Text textField;
|
||||
private final Text _textField;
|
||||
private final ColumnDef columnDef;
|
||||
|
||||
TextField(final Composite parent, final ColumnDef columnDef, final Listener listener) {
|
||||
this.textField = new Text(parent, SWT.LEFT | SWT.BORDER);
|
||||
this.textField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
|
||||
this._textField = new Text(parent, SWT.LEFT | SWT.BORDER);
|
||||
this._textField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
|
||||
this.columnDef = columnDef;
|
||||
this.textField.addListener(SWT.FocusOut, listener);
|
||||
this.textField.addListener(SWT.Traverse, listener);
|
||||
this._textField.addListener(SWT.FocusOut, listener);
|
||||
this._textField.addListener(SWT.Traverse, listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return this.textField.getText();
|
||||
return this._textField.getText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(final String value) {
|
||||
this.textField.setText((value != null) ? value : "");
|
||||
this._textField.setText((value != null) ? value : "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
this.textField.dispose();
|
||||
this._textField.dispose();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -183,6 +183,7 @@ public class PaginationServiceImpl implements PaginationService {
|
|||
}
|
||||
default: {
|
||||
PageHelper.orderBy(sortColumnName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,11 +116,6 @@ public final class SEBServerUser implements UserDetails, CredentialsContainer {
|
|||
this.password = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object clone() throws CloneNotSupportedException {
|
||||
return SEBServerUser.of(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
|
|
Loading…
Reference in a new issue