diff -r 3ca85da78515 -r b42bfc9e9983 src/main/java/de/unixwork/uwproj/Feature.java --- a/src/main/java/de/unixwork/uwproj/Feature.java Wed Sep 06 21:08:04 2023 +0200 +++ b/src/main/java/de/unixwork/uwproj/Feature.java Wed Sep 06 22:55:42 2023 +0200 @@ -1,18 +1,9 @@ -/* - * 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; -/** - * - * @author olaf - */ +import java.util.List; + public class Feature { private String name; private String arg; @@ -26,7 +17,7 @@ String arg = e.getAttribute("arg"); String def = e.getAttribute("default"); - if(name.length() == 0) { + if(name.isEmpty()) { throw new Exception("feature element requires name attribute"); } @@ -34,7 +25,7 @@ boolean on = ld.equals("on") || ld.equals("true"); feature.setName(name); feature.setDefault(on); - if(arg.length() == 0) { + if(arg.isEmpty()) { feature.setArg(name); } else { feature.setArg(arg); @@ -62,7 +53,7 @@ } public boolean hasMake() { - return targetData.getMake().trim().length() > 0; + return !targetData.getMake().trim().isEmpty(); } public String getName() {