sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1733322 - /sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NameIterator.java
Date Wed, 02 Mar 2016 16:13:30 GMT
Author: desruisseaux
Date: Wed Mar  2 16:13:29 2016
New Revision: 1733322

URL: http://svn.apache.org/viewvc?rev=1733322&view=rev
Log:
Do not allow usage of ":" in "gml:id" attribute values.

Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NameIterator.java

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NameIterator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NameIterator.java?rev=1733322&r1=1733321&r2=1733322&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NameIterator.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/NameIterator.java
[UTF-8] Wed Mar  2 16:13:29 2016
@@ -156,9 +156,9 @@ final class NameIterator implements Iter
              */
             if (identifiers != null) {
                 for (final Identifier identifier : identifiers) {
-                    if (appendUnicodeIdentifier(id, '-', identifier.getCodeSpace(), ":",
true) |    // Really |, not ||
-                        appendUnicodeIdentifier(id, '-', NameMeaning.toObjectType(object.getClass()),
":", false) |
-                        appendUnicodeIdentifier(id, '-', identifier.getCode(), ":", true))
+                    if (appendUnicodeIdentifier(id, '-', identifier.getCodeSpace(), "", true)
|    // Really |, not ||
+                        appendUnicodeIdentifier(id, '-', NameMeaning.toObjectType(object.getClass()),
"", false) |
+                        appendUnicodeIdentifier(id, '-', identifier.getCode(), "", true))
                     {
                         /*
                          * Check for ID uniqueness. If the ID is rejected, then we just need
to clear
@@ -176,10 +176,10 @@ final class NameIterator implements Iter
              * In last ressort, use the name or an alias. The name will be used without codespace
since
              * names are often verbose. If that name is also used, append a number until
we find a free ID.
              */
-            if (isUnnamed(name) || !appendUnicodeIdentifier(id, '-', name.getCode(), ":",
false)) {
+            if (isUnnamed(name) || !appendUnicodeIdentifier(id, '-', name.getCode(), "",
false)) {
                 if (alias != null) {
                     for (final GenericName a : alias) {
-                        if (appendUnicodeIdentifier(id, '-', a.toString(), ":", false)) {
+                        if (appendUnicodeIdentifier(id, '-', a.toString(), "", false)) {
                             break;
                         }
                     }



Mime
View raw message