Skip to content

Commit 4cd9710

Browse files
committed
Merge pull request #1282 from marschall:SPR-15077
* pr/1282: Avoid use of double constructor of BigDecimal
2 parents df98d30 + 3f97ab1 commit 4cd9710

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateQueryTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -197,8 +197,8 @@ public void testQueryForObjectWithBigInteger() throws Exception {
197197
public void testQueryForObjectWithBigDecimal() throws Exception {
198198
String sql = "SELECT AGE FROM CUSTMR WHERE ID = 3";
199199
given(this.resultSet.next()).willReturn(true, false);
200-
given(this.resultSet.getBigDecimal(1)).willReturn(new BigDecimal(22.5));
201-
assertEquals(new BigDecimal(22.5), this.template.queryForObject(sql, BigDecimal.class));
200+
given(this.resultSet.getBigDecimal(1)).willReturn(new BigDecimal("22.5"));
201+
assertEquals(new BigDecimal("22.5"), this.template.queryForObject(sql, BigDecimal.class));
202202
verify(this.resultSet).close();
203203
verify(this.statement).close();
204204
}

0 commit comments

Comments
 (0)