Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ target
maven-eclipse.xml
.externalToolBuilders
*nb-configuration.xml
.vscode
node_modules
**/checkstyle.cache
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public AuthProfileItemDirectoryPanel(
protected abstract String sortProperty();

@Override
@SuppressWarnings("unchecked")
public void onEvent(final IEvent<?> event) {
if (event.getPayload() instanceof ExitEvent exitEvent) {
authProfileModal.close(exitEvent.getTarget());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public <T extends ClientAppTO> T read(final ClientAppType type, final String key
return policy;
}

@SuppressWarnings("unchecked")
public <T extends ClientAppTO> List<T> list(final ClientAppType type) {
try {
return getService(ClientAppService.class).<T>list(type).stream().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ protected void customActionOnCancelCallback(final AjaxRequestTarget target) {
}

@Override
@SuppressWarnings("unchecked")
protected void customActionOnFinishCallback(final AjaxRequestTarget target) {
checkAddButton(model.getObject().getRealm());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ public String getAjaxIndicatorMarkupId() {
private static final long serialVersionUID = 3776750333491622263L;

@Override
@SuppressWarnings("unchecked")
public void onClick(final AjaxRequestTarget target) {
target.add(propTaskModal.setContent(
new PropagationTasks(propTaskModal, node.getKey(), pageRef)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,36 +118,15 @@ private void fixPlainAttrs(final LinkedAccountTO linkedAccountTO) {

@Override
protected Serializable getCreateCustomPayloadEvent(final Serializable afterObject, final AjaxRequestTarget target) {
return new CreateEvent(
LinkedAccountTO.class.cast(afterObject).getConnObjectKeyValue(),
model.getObject(),
target);
return new CreateEvent(target);
}

private static class CreateEvent extends ModalEvent {

private static final long serialVersionUID = 6416834092156281986L;

private final String key;

private final UserTO userTO;

CreateEvent(
final String key,
final UserTO userTO,
final AjaxRequestTarget target) {

CreateEvent(final AjaxRequestTarget target) {
super(target);
this.key = key;
this.userTO = userTO;
}

public String getKey() {
return key;
}

public UserTO getUserTO() {
return userTO;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public String format(final LocalDateTime date) {
}
}

public static final class WrappedDateModel implements IModel<Date>, Serializable {
public static final class WrappedDateModel implements IModel<Date> {

private static final long serialVersionUID = 31027882183172L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;

public class AjaxDropDownChoicePanel<T extends Serializable> extends FieldPanel<T> implements Cloneable {
public class AjaxDropDownChoicePanel<T extends Serializable> extends FieldPanel<T> {

private static final long serialVersionUID = -4716376580659196095L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ protected class AjaxGridActionsPanel<T> extends ActionsPanel<Pair<K, V>> {

private final Item<Pair<K, V>> rowItem;

@SuppressWarnings("unchecked")
public AjaxGridActionsPanel(final String id, final Item<Pair<K, V>> item) {
super(id, item);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,12 @@
};
}

@SuppressWarnings("unchecked")
protected List<AbstractEditablePropertyColumn<T, S>> getEditableColumns() {
List<AbstractEditablePropertyColumn<T, S>> columns = new ArrayList<>();
getTable().getColumns().stream().
filter(AbstractEditablePropertyColumn.class::isInstance).
map(AbstractEditablePropertyColumn.class::cast).
forEach(columns::add);

Check warning on line 131 in client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxGridBottomToolbar.java

View workflow job for this annotation

GitHub Actions / crosschecks (java, 21, macos-latest)

unchecked method invocation: method add in interface java.util.List is applied to given types
return columns;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.util.convert.IConverter;

public class AjaxTextFieldPanel extends TextFieldPanel implements Cloneable {
public class AjaxTextFieldPanel extends TextFieldPanel {

private static final long serialVersionUID = 238940918106696068L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;

public class EncryptedFieldPanel extends TextFieldPanel implements Cloneable {
public class EncryptedFieldPanel extends TextFieldPanel {

private static final long serialVersionUID = 1882871043451691005L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ public FieldPanel<T> settingsDependingComponents() {
}

@Override
@SuppressWarnings("unchecked")
public FieldPanel<T> clone() {
final FieldPanel<T> panel = SerializationUtils.clone(this);
panel.setModelObject(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.Serializable;
import java.time.Instant;
import org.apache.pdfbox.Loader;
import org.apache.pdfbox.cos.COSObject;
Expand Down Expand Up @@ -91,7 +90,7 @@ public void put(final COSObject indirect, final PDXObject xobject) {
return this.addOrReplace(previewContainer);
}

protected static class ThumbnailImageResource extends DynamicImageResource implements Serializable {
protected static class ThumbnailImageResource extends DynamicImageResource {

private static final long serialVersionUID = 923201517955737928L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.ui.commons.Constants;
import org.apache.wicket.Component;
import org.apache.wicket.PageReference;
import org.apache.wicket.core.util.lang.PropertyResolver;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.list.ListItem;
Expand Down Expand Up @@ -139,10 +138,7 @@ public static class Builder<T extends Serializable> implements Serializable {

private final Class<T> reference;

private final PageReference pageReference;

public Builder(final Class<T> reference, final PageReference pageRef) {
this.pageReference = pageRef;
public Builder(final Class<T> reference) {
this.reference = reference;
this.items = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
package org.apache.syncope.client.ui.commons.wizards;

import java.io.Serializable;
import org.apache.wicket.event.IEventSource;
import org.apache.wicket.markup.html.panel.Panel;

public abstract class AbstractWizardMgtPanel<T extends Serializable> extends Panel implements IEventSource {
public abstract class AbstractWizardMgtPanel<T extends Serializable> extends Panel {

private static final long serialVersionUID = -4152438633429194882L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.IHeaderContributor;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.ResourceModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MultilevelPanel extends Panel implements IHeaderContributor {
public class MultilevelPanel extends Panel {

private static final long serialVersionUID = -4064294905566247729L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public PlainSchemaDetails(final String id, final PlainSchemaTO schemaTO) {
dropdownValueProvider = new AjaxDropDownChoicePanel<>("dropdownValueProvider",
getString("dropdownValueProvider"), new PropertyModel<>(schemaTO, "dropdownValueProvider"));
dropdownValueProvider.setOutputMarkupId(true);
((DropDownChoice) dropdownValueProvider.getField()).setNullValid(true);
((DropDownChoice<?>) dropdownValueProvider.getField()).setNullValid(true);
dropdownValueProvider.setChoices(dropdownValueProviders.getObject());
dropdownValueProvider.setRequired(true);

Expand Down Expand Up @@ -225,7 +225,7 @@ protected void onUpdate(final AjaxRequestTarget target) {
validator = new AjaxDropDownChoicePanel<>("validator",
getString("validator"), new PropertyModel<>(schemaTO, "validator"));
validator.setOutputMarkupId(true);
((DropDownChoice) validator.getField()).setNullValid(true);
((DropDownChoice<?>) validator.getField()).setNullValid(true);
validator.setChoices(validators.getObject());
add(validator);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ protected void adjust(final Type type, final AjaxTextFieldPanel property, final
}
}

@SuppressWarnings("unchecked")
@SuppressWarnings({ "unchecked", "rawtypes" })
protected FieldPanel<?> buildValue(final SearchClause searchClause, final AjaxTextFieldPanel property) {
PlainSchemaTO plainSchema = Optional.ofNullable(anames.getObject().get(property.getModelObject())).
orElseGet(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ public PolicyRuleDataProvider(final int paginatorRows) {
comparator = new SortableDataProviderComparator<>(this);
}

@SuppressWarnings("unchecked")
private List<PolicyRuleWrapper> getPolicyRuleWrappers(final ComposablePolicy policy) {
return policy.getRules().stream().map(rule -> {
ImplementationTO implementation = implementationRestClient.read(implementationType, rule);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public <T extends PolicyTO> T read(final PolicyType type, final String key) {
return policy;
}

@SuppressWarnings("unchecked")
public <T extends PolicyTO> List<T> list(final PolicyType type) {
try {
return getService(PolicyService.class).<T>list(type).stream().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.ui.commons.Constants;
import org.apache.syncope.client.ui.commons.panels.ModalPanel;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.NotificationTaskTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
Expand All @@ -49,8 +48,7 @@
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.StringResourceModel;

public abstract class NotificationTaskDirectoryPanel
extends TaskDirectoryPanel<NotificationTaskTO> implements ModalPanel {
public abstract class NotificationTaskDirectoryPanel extends TaskDirectoryPanel<NotificationTaskTO> {

private static final long serialVersionUID = 4984337552918213290L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
import org.apache.syncope.client.ui.commons.Constants;
import org.apache.syncope.client.ui.commons.panels.ModalPanel;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.to.PropagationTaskTO;
Expand All @@ -49,8 +48,7 @@
import org.apache.wicket.model.Model;
import org.apache.wicket.model.StringResourceModel;

public abstract class PropagationTaskDirectoryPanel
extends TaskDirectoryPanel<PropagationTaskTO> implements ModalPanel {
public abstract class PropagationTaskDirectoryPanel extends TaskDirectoryPanel<PropagationTaskTO> {

private static final long serialVersionUID = 4984337552918213290L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.apache.syncope.client.console.wicket.ws.BasePageWebSocketBehavior;
import org.apache.syncope.client.console.widgets.JobActionPanel;
import org.apache.syncope.client.ui.commons.Constants;
import org.apache.syncope.client.ui.commons.panels.ModalPanel;
import org.apache.syncope.client.ui.commons.wizards.AjaxWizard;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AnyTO;
Expand Down Expand Up @@ -75,8 +74,7 @@
*
* @param <T> Sched task type.
*/
public abstract class SchedTaskDirectoryPanel<T extends SchedTaskTO>
extends TaskDirectoryPanel<T> implements ModalPanel {
public abstract class SchedTaskDirectoryPanel<T extends SchedTaskTO> extends TaskDirectoryPanel<T> {

private static final long serialVersionUID = 4984337552918213290L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
*/
package org.apache.syncope.client.console.wicket.markup.head;

import java.io.Serializable;
import java.util.List;
import org.apache.wicket.markup.head.HeaderItem;
import org.apache.wicket.request.Response;

public class MetaHeaderItem extends HeaderItem implements Serializable {
public class MetaHeaderItem extends HeaderItem {

private static final long serialVersionUID = 7578609827530302053L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.validation.IValidator;

public class AjaxCharacterFieldPanel extends FieldPanel<Character> implements Cloneable {
public class AjaxCharacterFieldPanel extends FieldPanel<Character> {

private static final long serialVersionUID = 238940918106696068L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;

public abstract class AjaxSearchFieldPanel extends TextFieldPanel implements Cloneable {
public abstract class AjaxSearchFieldPanel extends TextFieldPanel {

private static final long serialVersionUID = 6890905510177974519L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,6 @@ protected boolean statusCondition(final JobTO modelObject) {
}

@Override
@SuppressWarnings("unchecked")
public void onEvent(final IEvent<?> event) {
if (event.getPayload() instanceof AjaxWizard.NewItemCancelEvent
|| event.getPayload() instanceof AjaxWizard.NewItemFinishEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public NumberWidget(final String id, final String bg, final Number number, final
WebMarkupContainer box = new WebMarkupContainer("card");
box.add(new AttributeAppender("class", ' ' + bg));

@SuppressWarnings("unchecked")
Class<? extends BasePage> realms = SyncopeWebApplication.get().getPageClass("anys");
if (realms == null) {
realms = Anys.class;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public PlainSchemas(final String id) {
super(id);
}

@SuppressWarnings({ "unchecked", "rawtypes" })
@SuppressWarnings({ "unchecked" })
protected AbstractFieldPanel<?> setPanel(
final Map<String, PlainSchemaTO> schemas,
final ListItem<Attr> item,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ protected Iterator<String> getChoices(final String input) {
new PropertyModel<>(modelObject, "realms")).build(
"realms",
"realms",
(FieldPanel) realm).hideLabel());
(FieldPanel<Serializable>) realm).hideLabel());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public SelfResult(final ProvisioningResult<UserTO> provisioningResult, final Pag
(Serializable) provisioningResult.getPropagationStatuses().stream()
.filter(ps -> ExecStatus.SUCCESS != ps.getStatus())
.map(ps -> StatusUtils.getStatusBean(provisioningResult.getEntity(), ps.getResource(),
ps.getAfterObj(), false)).collect(Collectors.toList()), getPageReference())
ps.getAfterObj(), false)).collect(Collectors.toList()))
.setOutputMarkupId(true)
.setVisible(SyncopeWebApplication.get().isReportPropagationErrorDetails()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public AnyFormPanel(final String id,
this.anyTypeClasses = anyTypeClasses;
}

@SuppressWarnings("unchecked")
public AnyFormPanel(final String id,
final UserWrapper wrapper,
final List<String> anyTypeClasses,
Expand Down
Loading
Loading