Skip to content

Commit

Permalink
Faces Spec #1883 - use varargs
Browse files Browse the repository at this point in the history
  • Loading branch information
tandraschko committed Aug 5, 2024
1 parent 8261948 commit 2a7749d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
15 changes: 2 additions & 13 deletions api/src/main/java/jakarta/faces/component/UIViewRoot.java
Original file line number Diff line number Diff line change
Expand Up @@ -1461,18 +1461,7 @@ public Map<String, Object> getAttributes()
* @param context
* @param clientIds
*/
public void resetValues(FacesContext context, java.util.Collection<java.lang.String> clientIds)
{
resetValues(context, clientIds, null);
}

/**
* @since 5.0
* @param context
* @param clientIds
* @param hints
*/
public void resetValues(FacesContext context, java.util.Collection<java.lang.String> clientIds, Set<VisitHint> hints)
public void resetValues(FacesContext context, java.util.Collection<java.lang.String> clientIds, VisitHint... visitHints)
{
if (clientIds == null || clientIds.isEmpty())
{
Expand All @@ -1491,7 +1480,7 @@ public void resetValues(FacesContext context, java.util.Collection<java.lang.Str

// lazy init
if (visitContext == null) {
visitContext = VisitContext.createVisitContext(context, null, hints);
visitContext = VisitContext.createVisitContext(context, null, visitHints.length == 0 ? null : Set.of(visitHints));
}

if ("@all".equals(clientId) || PartialResponseWriter.RENDER_ALL_MARKER.equals(clientId)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ public class PartialViewContextImpl extends PartialViewContext
private static final Set<VisitHint> PARTIAL_EXECUTE_HINTS = Collections.unmodifiableSet(
EnumSet.of(VisitHint.EXECUTE_LIFECYCLE, VisitHint.SKIP_UNRENDERED));

private static final Set<VisitHint> RESET_VALUES_HINTS =
Collections.unmodifiableSet(EnumSet.of(VisitHint.SKIP_UNRENDERED));
private static final VisitHint[] RESET_VALUES_HINTS = new VisitHint[] { VisitHint.SKIP_UNRENDERED };

private FacesContext context = null;
private boolean _released = false;
Expand Down

0 comments on commit 2a7749d

Please sign in to comment.