JDO-823: Remove unused local variable (#72)
* Removed unused local variable
* Fixed formatting
diff --git a/api/src/test/java/javax/jdo/EnhancerTest.java b/api/src/test/java/javax/jdo/EnhancerTest.java
index 55c8184..3cb84e7 100644
--- a/api/src/test/java/javax/jdo/EnhancerTest.java
+++ b/api/src/test/java/javax/jdo/EnhancerTest.java
@@ -512,12 +512,9 @@
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 @@
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 2451b92..a2da92f 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 @@
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 @@
return thread;
}
- class InvocationResult {
+ static class InvocationResult {
private int exitValue;
private String errorString;
private String outputString;