From 0b82f4cb2fda1364f086f611f0d5da325a475804 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 29 Apr 2016 15:13:14 +0200 Subject: [PATCH] Cleanup: - removed jcore.jar (maybe not serializable) - added serial numbers - removed getTranslatedGender() --- lib/jcore.jar | Bin 13647 -> 0 bytes nbproject/project.properties | 199 +++++++++--------- .../jcontacts/contact/gender/GenderUtils.java | 31 +-- .../jcontacts/contact/utils/ContactUtils.java | 9 +- 4 files changed, 109 insertions(+), 130 deletions(-) delete mode 100644 lib/jcore.jar diff --git a/lib/jcore.jar b/lib/jcore.jar deleted file mode 100644 index c50cd351b83398151594c3a383385faebc7ec753..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13647 zcmcIqX>4586+Uk~GtVB6myEaA35m1ViS5|qKp-n2c4EU2FClh9!j_I_UhGN6GiDaD z@B=|nf3>RG(jRnD7a>*{-COACH_Ib^X{E_i|;&d zbfhZ8?mKb3${!-CCTbab?mn{pYRFIHBhy3uv5C>>C+`uRC^v0J(_cRM ztI1h3=c5@%x#{@OL~L|qYIy^zS}ygF=FcZe@6q*Dn~d=G9N>duLD z%E%Nv`fXD8GcG5L1)j0IN8buO&&Lz-q}M<0vL{)T-Z$DQ}ah+yDR7(l|OX_6s`8@y4a@#qbQq^=JL=n2EQ@WbwxpRhJ zWp!H6>2ZyMGsR3YZD`anb|L;mJX$QI($SMfK3mKsjA8TLL5;$BBYi%W$rs|81lsNx zV+5D+DL_{qSS(X8a!``}2$4#|Hso5UP6jHNQhL~(w`$W6y*cm|tOc`;$hSSD3S#nY*) zMpC1yojnghxc)+jQTO~liu~l?42Sxl~@Gohnfj(7`C`F$&w9X*8f7 zNaZ=M0R=HB8f{m1c28X!x{Mq7JQmVaA(zU`j^?uS$Bio*b?+1)O2ceL#k+$&iyvVU zE^_mT>JM)ZIZPLzde|6Zd)2>mvV-k!{k2o=;N5(sIp_F$u-$x zGy|5(S4gC#JH^kz#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}+z0fQc$?ocka0BZa>qGcODtmhw&E&Y~}4*8U-qv!-vW=EF?{WVr(%k>1`9v&MB9;pEIYp zr|W%@x5u=z5#M#Hx~08J{uinK1_jQda1?xv_kZQi9+z`kL72bQz-*rx zkcxz<3&oyRv}wcPCtt%lSW;j>vdw`lQYC5!ah>-rZLE8F!&+?1S*(tL$S@>7hRF9m z5Q>?sL>$B45%5QgAZIegrV_3jNc)t-WSutZ*mdN55S3HOpLgbX*m7@QRH*pDq-_YC zKr&s8I?>T*#zwsH%I%s^39EUF3yhQlca_4RIetr!zK^O_JmmwBkJj-p}2J zYaeZQhFm{;_}=&L0wX?#(O@m8cR3n(>5y>hD0xeZq9`-5zqglwI+QC)nwB-LN=3D3 z8KJ`Jm#2sKXRU~eDr=?Y#Bt5nTvhp-YN!UkM*3)o&*jgi#TV9ASJgMx+<|{DJk4k< zceQ{Nb0GX-vqkJFH8EMM_Y#V~G_vSiSJSc8qr7N2W%`ermUL%cbc7vasd%RQU?Uw$ z5;I-$cV2|}10?ZdLP>8zUNi6hIJ-plg{NOu6E(fH>QimExb9CSEXqZcJQU+rZ0(yH zp>D$NopX!uE$l}q2;0X$WW_+jaJs3xw{9)!-@-asf;vymk{sOIh8BlsT9h0l*qOL} zd%-Qady~SVo5rSwLUKvhi>A9iZqXb8mK8K@3u?()u~NJ4TC2tJBHX+;M~~W`TG{Sm zn#Js6*feiup7kQ-(AG}x0MdCvV7Z?DfiD0~_VeBU0Dl1)KmY&$ diff --git a/nbproject/project.properties b/nbproject/project.properties index 2de7e48..357ac89 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -1,101 +1,98 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=true -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=jcontacts-core -application.vendor=Roland Haeder -auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# Files in build.classes.dir which should be excluded from distribution jar -dist.archive.excludes= -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/jcontacts-core.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.jcore.jar=lib/jcore.jar -file.reference.jcountry-core.jar=lib/jcountry-core.jar -file.reference.jphone-core.jar=lib/jphone-core.jar -includes=** -jar.archive.disabled=${jnlp.enabled} -jar.compress=false -jar.index=${jnlp.enabled} -javac.classpath=\ - ${file.reference.jcore.jar}:\ - ${file.reference.jcountry-core.jar}:\ - ${file.reference.jphone-core.jar}:\ - ${libs.jpa20-persistence.classpath} -# Space-separated list of extra javac options -javac.compilerargs=-Xlint:unchecked -Xlint:deprecation -javac.deprecation=true -javac.external.vm=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.7 -javac.target=1.7 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=true -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=true -javadoc.splitindex=true -javadoc.use=true -javadoc.version=true -javadoc.windowtitle=Contacts Library -jnlp.codebase.type=no.codebase -jnlp.descriptor=application -jnlp.enabled=false -jnlp.mixed.code=default -jnlp.offline-allowed=false -jnlp.signed=false -jnlp.signing= -jnlp.signing.alias= -jnlp.signing.keystore= -# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed -manifest.custom.codebase= -# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions) -manifest.custom.permissions= -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=true -platform.active=default_platform -project.license=gpl30 -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# Space-separated list of JVM arguments used when running the project. -# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. -# To set system properties for unit tests define test-sys-prop.name=value: -run.jvmargs= -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -source.reference.jcore.jar=../jcore/src/ -source.reference.jcountry-core.jar=../jcountry-core/src/ -source.reference.jphone-core.jar=../jphone-core/src/ -src.dir=src -test.src.dir=test +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=jcontacts-core +application.vendor=Roland Haeder +auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/jcontacts-core.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +file.reference.jcountry-core.jar=lib/jcountry-core.jar +file.reference.jphone-core.jar=lib/jphone-core.jar +includes=** +jar.archive.disabled=${jnlp.enabled} +jar.compress=false +jar.index=${jnlp.enabled} +javac.classpath=\ + ${file.reference.jcountry-core.jar}:\ + ${file.reference.jphone-core.jar}:\ + ${libs.jpa20-persistence.classpath} +# Space-separated list of extra javac options +javac.compilerargs=-Xlint:unchecked -Xlint:deprecation +javac.deprecation=true +javac.external.vm=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=true +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=true +javadoc.splitindex=true +javadoc.use=true +javadoc.version=true +javadoc.windowtitle=Contacts Library +jnlp.codebase.type=no.codebase +jnlp.descriptor=application +jnlp.enabled=false +jnlp.mixed.code=default +jnlp.offline-allowed=false +jnlp.signed=false +jnlp.signing= +jnlp.signing.alias= +jnlp.signing.keystore= +# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed +manifest.custom.codebase= +# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions) +manifest.custom.permissions= +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=true +platform.active=default_platform +project.license=gpl30 +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +source.reference.jcountry-core.jar=../jcountry-core/src/ +source.reference.jphone-core.jar=../jphone-core/src/ +src.dir=src +test.src.dir=test diff --git a/src/org/mxchange/jcontacts/contact/gender/GenderUtils.java b/src/org/mxchange/jcontacts/contact/gender/GenderUtils.java index f5b2bb6..ab2fd59 100644 --- a/src/org/mxchange/jcontacts/contact/gender/GenderUtils.java +++ b/src/org/mxchange/jcontacts/contact/gender/GenderUtils.java @@ -16,45 +16,22 @@ */ package org.mxchange.jcontacts.contact.gender; +import java.io.Serializable; import java.text.MessageFormat; import java.util.LinkedList; import java.util.List; -import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jcore.BaseFrameworkSystem; /** * Gender utils class *

* @author Roland Haeder */ -public class GenderUtils extends BaseFrameworkSystem { +public class GenderUtils implements Serializable { /** - * Translates contact's gender to human-readable - *

- * @param contact Contact instance - *

- * @return Translates value (from bundle) + * Serial number */ - public static String getTranslatedGender (final Contact contact) { - // Init instance - GenderUtils utils = new GenderUtils(); - - // contact must be set - if (null == contact) { - // Abort here - throw new NullPointerException("contact is null"); - } else if (contact.getContactGender() == null) { - // Gender is not set - throw new NullPointerException(MessageFormat.format("contact {0} has no gender set.", contact)); - } - - // Get key from it - String key = contact.getContactGender().getMessageKey(); - - // Translate and return it - return utils.getMessageStringFromKey(key); - } + private static final long serialVersionUID = 185_683_479_107L; /** * All selectable genders (not UNKNOWN) diff --git a/src/org/mxchange/jcontacts/contact/utils/ContactUtils.java b/src/org/mxchange/jcontacts/contact/utils/ContactUtils.java index 4b5baf3..82c2908 100644 --- a/src/org/mxchange/jcontacts/contact/utils/ContactUtils.java +++ b/src/org/mxchange/jcontacts/contact/utils/ContactUtils.java @@ -16,9 +16,9 @@ */ package org.mxchange.jcontacts.contact.utils; +import java.io.Serializable; import java.util.Objects; import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jcore.BaseFrameworkSystem; import org.mxchange.jcountry.data.Country; import org.mxchange.jphone.phonenumbers.cellphone.CellphoneNumber; import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; @@ -33,7 +33,12 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; *

* @author Roland Haeder */ -public class ContactUtils extends BaseFrameworkSystem { +public class ContactUtils implements Serializable { + + /** + * Serial number + */ + private static final long serialVersionUID = 26_785_734_719_670L; /** * Checks whether both contacts are same, but ignoring id number. If you -- 2.39.5