Skip to content

Commit 002e79c

Browse files
committed
Rename first to firstOrDefault to avoid ambiguity with Java 8 lambda
1 parent 81de4f5 commit 002e79c

File tree

1 file changed

+2
-2
lines changed
  • src/AndroidClient/client/src/main/java/net/servicestack/func

1 file changed

+2
-2
lines changed

src/AndroidClient/client/src/main/java/net/servicestack/func/Func.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,10 @@ public static <T> T first(T[] xs) {
197197
}
198198

199199
public static <T> T first(Iterable<T> xs) {
200-
return first(xs, (T) null);
200+
return firstOrDefault(xs, (T) null);
201201
}
202202

203-
public static <T> T first(Iterable<T> xs, T defaultValue) {
203+
public static <T> T firstOrDefault(Iterable<T> xs, T defaultValue) {
204204
if (xs == null)
205205
return defaultValue;
206206

0 commit comments

Comments
 (0)