Author: rwesten
Date: Wed Apr 25 07:52:18 2012
New Revision: 1330142
URL: http://svn.apache.org/viewvc?rev=1330142&view=rev
Log:
fixes the failed integration tests of build #870: NamespaceEnum.getFullName now
correctly ignores empty strings and does no longer substitute those with the
default namespace (related to STANBOL-589)
Modified:
incubator/stanbol/trunk/entityhub/generic/servicesapi/src/main/java/org/apache/stanbol/entityhub/servicesapi/defaults/NamespaceEnum.java
Modified:
incubator/stanbol/trunk/entityhub/generic/servicesapi/src/main/java/org/apache/stanbol/entityhub/servicesapi/defaults/NamespaceEnum.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/trunk/entityhub/generic/servicesapi/src/main/java/org/apache/stanbol/entityhub/servicesapi/defaults/NamespaceEnum.java?rev=1330142&r1=1330141&r2=1330142&view=diff
==============================================================================
---
incubator/stanbol/trunk/entityhub/generic/servicesapi/src/main/java/org/apache/stanbol/entityhub/servicesapi/defaults/NamespaceEnum.java
(original)
+++
incubator/stanbol/trunk/entityhub/generic/servicesapi/src/main/java/org/apache/stanbol/entityhub/servicesapi/defaults/NamespaceEnum.java
Wed Apr 25 07:52:18 2012
@@ -298,11 +298,12 @@ public enum NamespaceEnum {
* the parsed URI is returned unchanged
* @param shortUri the short URI
* @return the full URI if the parsed shortUri uses a prefix defined by
this
- * Enumeration. Otherwise the parsed value.
+ * Enumeration. Otherwise (including <code>null</code>) the parsed value.
*/
public static String getFullName(String shortUri){
- if(shortUri == null) {
- return null;
+ //ignore null and empty strings
+ if(shortUri == null || shortUri.isEmpty()) {
+ return shortUri;
}
int index = shortUri.indexOf(':');
if(index>0){