Commit 31ca7047fcbad7592ff7f2302495d04912fd17bc
1 parent
c4188b21
Exists in
master
Correção da propriedade que retorna o valor da nota.
Showing
1 changed file
with
6 additions
and
3 deletions
Show diff stats
src/main/java/br/com/ases/controller/EseloController.java
@@ -60,11 +60,14 @@ public class EseloController { | @@ -60,11 +60,14 @@ public class EseloController { | ||
60 | } | 60 | } |
61 | public String getValor() { | 61 | public String getValor() { |
62 | NumberFormat format = NumberFormat.getInstance(); | 62 | NumberFormat format = NumberFormat.getInstance(); |
63 | - | 63 | + String notaFormatada = null; |
64 | format.setMaximumFractionDigits(2); | 64 | format.setMaximumFractionDigits(2); |
65 | format.setMinimumFractionDigits(0); | 65 | format.setMinimumFractionDigits(0); |
66 | - | ||
67 | - return format.format(Double.valueOf(nota)); | 66 | + if(nota != null) |
67 | + { | ||
68 | + notaFormatada = format.format(Double.valueOf(nota)); | ||
69 | + } | ||
70 | + return notaFormatada; | ||
68 | } | 71 | } |
69 | 72 | ||
70 | public void setNota(String valor) { | 73 | public void setNota(String valor) { |