directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1512873 - /directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/handlers/MetaAttributeHandler.java
Date Sun, 11 Aug 2013 06:00:34 GMT
Author: kayyagari
Date: Sun Aug 11 06:00:34 2013
New Revision: 1512873

URL: http://svn.apache.org/r1512873
Log:
do not use path segments while building the location URL

Modified:
    directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/handlers/MetaAttributeHandler.java

Modified: directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/handlers/MetaAttributeHandler.java
URL: http://svn.apache.org/viewvc/directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/handlers/MetaAttributeHandler.java?rev=1512873&r1=1512872&r2=1512873&view=diff
==============================================================================
--- directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/handlers/MetaAttributeHandler.java
(original)
+++ directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/handlers/MetaAttributeHandler.java
Sun Aug 11 06:00:34 2013
@@ -88,14 +88,10 @@ public class MetaAttributeHandler implem
             User user = ctx.getUser();
             
             SimpleAttribute location = new SimpleAttribute( "location" );
-            String locationVal = ctx.getUriInfo().getAbsolutePath().toString();
-            List<PathSegment> pathSegLst = ctx.getUriInfo().getPathSegments();
-            if( !pathSegLst.isEmpty() )
-            {
-                locationVal = locationVal.replace( pathSegLst.get( pathSegLst.size() -1 
).getPath(), "" );
-            }
+            String locationVal = ctx.getUriInfo().getBaseUri().toString();
+            locationVal = locationVal + "Users/" + user.getId();
             
-            location.setValue( locationVal + user.getId() );
+            location.setValue( locationVal );
             atList.add( location );
             
             ComplexAttribute ct = new ComplexAttribute( bt.getName(), atList );



Mime
View raw message