You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/06/12 18:43:00 UTC
(commons-beanutils) branch 1.X updated (6e015f75 -> 157e93ea)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a change to branch 1.X
in repository https://gitbox.apache.org/repos/asf/commons-beanutils.git
from 6e015f75 Port some tests to JUnit 5
new 1b1567c9 No need to override tearDown()
new 157e93ea Add @Override
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/commons/beanutils/WrapDynaBeanTestCase.java | 10 +---------
.../locale/converters/IntegerLocaleConverterTestCase.java | 14 +++-----------
2 files changed, 4 insertions(+), 20 deletions(-)
(commons-beanutils) 02/02: Add @Override
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch 1.X
in repository https://gitbox.apache.org/repos/asf/commons-beanutils.git
commit 157e93ea2abed4e8c34c68ffb56b6ee06b53c19c
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Thu Jun 12 14:42:55 2025 -0400
Add @Override
No need to override tearDown()
---
.../org/apache/commons/beanutils/WrapDynaBeanTestCase.java | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/test/java/org/apache/commons/beanutils/WrapDynaBeanTestCase.java b/src/test/java/org/apache/commons/beanutils/WrapDynaBeanTestCase.java
index 45160652..e30e37f8 100644
--- a/src/test/java/org/apache/commons/beanutils/WrapDynaBeanTestCase.java
+++ b/src/test/java/org/apache/commons/beanutils/WrapDynaBeanTestCase.java
@@ -28,7 +28,6 @@ import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -105,19 +104,12 @@ public class WrapDynaBeanTestCase extends BasicDynaBeanTestCase {
/**
* Set up instance variables required by this test case.
*/
+ @Override
@BeforeEach
public void setUp() throws Exception {
bean = new WrapDynaBean(new TestBean());
}
- /**
- * Tear down instance variables required by this test case.
- */
- @AfterEach
- public void tearDown() {
- bean = null;
- }
-
/** Tests getInstance method */
@Test
public void testGetInstance() {
(commons-beanutils) 01/02: No need to override tearDown()
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch 1.X
in repository https://gitbox.apache.org/repos/asf/commons-beanutils.git
commit 1b1567c972b3917ba336d3e3cf0c1c853864149b
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Thu Jun 12 14:41:06 2025 -0400
No need to override tearDown()
---
.../locale/converters/IntegerLocaleConverterTestCase.java | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/src/test/java/org/apache/commons/beanutils/locale/converters/IntegerLocaleConverterTestCase.java b/src/test/java/org/apache/commons/beanutils/locale/converters/IntegerLocaleConverterTestCase.java
index 474d4bd4..f5f2f56c 100644
--- a/src/test/java/org/apache/commons/beanutils/locale/converters/IntegerLocaleConverterTestCase.java
+++ b/src/test/java/org/apache/commons/beanutils/locale/converters/IntegerLocaleConverterTestCase.java
@@ -41,14 +41,6 @@ public class IntegerLocaleConverterTestCase extends BaseLocaleConverterTestCase
}
- /**
- * Tear down instance variables required by this test case.
- */
- @Override
- public void tearDown() {
- super.tearDown();
- }
-
/**
* Test Converter() constructor
*
@@ -244,10 +236,10 @@ public class IntegerLocaleConverterTestCase extends BaseLocaleConverterTestCase
*/
public void testToPrimitiveType() {
converter = new IntegerLocaleConverter();
- final Integer value = 20131028;
+ final int value = 20131028;
final Class<Integer> target = Integer.TYPE;
- final int result = converter.convert(target, (Object) value.toString());
- assertEquals("Wrong result", value.intValue(), result);
+ final int result = converter.convert(target, (Object) Integer.toString(value));
+ assertEquals("Wrong result", value, result);
}
}