Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
update Result Parameters to something probably less confusing
Browse files Browse the repository at this point in the history
  • Loading branch information
Laifsyn committed Apr 12, 2024
1 parent aa7104c commit 6beacd7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/java/com/utp/clsHerramientas/pry2/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import java.util.List;
import java.util.Optional;

import javax.lang.model.type.NullType;

import com.utp.utils.Result;

public class App {
Expand Down Expand Up @@ -109,7 +107,7 @@ public static void main(String[] args) {
if (minuto == 0 && segundo == 0) {
break;
}
Result<NullType, String> result = tiempoCarrera.insertarTiempo(new int[] { minuto, segundo });
Result<Object, String> result = tiempoCarrera.insertarTiempo(new int[] { minuto, segundo });
if (result.isError()) {
System.out.println(result.unwrapError());
}
Expand Down Expand Up @@ -167,7 +165,7 @@ class TiempoCarrera {
ArrayList<Duration> tiempos = new ArrayList<Duration>();
static final double DISTANCIA = 1500.0;

public Result<NullType, String> insertarTiempo(int[] tiempo) {
public Result<Object, String> insertarTiempo(int[] tiempo) {
if (tiempo.length != 2) {
return Result.error("El tiempo debe tener dos valores.");
}
Expand Down

0 comments on commit 6beacd7

Please sign in to comment.