Skip to content
Snippets Groups Projects
Commit 1d1fa1d2 authored by Ivan Gonzalez's avatar Ivan Gonzalez
Browse files

Solucionado code smell

parent 572d9bad
No related branches found
No related tags found
1 merge request!3Develop
Pipeline #
...@@ -43,7 +43,7 @@ public class Persona { ...@@ -43,7 +43,7 @@ public class Persona {
public Persona(String nombre, int id, List<Persona> amigos, List<Persona> conocidos) { public Persona(String nombre, int id, List<Persona> amigos, List<Persona> conocidos) {
if (nombre == null) if (nombre == null)
throw new IllegalArgumentException("El nombre no puede ser null."); throw new IllegalArgumentException("El nombre no puede ser null.");
if (nombre.equals("")) if ("".equals(nombre))
throw new IllegalArgumentException("El nombre no puede ser cadena vacía."); throw new IllegalArgumentException("El nombre no puede ser cadena vacía.");
if (id < 0) if (id < 0)
throw new IllegalArgumentException("El identificador de la Persona no puede ser negativo."); throw new IllegalArgumentException("El identificador de la Persona no puede ser negativo.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment