Skip to content

Commit

Permalink
IDE-Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cuioss committed Jul 1, 2024
1 parent bb21634 commit 08e63ac
Show file tree
Hide file tree
Showing 191 changed files with 495 additions and 224 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import static java.util.Objects.requireNonNull;

import java.io.Serial;
import java.io.Serializable;

import jakarta.enterprise.context.RequestScoped;
Expand Down Expand Up @@ -50,6 +51,7 @@ public class DisplayNameMessageProducer implements Serializable {

private static final UIComponent DUMMY = new DummyComponent();

@Serial
private static final long serialVersionUID = 3367432860164772689L;

private static final String NO_FITTING_CONVERTER_REGISTERED = "No fitting converter for [%s] class registered.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import static java.util.Objects.requireNonNull;

import java.io.IOException;
import java.io.Serial;
import java.io.Serializable;
import java.net.URL;
import java.util.Collections;
Expand Down Expand Up @@ -59,6 +60,7 @@ public final class NavigationUtils implements Serializable {

private static final String XHTML = ".xhtml";

@Serial
private static final long serialVersionUID = -3658719779910485458L;

private static final String UNSUPPORTED_CONFIGURATION = "Unsupported configuration for fallback navigation detected. Expected NavigationHandler is ConfigurableNavigationHandler, but was ['%s']";
Expand Down Expand Up @@ -181,9 +183,8 @@ public static void sendRedirect(final FacesContext facesContext, final String ur
final var response = getResponse(facesContext);
if (!response.isCommitted()) {

final var fullUrl = new StringBuilder()
.append(response.encodeRedirectURL(getRequest(facesContext).getContextPath()))
.append(handleViewIdSuffix(url)).append(createParameterString(encode, parameters)).toString();
final var fullUrl = response.encodeRedirectURL(getRequest(facesContext).getContextPath()) +
handleViewIdSuffix(url) + createParameterString(encode, parameters);

redirect(facesContext, fullUrl);
} else if (log.isWarnEnabled()) {
Expand Down Expand Up @@ -215,7 +216,7 @@ public static void redirect(final FacesContext facesContext, final String fullUr
public static void sendRedirectParameterList(final FacesContext facesContext, final String url,
final List<UrlParameter> parameterList) {
if (parameterList != null && !parameterList.isEmpty()) {
final var parameters = parameterList.toArray(new UrlParameter[parameterList.size()]);
final var parameters = parameterList.toArray(new UrlParameter[0]);
sendRedirect(facesContext, url, true, parameters);
} else {
sendRedirect(facesContext, url, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package de.cuioss.jsf.api.application.navigation;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

Expand Down Expand Up @@ -46,6 +47,7 @@ public class ViewIdentifier implements Serializable, Redirector {
/** The outcome identifying back navigation. */
public static final String BACK = "back";

@Serial
private static final long serialVersionUID = -8246314995093995027L;

@Getter
Expand All @@ -64,8 +66,8 @@ public class ViewIdentifier implements Serializable, Redirector {
* @return The {@link ViewIdentifier} representing the current view incl
* {@link UrlParameter}. If a view can not be determined it returns null
*/
public static final ViewIdentifier getFromViewDesciptor(final ViewDescriptor viewDescriptor,
final ParameterFilter parameterFilter) {
public static ViewIdentifier getFromViewDesciptor(final ViewDescriptor viewDescriptor,
final ParameterFilter parameterFilter) {
if (null == viewDescriptor || null == viewDescriptor.getLogicalViewId()) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import lombok.RequiredArgsConstructor;
import lombok.ToString;

import java.io.Serial;

/**
* Will always return false / true depending on given attribute match
*
Expand All @@ -30,6 +32,7 @@
@RequiredArgsConstructor
public class EmptyViewMatcher implements ViewMatcher {

@Serial
private static final long serialVersionUID = -3249573462984449100L;

private final boolean match;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import lombok.RequiredArgsConstructor;
import lombok.ToString;

import java.io.Serial;

/**
* {@link ViewMatcher} that looks up an outcome for a concrete view.
*
Expand All @@ -35,6 +37,7 @@
@ToString
public class OutcomeBasedViewMatcher implements ViewMatcher {

@Serial
private static final long serialVersionUID = -8359315030575513107L;

@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import static de.cuioss.tools.string.MoreStrings.isEmpty;

import java.io.Serial;
import java.util.List;

import de.cuioss.jsf.api.common.view.ViewDescriptor;
Expand All @@ -37,6 +38,7 @@
@ToString
public class ViewMatcherImpl implements ViewMatcher {

@Serial
private static final long serialVersionUID = -1211279289779853076L;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import lombok.Setter;
import lombok.ToString;

import java.io.Serial;

/**
* Resolves a converter regarding the current context.
* <ul>
Expand All @@ -47,6 +49,7 @@
@EqualsAndHashCode
public class ConverterAccessor<T> implements ManagedAccessor<Converter<T>> {

@Serial
private static final long serialVersionUID = -4619233196555638241L;

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@
import de.cuioss.uimodel.application.CuiProjectStage;
import lombok.Getter;

import java.io.Serial;

/**
* Accesses instances of {@link CuiProjectStage}
*
* @author Oliver Wolff
*/
public class CuiProjectStageAccessor implements ManagedAccessor<CuiProjectStage> {

@Serial
private static final long serialVersionUID = 706263142443297439L;

@Getter(lazy = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import lombok.Getter;
import lombok.ToString;

import java.io.Serial;

/**
* Helper class utilized for accessing Project Stage information in a convenient
* way. It needs to be registered as an Application Scoped bean, because the
Expand All @@ -35,6 +37,7 @@
@ToString
class CuiProjectStageImpl implements CuiProjectStage {

@Serial
private static final long serialVersionUID = -2464134252511225231L;

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package de.cuioss.jsf.api.common.accessor;

import java.io.Serial;
import java.util.Locale;

import jakarta.faces.application.ViewHandler;
Expand All @@ -38,6 +39,7 @@
*/
public class LocaleAccessor implements ManagedAccessor<Locale> {

@Serial
private static final long serialVersionUID = -7372535413254248257L;

@Getter(lazy = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import static de.cuioss.tools.collect.CollectionLiterals.immutableList;

import java.io.Serial;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
Expand All @@ -35,6 +36,7 @@
@ToString
public class ViewDescriptorImpl implements ViewDescriptor {

@Serial
private static final long serialVersionUID = -7389597518902482078L;

private static final Pattern NON_LATIN = Pattern.compile("[^A-Za-z ]");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class JsfBehaviorComponent {
* @param context must not be {@code null}
* @return a newly instantiated AjaxBehavior
*/
public static final AjaxBehavior ajaxBehavior(FacesContext context) {
public static AjaxBehavior ajaxBehavior(FacesContext context) {
requireNonNull(context);
return (AjaxBehavior) context.getApplication().createBehavior(AjaxBehavior.BEHAVIOR_ID);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import static de.cuioss.tools.string.MoreStrings.isEmpty;

import de.cuioss.jsf.api.components.css.impl.StyleClassBuilderImpl;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package de.cuioss.jsf.api.components.css;

import de.cuioss.jsf.api.components.css.impl.StyleClassBuilderImpl;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package de.cuioss.jsf.api.components.events;

import java.io.Serial;
import java.io.Serializable;

import jakarta.faces.component.UIComponent;
Expand All @@ -32,6 +33,7 @@
*/
public class ModelPayloadEvent extends FacesEvent {

@Serial
private static final long serialVersionUID = 7452809204723547999L;

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public String script() {
* @param idString
* @return the escaped String
*/
public static final String escapeClientId(final String idString) {
public static String escapeClientId(final String idString) {
final Iterable<String> splitted = Splitter.on(':').splitToList(nullToEmpty(idString));
return Joiner.on("\\\\:").join(splitted);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package de.cuioss.jsf.api.components.javascript;

import java.io.Serial;
import java.io.Serializable;

import lombok.Getter;
Expand All @@ -34,6 +35,7 @@
@ToString
public class NotQuotableWrapper implements Serializable {

@Serial
private static final long serialVersionUID = -6239824476027054699L;

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import static de.cuioss.jsf.api.components.model.datalist.AddStatus.PERSISTED;

import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
Expand All @@ -42,6 +43,7 @@
@EqualsAndHashCode(doNotUseGetters = true)
public abstract class AbstractEditableDataListModel<T extends Serializable> implements EditableDataListModel<T> {

@Serial
private static final long serialVersionUID = 2719782028119450821L;
private List<ItemWrapper<T>> displayItems;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import static de.cuioss.tools.base.Preconditions.checkState;
import static java.util.Objects.requireNonNull;

import java.io.Serial;
import java.io.Serializable;

import de.cuioss.jsf.api.components.model.datalist.AddStatus;
Expand All @@ -39,6 +40,7 @@
@ToString(of = { "wrapped", "editStatus" })
public class ItemWrapperImpl<T extends Serializable> implements ItemWrapper<T> {

@Serial
private static final long serialVersionUID = 7020783590024372831L;

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import static java.util.Objects.requireNonNull;

import java.io.Serial;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
Expand All @@ -43,6 +44,7 @@
@ToString(callSuper = true)
public class ReflectionBasedEditableDataListModel<T extends Serializable> extends AbstractEditableDataListModel<T> {

@Serial
private static final long serialVersionUID = 6139592941529357681L;

private final Class<T> modelClass;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package de.cuioss.jsf.api.components.model.menu;

import java.io.Serial;
import java.util.ArrayList;
import java.util.List;

Expand All @@ -35,6 +36,7 @@
@ToString
public class NavigationMenuItemContainerImpl extends NavigationMenuItemImpl implements NavigationMenuItemContainer {

@Serial
private static final long serialVersionUID = 5453628443565248832L;

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import lombok.Setter;
import lombok.ToString;

import java.io.Serial;

/**
* Basic Implementation of a {@link NavigationMenuItem}
*
Expand All @@ -33,6 +35,7 @@
public class NavigationMenuItemExternalSingleImpl extends NavigationMenuItemImpl
implements NavigationMenuItemExternalSingle {

@Serial
private static final long serialVersionUID = -4292374413272966456L;

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package de.cuioss.jsf.api.components.model.menu;

import java.io.Serial;
import java.util.ArrayList;
import java.util.List;

Expand All @@ -38,6 +39,7 @@
@RequiredArgsConstructor
public abstract class NavigationMenuItemImpl implements NavigationMenuItem {

@Serial
private static final long serialVersionUID = 7357376149469833501L;

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.io.Serial;

/**
* Basic Implementation of a {@link NavigationMenuItem}
*
Expand All @@ -27,6 +29,7 @@
@ToString
public class NavigationMenuItemSeparatorImpl extends NavigationMenuItemImpl implements NavigationMenuItemSeparator {

@Serial
private static final long serialVersionUID = 2808000723947735968L;

/**
Expand Down
Loading

0 comments on commit 08e63ac

Please sign in to comment.