simplify abstract bean a bit
[jSite2.git] / src / net / pterodactylus / jsite / project / Project.java
index 2c6609f..4025b82 100644 (file)
@@ -84,9 +84,7 @@ public class Project extends AbstractBean {
        public void setName(String name) {
                String oldName = this.name;
                this.name = name;
-               if (!equal(oldName, name)) {
-                       firePropertyChange(PROPERTY_NAME, oldName, name);
-               }
+               fireIfPropertyChanged(PROPERTY_NAME, oldName, name);
        }
 
        /**
@@ -107,9 +105,7 @@ public class Project extends AbstractBean {
        public void setDescription(String description) {
                String oldDescription = this.description;
                this.description = description;
-               if (!equal(oldDescription, description)) {
-                       firePropertyChange(PROPERTY_DESCRIPTION, oldDescription, description);
-               }
+               fireIfPropertyChanged(PROPERTY_DESCRIPTION, oldDescription, description);
        }
 
        /**
@@ -130,9 +126,7 @@ public class Project extends AbstractBean {
        public void setPublicKey(String publicKey) {
                String oldPublicKey = this.publicKey;
                this.publicKey = publicKey;
-               if (!equal(oldPublicKey, publicKey)) {
-                       firePropertyChange(PROPERTY_PUBLIC_KEY, oldPublicKey, publicKey);
-               }
+               fireIfPropertyChanged(PROPERTY_PUBLIC_KEY, oldPublicKey, publicKey);
        }
 
        /**
@@ -153,9 +147,7 @@ public class Project extends AbstractBean {
        public void setPrivateKey(String privateKey) {
                String oldPrivateKey = this.privateKey;
                this.privateKey = privateKey;
-               if (!equal(oldPrivateKey, privateKey)) {
-                       firePropertyChange(PROPERTY_PRIVATE_KEY, oldPrivateKey, privateKey);
-               }
+               fireIfPropertyChanged(PROPERTY_PRIVATE_KEY, oldPrivateKey, privateKey);
        }
 
        /**
@@ -176,7 +168,7 @@ public class Project extends AbstractBean {
        public void setBasePath(String basePath) {
                String oldBasePath = this.basePath;
                this.basePath = basePath;
-               firePropertyChange(PROPERTY_LOCAL_PATH, oldBasePath, basePath);
+               fireIfPropertyChanged(PROPERTY_LOCAL_PATH, oldBasePath, basePath);
        }
 
 }