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 2021/01/17 01:20:20 UTC

[commons-bcel] branch master updated: Use isEmpty().

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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git


The following commit(s) were added to refs/heads/master by this push:
     new c35db45  Use isEmpty().
c35db45 is described below

commit c35db459c82bcc52314a6a28574bfe1de025fa7f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 16 20:20:16 2021 -0500

    Use isEmpty().
---
 src/examples/Mini/MiniC.java | 6 +++---
 src/examples/listclass.java  | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/examples/Mini/MiniC.java b/src/examples/Mini/MiniC.java
index 2e73847..5c93758 100644
--- a/src/examples/Mini/MiniC.java
+++ b/src/examples/Mini/MiniC.java
@@ -93,12 +93,12 @@ public class MiniC implements org.apache.bcel.Constants {
         program = program.traverse();
         // program.dump(">");
 
-        if(errors.size() == 0) {
+        if(errors.isEmpty()) {
           System.out.println("Pass 2: Type checking (I) ...");
           program.eval(pass=2);
         }
 
-        if(errors.size() == 0) {
+        if(errors.isEmpty()) {
           System.out.println("Pass 3: Type checking (II) ...");
           program.eval(pass=3);
         }
@@ -111,7 +111,7 @@ public class MiniC implements org.apache.bcel.Constants {
             System.out.println(warnings.elementAt(i));
         }
 
-        if(errors.size() == 0) {
+        if(errors.isEmpty()) {
           if(byte_code) {
             System.out.println("Pass 5: Generating byte code ...");
             final ClassGen class_gen = new ClassGen(base_name, "java.lang.Object",
diff --git a/src/examples/listclass.java b/src/examples/listclass.java
index 886d4d8..36706da 100644
--- a/src/examples/listclass.java
+++ b/src/examples/listclass.java
@@ -145,7 +145,7 @@ public class listclass {
             }
         }
 
-        if (file_name.size() == 0) {
+        if (file_name.isEmpty()) {
             System.err.println("list: No input files specified");
         } else {
             final listclass listClass = new listclass(code, constants, verbose, classdep,