You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by ti...@apache.org on 2023/03/30 19:46:43 UTC

[db-jdo] branch jdo-823-unused-local-variable created (now 40c34c14)

This is an automated email from the ASF dual-hosted git repository.

tilmannz pushed a change to branch jdo-823-unused-local-variable
in repository https://gitbox.apache.org/repos/asf/db-jdo.git


      at 40c34c14 Removed unused local variable

This branch includes the following new commits:

     new 40c34c14 Removed unused local variable

The 1 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.



[db-jdo] 01/01: Removed unused local variable

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tilmannz pushed a commit to branch jdo-823-unused-local-variable
in repository https://gitbox.apache.org/repos/asf/db-jdo.git

commit 40c34c149bcbc502213818b6fc68d63748c96698
Author: Tilmann <zo...@gmx.de>
AuthorDate: Thu Mar 30 21:46:36 2023 +0200

    Removed unused local variable
---
 api/src/test/java/javax/jdo/EnhancerTest.java               | 8 ++------
 exectck/src/main/java/org/apache/jdo/exectck/Utilities.java | 8 ++------
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/api/src/test/java/javax/jdo/EnhancerTest.java b/api/src/test/java/javax/jdo/EnhancerTest.java
index 55c81849..33cbc840 100644
--- a/api/src/test/java/javax/jdo/EnhancerTest.java
+++ b/api/src/test/java/javax/jdo/EnhancerTest.java
@@ -512,12 +512,8 @@ public class EnhancerTest extends AbstractTest {
     Thread thread =
         new Thread(
             () -> {
-              int count = 0;
-              int outputBytesRead = 0;
               try {
-                while (-1 != (outputBytesRead = reader.read(output))) {
-                  count += outputBytesRead;
-                }
+                while (-1 != reader.read(output));
               } catch (IOException e) {
                 e.printStackTrace();
               } finally {
@@ -528,7 +524,7 @@ public class EnhancerTest extends AbstractTest {
     return thread;
   }
 
-  class InvocationResult {
+  static class InvocationResult {
     private int exitValue;
     private String errorString;
     private String outputString;
diff --git a/exectck/src/main/java/org/apache/jdo/exectck/Utilities.java b/exectck/src/main/java/org/apache/jdo/exectck/Utilities.java
index 2451b928..e75b1130 100644
--- a/exectck/src/main/java/org/apache/jdo/exectck/Utilities.java
+++ b/exectck/src/main/java/org/apache/jdo/exectck/Utilities.java
@@ -154,12 +154,8 @@ public class Utilities {
     Thread thread =
         new Thread(
             () -> {
-              int count = 0;
-              int outputBytesRead = 0;
               try {
-                while (-1 != (outputBytesRead = reader.read(output))) {
-                  count += outputBytesRead;
-                }
+                while (-1 != reader.read(output));
               } catch (IOException e) {
                 e.printStackTrace();
               } finally {
@@ -170,7 +166,7 @@ public class Utilities {
     return thread;
   }
 
-  class InvocationResult {
+  static class InvocationResult {
     private int exitValue;
     private String errorString;
     private String outputString;