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/04/06 18:19:18 UTC

[db-jdo] branch main updated: JDO-823: Remove unused local variable (#72)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 24328f36 JDO-823: Remove unused local variable (#72)
24328f36 is described below

commit 24328f36ff8b8e958497014ae716a3ced0d99282
Author: Tilmann <zo...@gmx.de>
AuthorDate: Thu Apr 6 20:19:13 2023 +0200

    JDO-823: Remove unused local variable (#72)
    
    * Removed unused local variable
    
    * Fixed formatting
---
 api/src/test/java/javax/jdo/EnhancerTest.java               | 9 +++------
 exectck/src/main/java/org/apache/jdo/exectck/Utilities.java | 9 +++------
 2 files changed, 6 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..3cb84e72 100644
--- a/api/src/test/java/javax/jdo/EnhancerTest.java
+++ b/api/src/test/java/javax/jdo/EnhancerTest.java
@@ -512,12 +512,9 @@ 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 +525,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..a2da92f9 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,9 @@ 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 +167,7 @@ public class Utilities {
     return thread;
   }
 
-  class InvocationResult {
+  static class InvocationResult {
     private int exitValue;
     private String errorString;
     private String outputString;