src/main/java/de/unixwork/uwproj/Option.java

changeset 40
b42bfc9e9983
parent 0
38775db5fdf5
child 41
75ee588d5d9e
--- a/src/main/java/de/unixwork/uwproj/Option.java	Wed Sep 06 21:08:04 2023 +0200
+++ b/src/main/java/de/unixwork/uwproj/Option.java	Wed Sep 06 22:55:42 2023 +0200
@@ -1,20 +1,12 @@
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
 package de.unixwork.uwproj;
 
-import java.util.LinkedList;
-import java.util.List;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
-/**
- *
- * @author olaf
- */
+import java.util.LinkedList;
+import java.util.List;
+
 public class Option {
     private String arg;
     
@@ -24,7 +16,7 @@
     public static Option parse(Project project, Element element) throws Exception {
         Option opt = new Option();
         String arg = element.getAttribute("arg");
-        if(arg.length() == 0) {
+        if(arg.isEmpty()) {
             throw new Exception("Option has no argument string");
         }
         opt.setArgument(arg);
@@ -45,7 +37,7 @@
                     String defPlatform = elm.getAttribute(("platform"));
                     OptionDefault def = new OptionDefault(opt);
                     def.setValueName(defValue);
-                    if(defPlatform.length() > 0) {
+                    if(!defPlatform.isEmpty()) {
                         def.setPlatform(defPlatform);
                     }
                     opt.defaults.add(def);
@@ -85,7 +77,7 @@
     }
     
     public String getValuesString() {
-        if(values.size() == 0) {
+        if(values.isEmpty()) {
             return "()";
         } else if(values.size() == 1) {
             return values.get(0).getValue();

mercurial