Author: bpapez
Date: Wed Jun 6 17:49:18 2007
New Revision: 17497
URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D17497&repname=
=3Djahia
Log:
slight refactoring of JahiaContainerSet (TODO)
Modified:
branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/data/containers/Ja=
hiaContainerSet.java
Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/data/contain=
ers/JahiaContainerSet.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/data/containers/JahiaContainerSet.java&rev=
=3D17497&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/data/containers/Ja=
hiaContainerSet.java (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/data/containers/Ja=
hiaContainerSet.java Wed Jun 6 17:49:18 2007
@@ -282,7 +282,7 @@
if (!isDeclaredField &&
//MC: this check was removed as it doesn't seem to have an=
y purpose anymore
//(!isJahiaDataDeclaredField) &&
- !fieldName.equals("") && !fieldTitle.equals("") && !isDecl=
aredContainer) {
+ fieldName.length() !=3D 0 && fieldTitle.length() !=3D 0 &&=
!isDeclaredContainer) {
=
// first, let's check to see if the declared field has already=
a field definition in the
// FieldsDefinitionsRegistry (which means also in the jahia_fi=
elds_def table)
@@ -598,7 +598,7 @@
// check if a container has already been declared with the sam=
e name
if ((!checkDeclared(containerName)) &&
// checks if container name and title are not empty
- (!containerName.equals("")) && (!containerTitle.equals=
("")) &&
+ (containerName.length() !=3D 0) && (containerTitle.len=
gth() !=3D 0) &&
// checks if a field has not the same name
(!jData.fields().checkDeclared(containerName)) &&
(!this.checkDeclaredField(containerName))) {
@@ -801,7 +801,7 @@
/** todo ensure that the data provided by the user has no special =
chars in it */
=
// check if a container has already been declared with the same na=
me
- if (checkDeclared(containerName) && !containerName.equals("")) {
+ if (checkDeclared(containerName) && containerName.length() !=3D 0)=
{
// third, let's check to see if the declared container has alr=
eady a container definition in the
// ContainersDefinitionsRegistry
JahiaContainerDefinition aDef =3D JahiaContainerDefinitionsReg=
istry
@@ -880,7 +880,7 @@
" with " + Integer.toString(containerFields.size()) +
" fields");
// checks if container name and title are not empty
- if ((!containerName.equals("")) && (!containerTitle.equals("")) &&
+ if ((containerName.length() !=3D 0) && (containerTitle.length() !=
=3D 0) &&
// checks if a field has not the same name
(!jData.fields().checkDeclared(containerName)) &&
(!this.checkDeclaredField(containerName))) {
_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list