Skip to content

Commit

Permalink
Fix compilation error on #885
Browse files Browse the repository at this point in the history
  • Loading branch information
BalusC committed Dec 26, 2024
1 parent 7764337 commit 197d02b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/java/org/omnifaces/util/FacesLocal.java
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public static <T> T getContextAttribute(FacesContext context, String name) {
* @see Faces#getContextAttribute(String, Supplier)
*/
public static <T> T getContextAttribute(FacesContext context, String name, Supplier<T> computeIfAbsent) {
T value = getContextAttribute(context, name);
var value = getContextAttribute(context, name);

if (value == null) {
value = computeIfAbsent.get();
Expand Down Expand Up @@ -796,7 +796,7 @@ public static Map<String, ResourceBundle> getResourceBundles(FacesContext contex
}

/**
* @see Faces#getBundleString(String)
* @see Faces#getBundleString(String, Object...)
*/
public static String getBundleString(FacesContext context, String key, Object... params) {
for (var bundle : getResourceBundles(context).values()) {
Expand Down Expand Up @@ -882,7 +882,7 @@ public static void navigate(FacesContext context, String outcome) {
* @see Faces#getFaceletContext()
*/
public static FaceletContext getFaceletContext(FacesContext context) {
FaceletContext faceletContext = getContextAttribute(context, FACELET_CONTEXT_KEY);
var faceletContext = getContextAttribute(context, FACELET_CONTEXT_KEY);

if (faceletContext != null) {
return faceletContext;
Expand Down Expand Up @@ -1629,7 +1629,7 @@ public static <T> T getRequestAttribute(FacesContext context, String name) {
* @see Faces#getRequestAttribute(String, Supplier)
*/
public static <T> T getRequestAttribute(FacesContext context, String name, Supplier<T> computeIfAbsent) {
T value = getRequestAttribute(context, name);
var value = getRequestAttribute(context, name);

if (value == null) {
value = computeIfAbsent.get();
Expand Down Expand Up @@ -1675,7 +1675,7 @@ public static <T> T getFlashAttribute(FacesContext context, String name) {
* @see Faces#getFlashAttribute(String, Supplier)
*/
public static <T> T getFlashAttribute(FacesContext context, String name, Supplier<T> computeIfAbsent) {
T value = getFlashAttribute(context, name);
var value = getFlashAttribute(context, name);

if (value == null) {
value = computeIfAbsent.get();
Expand Down Expand Up @@ -1721,7 +1721,7 @@ public static <T> T getViewAttribute(FacesContext context, String name) {
* @see Faces#getViewAttribute(String, Supplier)
*/
public static <T> T getViewAttribute(FacesContext context, String name, Supplier<T> computeIfAbsent) {
T value = getViewAttribute(context, name);
var value = getViewAttribute(context, name);

if (value == null) {
value = computeIfAbsent.get();
Expand Down Expand Up @@ -1767,7 +1767,7 @@ public static <T> T getSessionAttribute(FacesContext context, String name) {
* @see Faces#getSessionAttribute(String, Supplier)
*/
public static <T> T getSessionAttribute(FacesContext context, String name, Supplier<T> computeIfAbsent) {
T value = getSessionAttribute(context, name);
var value = getSessionAttribute(context, name);

if (value == null) {
value = computeIfAbsent.get();
Expand Down Expand Up @@ -1813,7 +1813,7 @@ public static <T> T getApplicationAttribute(FacesContext context, String name) {
* @see Faces#getApplicationAttribute(String, Supplier)
*/
public static <T> T getApplicationAttribute(FacesContext context, String name, Supplier<T> computeIfAbsent) {
T value = getApplicationAttribute(context, name);
var value = getApplicationAttribute(context, name);

if (value == null) {
value = computeIfAbsent.get();
Expand Down

0 comments on commit 197d02b

Please sign in to comment.