jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r915333 [3/3] - in /jackrabbit/trunk/jackrabbit-webdav/src: main/java/org/apache/jackrabbit/webdav/ main/java/org/apache/jackrabbit/webdav/bind/ main/java/org/apache/jackrabbit/webdav/client/methods/ main/java/org/apache/jackrabbit/webdav/h...
Date Tue, 23 Feb 2010 13:27:13 GMT
Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/CurrentUserPrivilegeSetProperty.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/CurrentUserPrivilegeSetProperty.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/CurrentUserPrivilegeSetProperty.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/CurrentUserPrivilegeSetProperty.java Tue Feb 23 13:27:10 2010
@@ -25,15 +25,14 @@
 
 import java.util.Collection;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Set;
 
 /**
  * <code>CurrentUserPrivilegeSetProperty</code>...
  */
-public class CurrentUserPrivilegeSetProperty extends AbstractDavProperty {
+public class CurrentUserPrivilegeSetProperty extends AbstractDavProperty<Collection<Privilege>> {
 
-    private final Set privileges;
+    private final Set<Privilege> privileges;
 
     /**
      * Create a new instance of this property.
@@ -43,10 +42,10 @@
     public CurrentUserPrivilegeSetProperty(Privilege[] privileges) {
         super(SecurityConstants.CURRENT_USER_PRIVILEGE_SET, true);
 
-        this.privileges = new HashSet();
-        for (int i = 0; i < privileges.length; i++) {
-            if (privileges[i] != null) {
-                this.privileges.add(privileges[i]);
+        this.privileges = new HashSet<Privilege>();
+        for (Privilege privilege : privileges) {
+            if (privilege != null) {
+                this.privileges.add(privilege);
             }
         }
     }
@@ -58,12 +57,12 @@
      * @param xmlDavProperty
      * @throws DavException
      */
-    public CurrentUserPrivilegeSetProperty(DavProperty xmlDavProperty) throws DavException {
+    public CurrentUserPrivilegeSetProperty(DavProperty<?> xmlDavProperty) throws DavException {
         super(xmlDavProperty.getName(), true);
         if (!SecurityConstants.CURRENT_USER_PRIVILEGE_SET.equals(getName())) {
             throw new DavException(DavServletResponse.SC_BAD_REQUEST, "DAV:current-user-privilege-set expected.");
         }
-        privileges = new HashSet();
+        privileges = new HashSet<Privilege>();
 
         // parse property value
         Object value = xmlDavProperty.getValue();
@@ -71,11 +70,9 @@
             if (value instanceof Element) {
                 privileges.add(Privilege.getPrivilege((Element)value));
             } else if (value instanceof Collection) {
-                Iterator it = ((Collection)value).iterator();
-                while (it.hasNext()) {
-                    Object entry = it.next();
+                for (Object entry : ((Collection<?>) value)) {
                     if (entry instanceof Element) {
-                        privileges.add(Privilege.getPrivilege((Element)entry));
+                        privileges.add(Privilege.getPrivilege((Element) entry));
                     }
                 }
             }
@@ -87,7 +84,7 @@
      * @see DavProperty#getValue()
      * @see AbstractDavProperty#toXml(Document)
      */
-    public Object getValue() {
+    public Collection<Privilege> getValue() {
         return privileges;
     }
 }
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/Principal.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/Principal.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/Principal.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/Principal.java Tue Feb 23 13:27:10 2010
@@ -58,7 +58,7 @@
     private static final Principal UNAUTHENTICATED_PRINCIPAL = new Principal(TYPE_UNAUTHENTICATED);
     private static final Principal SELF_PRINCIPAL = new Principal(TYPE_SELF);
 
-    private static final Map PROP_PRINCIPALS = new HashMap();
+    private static final Map<DavPropertyName, Principal> PROP_PRINCIPALS = new HashMap<DavPropertyName, Principal>();
 
     private final int type;
     private DavPropertyName propertyName;
@@ -148,7 +148,7 @@
         // there is a limited amount of properties, that can be used
         // for a Property-Principal
         if (PROP_PRINCIPALS.containsKey(propertyName)) {
-            return (Principal) PROP_PRINCIPALS.get(propertyName);
+            return PROP_PRINCIPALS.get(propertyName);
         } else {
             Principal p = new Principal(propertyName);
             PROP_PRINCIPALS.put(propertyName, p);
@@ -186,4 +186,4 @@
             throw new DavException(DavServletResponse.SC_BAD_REQUEST, "Invalid structure inside DAV:principal element.");
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/Privilege.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/Privilege.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/Privilege.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/Privilege.java Tue Feb 23 13:27:10 2010
@@ -37,7 +37,7 @@
     /**
      * Map for registered privileges
      */
-    private static final Map REGISTERED_PRIVILEGES = new HashMap();
+    private static final Map<String, Privilege> REGISTERED_PRIVILEGES = new HashMap<String, Privilege>();
 
     //-------------------------------------< Privileges defined by RFC 3744 >---
     /**
@@ -179,7 +179,7 @@
         }
         String key = "{" + namespace.getURI() + "}" + privilege;
         if (REGISTERED_PRIVILEGES.containsKey(key)) {
-            return (Privilege) REGISTERED_PRIVILEGES.get(key);
+            return REGISTERED_PRIVILEGES.get(key);
         } else {
             Privilege p = new Privilege(privilege, namespace);
             REGISTERED_PRIVILEGES.put(key, p);
@@ -201,4 +201,4 @@
         Element el = DomUtil.getFirstChildElement(privilege);
         return getPrivilege(el.getLocalName(), DomUtil.getNamespace(el));
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/SupportedPrivilege.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/SupportedPrivilege.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/SupportedPrivilege.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/SupportedPrivilege.java Tue Feb 23 13:27:10 2010
@@ -74,10 +74,10 @@
             }
         }
         if (supportedPrivileges != null) {
-            for (int i = 0; i < supportedPrivileges.length; i++) {
-                spElem.appendChild(supportedPrivileges[i].toXml(document));
+            for (SupportedPrivilege supportedPrivilege : supportedPrivileges) {
+                spElem.appendChild(supportedPrivilege.toXml(document));
             }
         }
         return spElem;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/SupportedPrivilegeSetProperty.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/SupportedPrivilegeSetProperty.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/SupportedPrivilegeSetProperty.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/SupportedPrivilegeSetProperty.java Tue Feb 23 13:27:10 2010
@@ -18,8 +18,9 @@
 
 import org.apache.jackrabbit.webdav.property.AbstractDavProperty;
 
-import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
+import java.util.Collections;
 
 /**
  * <code>SupportedPrivilegeSetProperty</code> defines the
@@ -37,7 +38,7 @@
  * @see SupportedPrivilege
  * @see Privilege
  */
-public class SupportedPrivilegeSetProperty extends AbstractDavProperty {
+public class SupportedPrivilegeSetProperty extends AbstractDavProperty<List<SupportedPrivilege>> {
 
     private final SupportedPrivilege[] supportedPrivileges;
 
@@ -54,7 +55,13 @@
     /**
      * @return List of {@link SupportedPrivilege}s.
      */
-    public Object getValue() {
-        return (supportedPrivileges == null) ? new ArrayList() : Arrays.asList(supportedPrivileges);
+    public List<SupportedPrivilege> getValue() {
+        List<SupportedPrivilege> l;
+        if (supportedPrivileges == null) {
+            l = Collections.emptyList();
+        } else {
+            l = Arrays.asList(supportedPrivileges);
+        }
+        return l;
     }
 }
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/AbstractSecurityReport.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/AbstractSecurityReport.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/AbstractSecurityReport.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/AbstractSecurityReport.java Tue Feb 23 13:27:10 2010
@@ -72,10 +72,10 @@
     public Element toXml(Document document) {
         MultiStatus ms = new MultiStatus();
         if (responses != null) {
-            for (int i = 0; i < responses.length; i++) {
-                ms.addResponse(responses[i]);
+            for (MultiStatusResponse response : responses) {
+                ms.addResponse(response);
             }
         }
         return ms.toXml(document);
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/AclPrincipalReport.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/AclPrincipalReport.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/AclPrincipalReport.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/AclPrincipalReport.java Tue Feb 23 13:27:10 2010
@@ -29,7 +29,6 @@
 import org.apache.jackrabbit.webdav.version.report.ReportType;
 
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -69,29 +68,29 @@
     /**
      * @see Report#init(DavResource, ReportInfo)
      */
+    @Override
     public void init(DavResource resource, ReportInfo info) throws DavException {
         super.init(resource, info);
         // build the DAV:responses objects.
-        DavProperty acl = resource.getProperty(SecurityConstants.ACL);
+        DavProperty<?> acl = resource.getProperty(SecurityConstants.ACL);
         if (!(acl instanceof AclProperty)) {
             throw new DavException(DavServletResponse.SC_INTERNAL_SERVER_ERROR, "DAV:acl property expected.");
         }
 
         DavResourceLocator loc = resource.getLocator();
-        Map principalMap = new HashMap();
-        Iterator aceIt = ((List)((AclProperty)acl).getValue()).iterator();
-        while (aceIt.hasNext()) {
-            AclProperty.Ace ace = (AclProperty.Ace) aceIt.next();
+        Map<String, MultiStatusResponse> respMap = new HashMap<String, MultiStatusResponse>();
+        List<AclProperty.Ace> list = (List<AclProperty.Ace>) ((AclProperty)acl).getValue();
+        for (AclProperty.Ace ace : list) {
             String href = ace.getPrincipal().getHref();
-            if (href == null && principalMap.containsKey(href)) {
+            if (href == null && respMap.containsKey(href)) {
                 // ignore non-href principals and principals that have been listed before
                 continue;
             }
             // href-principal that has not been found before
             DavResourceLocator princLocator = loc.getFactory().createResourceLocator(loc.getPrefix(), href);
             DavResource principalResource = resource.getFactory().createResource(princLocator, resource.getSession());
-            principalMap.put(href, new MultiStatusResponse(principalResource, info.getPropertyNameSet()));
+            respMap.put(href, new MultiStatusResponse(principalResource, info.getPropertyNameSet()));
         }
-        this.responses = (MultiStatusResponse[]) principalMap.values().toArray(new MultiStatusResponse[principalMap.size()]);
+        this.responses = respMap.values().toArray(new MultiStatusResponse[respMap.size()]);
     }
 }
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/PrincipalMatchReport.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/PrincipalMatchReport.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/PrincipalMatchReport.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/PrincipalMatchReport.java Tue Feb 23 13:27:10 2010
@@ -76,6 +76,7 @@
     /**
      * @see Report#init(DavResource, ReportInfo)
      */
+    @Override
     public void init(DavResource resource, ReportInfo info) throws DavException {
         super.init(resource, info);
         if (info.containsContentElement(XML_PRINCIPAL_PROPERTY, SecurityConstants.NAMESPACE)) {
@@ -111,4 +112,4 @@
     public void setResponses(MultiStatusResponse[] responses) {
        this.responses = responses;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/PrincipalSearchReport.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/PrincipalSearchReport.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/PrincipalSearchReport.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/PrincipalSearchReport.java Tue Feb 23 13:27:10 2010
@@ -32,7 +32,6 @@
 import org.slf4j.LoggerFactory;
 import org.w3c.dom.Element;
 
-import java.util.Iterator;
 import java.util.List;
 
 /**
@@ -94,23 +93,23 @@
     /**
      * @see Report#init(DavResource, ReportInfo)
      */
+    @Override
     public void init(DavResource resource, ReportInfo info) throws DavException {
         super.init(resource, info);
-        // make sure the request body contains all mandator elements
+        // make sure the request body contains all mandatory elements
         if (!info.containsContentElement(XML_PROPERTY_SEARCH, SecurityConstants.NAMESPACE)) {
             throw new DavException(DavServletResponse.SC_BAD_REQUEST, "Request body must contain at least a single DAV:property-search element.");
         }
-        List psElements = info.getContentElements(XML_PROPERTY_SEARCH, SecurityConstants.NAMESPACE);
+        List<Element> psElements = info.getContentElements(XML_PROPERTY_SEARCH, SecurityConstants.NAMESPACE);
         searchArguments = new SearchArgument[psElements.size()];
-        Iterator it = psElements.iterator();
         int i = 0;
-        while (it.hasNext()) {
-            searchArguments[i++] = new SearchArgument((Element)it.next());
+        for (Element psElement : psElements) {
+            searchArguments[i++] = new SearchArgument(psElement);
         }
 
         if (info.containsContentElement(XML_APPLY_TO_PRINCIPAL_COLLECTION_SET, SecurityConstants.NAMESPACE)) {
             HrefProperty p = new HrefProperty(resource.getProperty(SecurityConstants.PRINCIPAL_COLLECTION_SET));
-            searchRoots = (String[]) p.getHrefs().toArray(new String[0]);
+            searchRoots = p.getHrefs().toArray(new String[0]);
         } else {
             searchRoots = new String[] {resource.getHref()};
         }
@@ -181,4 +180,4 @@
             return searchString;
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/SearchablePropertyReport.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/SearchablePropertyReport.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/SearchablePropertyReport.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/security/report/SearchablePropertyReport.java Tue Feb 23 13:27:10 2010
@@ -33,7 +33,6 @@
 import org.w3c.dom.Element;
 
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Set;
 
 /**
@@ -78,7 +77,7 @@
     /**
      * Set collecting the DAV:principal-search-property entries.
      */
-    public final Set searchPropertySet = new HashSet();
+    public final Set<PrincipalSearchProperty> searchPropertySet = new HashSet<PrincipalSearchProperty>();
 
     /**
      * @see Report#getType()
@@ -116,9 +115,7 @@
      */
     public Element toXml(Document document) {
         Element rootElem = DomUtil.createElement(document, XML_PRINCIPAL_SEARCH_PROPERTY_SET, SecurityConstants.NAMESPACE);
-        Iterator it = searchPropertySet.iterator();
-        while (it.hasNext()) {
-            PrincipalSearchProperty psp = (PrincipalSearchProperty) it.next();
+        for (PrincipalSearchProperty psp : searchPropertySet) {
             rootElem.appendChild(psp.toXml(document));
         }
         return rootElem;
@@ -184,6 +181,8 @@
             return psElem;
         }
 
+        //---------------------------------------------------------< Object >---
+        @Override
         public boolean equals(Object obj) {
             if (obj == this) {
                 return true;
@@ -196,8 +195,9 @@
             return false;
         }
 
+        @Override
         public int hashCode() {
             return hashCode;
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/server/AbstractWebdavServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/server/AbstractWebdavServlet.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/server/AbstractWebdavServlet.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/server/AbstractWebdavServlet.java Tue Feb 23 13:27:10 2010
@@ -51,6 +51,7 @@
 import org.apache.jackrabbit.webdav.property.DavProperty;
 import org.apache.jackrabbit.webdav.property.DavPropertyName;
 import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
+import org.apache.jackrabbit.webdav.property.PropEntry;
 import org.apache.jackrabbit.webdav.search.SearchConstants;
 import org.apache.jackrabbit.webdav.search.SearchInfo;
 import org.apache.jackrabbit.webdav.search.SearchResource;
@@ -173,6 +174,7 @@
      * @throws ServletException
      * @throws IOException
      */
+    @Override
     protected void service(HttpServletRequest request, HttpServletResponse response)
             throws ServletException, IOException {
 
@@ -345,8 +347,8 @@
         response.addHeader("MS-Author-Via", DavConstants.HEADER_DAV);
         if (resource instanceof SearchResource) {
             String[] langs = ((SearchResource) resource).getQueryGrammerSet().getQueryLanguages();
-            for (int i = 0; i < langs.length; i++) {
-                response.addHeader(SearchConstants.HEADER_DASL, "<" + langs[i] + ">");
+            for (String lang : langs) {
+                response.addHeader(SearchConstants.HEADER_DASL, "<" + lang + ">");
             }
         }
         // with DeltaV the OPTIONS request may contain a Xml body.
@@ -417,7 +419,7 @@
             }
         }
 
-        // spool resource properties and ev. resource content.
+        // spool resource properties and eventually resource content.
         OutputStream out = (sendContent) ? response.getOutputStream() : null;
         resource.spool(getOutputContext(response, out));
         response.flushBuffer();
@@ -460,7 +462,7 @@
                                DavResource resource)
             throws IOException, DavException {
 
-        List changeList = request.getPropPatchChangeList();
+        List<? extends PropEntry> changeList = request.getPropPatchChangeList();
         if (changeList.isEmpty()) {
             response.sendError(DavServletResponse.SC_BAD_REQUEST);
             return;
@@ -760,22 +762,22 @@
         if (lockInfo.isRefreshLock()) {
             // refresh any matching existing locks
             ActiveLock[] activeLocks = resource.getLocks();
-            List lList = new ArrayList();
-            for (int i = 0; i < activeLocks.length; i++) {
+            List<ActiveLock> lList = new ArrayList<ActiveLock>();
+            for (ActiveLock activeLock : activeLocks) {
                 // adjust lockinfo with type/scope retrieved from the lock.
-                lockInfo.setType(activeLocks[i].getType());
-                lockInfo.setScope(activeLocks[i].getScope());
+                lockInfo.setType(activeLock.getType());
+                lockInfo.setScope(activeLock.getScope());
 
-                DavProperty etagProp = resource.getProperty(DavPropertyName.GETETAG);
+                DavProperty<?> etagProp = resource.getProperty(DavPropertyName.GETETAG);
                 String etag = etagProp != null ? String.valueOf(etagProp.getValue()) : "";
-                if (request.matchesIfHeader(resource.getHref(), activeLocks[i].getToken(), etag)) {
-                    lList.add(resource.refreshLock(lockInfo, activeLocks[i].getToken()));
+                if (request.matchesIfHeader(resource.getHref(), activeLock.getToken(), etag)) {
+                    lList.add(resource.refreshLock(lockInfo, activeLock.getToken()));
                 }
             }
             if (lList.isEmpty()) {
                 throw new DavException(DavServletResponse.SC_PRECONDITION_FAILED);
             }
-            ActiveLock[] refreshedLocks = (ActiveLock[]) lList.toArray(new ActiveLock[lList.size()]);
+            ActiveLock[] refreshedLocks = lList.toArray(new ActiveLock[lList.size()]);
             response.sendRefreshLockResponse(refreshedLocks);
         } else {
             // create a new lock
@@ -1134,7 +1136,7 @@
             return;
         }
         // TODO: improve. see http://issues.apache.org/jira/browse/JCR-394
-        if (parentResource.getComplianceClass().indexOf(DavCompliance.ACTIVITY) < 0) {
+        if (!parentResource.getComplianceClass().contains(DavCompliance.ACTIVITY)) {
             response.sendError(DavServletResponse.SC_METHOD_NOT_ALLOWED);
             return;
         }

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/transaction/TxActiveLock.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/transaction/TxActiveLock.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/transaction/TxActiveLock.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/transaction/TxActiveLock.java Tue Feb 23 13:27:10 2010
@@ -66,6 +66,7 @@
      *
      * @return true
      */
+    @Override
     public boolean isDeep() {
         return true;
     }
@@ -75,6 +76,7 @@
      *
      * @return {@link #TRANSACTION}
      */
+    @Override
     public Type getType() {
         return TRANSACTION;
     }
@@ -84,7 +86,8 @@
      *
      * @return {@link #LOCAL} or {@link #GLOBAL}
      */
+    @Override
     public Scope getScope() {
         return scope;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/LabelSetProperty.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/LabelSetProperty.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/LabelSetProperty.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/LabelSetProperty.java Tue Feb 23 13:27:10 2010
@@ -26,7 +26,7 @@
 /**
  * <code>LabelSetProperty</code>...
  */
-public class LabelSetProperty extends AbstractDavProperty {
+public class LabelSetProperty extends AbstractDavProperty<String[]> {
 
     private static Logger log = LoggerFactory.getLogger(LabelSetProperty.class);
 
@@ -43,7 +43,7 @@
     }
 
 
-    public Object getValue() {
+    public String[] getValue() {
         return value;
     }
 
@@ -51,12 +51,13 @@
      * @see org.apache.jackrabbit.webdav.xml.XmlSerializable#toXml(Document)
      * @param document
      */
+    @Override
     public Element toXml(Document document) {
         Element elem = getName().toXml(document);
-        for (int i = 0; i < value.length; i++) {
-            DomUtil.addChildElement(elem, DeltaVConstants.XML_LABEL_NAME, DeltaVConstants.NAMESPACE, value[i]);
+        for (String str : value) {
+            DomUtil.addChildElement(elem, DeltaVConstants.XML_LABEL_NAME, DeltaVConstants.NAMESPACE, str);
         }
         return elem;
     }
 
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/MergeInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/MergeInfo.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/MergeInfo.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/MergeInfo.java Tue Feb 23 13:27:10 2010
@@ -85,7 +85,7 @@
      * @return href present in the DAV:source child element or <code>null</code>.
      */
     public String[] getSourceHrefs() {
-        List sourceHrefs = new ArrayList();
+        List<String> sourceHrefs = new ArrayList<String>();
         Element srcElem = DomUtil.getChildElement(mergeElement, DavConstants.XML_SOURCE, DavConstants.NAMESPACE);
         if (srcElem != null) {
             ElementIterator it = DomUtil.getChildren(srcElem, DavConstants.XML_HREF, DavConstants.NAMESPACE);
@@ -96,7 +96,7 @@
                 }
             }
         }
-        return (String[])sourceHrefs.toArray(new String[sourceHrefs.size()]);
+        return sourceHrefs.toArray(new String[sourceHrefs.size()]);
     }
 
     /**
@@ -168,8 +168,8 @@
     public static Element createMergeElement(String[] mergeSource, boolean isNoAutoMerge, boolean isNoCheckout, Document factory) {
         Element mergeElem = DomUtil.createElement(factory, XML_MERGE, NAMESPACE);
         Element source = DomUtil.addChildElement(mergeElem, DavConstants.XML_SOURCE, DavConstants.NAMESPACE);
-        for (int i = 0; i < mergeSource.length; i++) {
-            source.appendChild(DomUtil.hrefToXml(mergeSource[i], factory));
+        for (String ms : mergeSource) {
+            source.appendChild(DomUtil.hrefToXml(ms, factory));
         }
         if (isNoAutoMerge) {
             DomUtil.addChildElement(mergeElem, XML_N0_AUTO_MERGE, NAMESPACE);
@@ -179,4 +179,4 @@
         }
         return mergeElem;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/OptionsInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/OptionsInfo.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/OptionsInfo.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/OptionsInfo.java Tue Feb 23 13:27:10 2010
@@ -28,8 +28,8 @@
 import org.w3c.dom.Element;
 
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Set;
+import java.util.Arrays;
 
 /**
  * <code>OptionsInfo</code> represents the Xml request body, that may be present
@@ -55,7 +55,7 @@
 
     private static Logger log = LoggerFactory.getLogger(OptionsInfo.class);
 
-    private final Set entriesLocalNames = new HashSet();
+    private final Set<String> entriesLocalNames = new HashSet<String>();
 
     /**
      * Create a new OptionsInfo with the specified entries. Each entry will
@@ -66,9 +66,7 @@
      */
     public OptionsInfo(String[] entriesLocalNames) {
        if (entriesLocalNames != null) {
-           for (int i = 0; i < entriesLocalNames.length; i++) {
-               this.entriesLocalNames.add(entriesLocalNames[i]);
-           }
+           this.entriesLocalNames.addAll(Arrays.asList(entriesLocalNames));
        }
     }
 
@@ -97,9 +95,7 @@
      */
     public Element toXml(Document document) {
         Element optionsElem = DomUtil.createElement(document, DeltaVConstants.XML_OPTIONS, DeltaVConstants.NAMESPACE);
-        Iterator it = entriesLocalNames.iterator();
-        while (it.hasNext()) {
-            String localName = (String)it.next();
+        for (String localName : entriesLocalNames) {
             DomUtil.addChildElement(optionsElem, localName, DeltaVConstants.NAMESPACE);
         }
         return optionsElem;
@@ -127,4 +123,4 @@
         }
         return oInfo;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/OptionsResponse.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/OptionsResponse.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/OptionsResponse.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/OptionsResponse.java Tue Feb 23 13:27:10 2010
@@ -28,7 +28,6 @@
 
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -55,7 +54,7 @@
 
     private static Logger log = LoggerFactory.getLogger(OptionsResponse.class);
 
-    private final Map entries = new HashMap();
+    private final Map<String, Entry> entries = new HashMap<String, Entry>();
 
     /**
      * Add a new entry to this <code>OptionsResponse</code> and make each
@@ -80,7 +79,7 @@
     public String[] getHrefs(String localName, Namespace namespace) {
         String key = DomUtil.getExpandedName(localName, namespace);
         if (entries.containsKey(key)) {
-            return ((Entry)entries.get(key)).hrefs;
+            return entries.get(key).hrefs;
         } else {
             return new String[0];
         }
@@ -95,12 +94,10 @@
      */
     public Element toXml(Document document) {
         Element optionsResponse = DomUtil.createElement(document, XML_OPTIONS_RESPONSE, NAMESPACE);
-        Iterator it = entries.values().iterator();
-        while (it.hasNext()) {
-            Entry entry = (Entry)it.next();
+        for (Entry entry : entries.values()) {
             Element elem = DomUtil.addChildElement(optionsResponse, entry.localName, entry.namespace);
-            for (int i = 0; i < entry.hrefs.length; i++) {
-                elem.appendChild(DomUtil.hrefToXml(entry.hrefs[i], document));
+            for (String href : entry.hrefs) {
+                elem.appendChild(DomUtil.hrefToXml(href, document));
             }
         }
         return optionsResponse;
@@ -122,12 +119,12 @@
         ElementIterator it = DomUtil.getChildren(orElem);
         while (it.hasNext()) {
             Element el = it.nextElement();
-            List hrefs = new ArrayList();
+            List<String> hrefs = new ArrayList<String>();
             ElementIterator hrefIt = DomUtil.getChildren(el, DavConstants.XML_HREF, DavConstants.NAMESPACE);
             while (hrefIt.hasNext()) {
                 hrefs.add(DomUtil.getTextTrim(hrefIt.nextElement()));
             }
-            oResponse.addEntry(el.getLocalName(), DomUtil.getNamespace(el), (String[])hrefs.toArray(new String[hrefs.size()]));
+            oResponse.addEntry(el.getLocalName(), DomUtil.getNamespace(el), hrefs.toArray(new String[hrefs.size()]));
         }
         return oResponse;
     }
@@ -144,4 +141,4 @@
             this.hrefs = hrefs;
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/SupportedMethodSetProperty.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/SupportedMethodSetProperty.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/SupportedMethodSetProperty.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/SupportedMethodSetProperty.java Tue Feb 23 13:27:10 2010
@@ -26,7 +26,7 @@
 /**
  * The <code>SupportedMethodSetProperty</code>
  */
-public class SupportedMethodSetProperty extends AbstractDavProperty implements DeltaVConstants {
+public class SupportedMethodSetProperty extends AbstractDavProperty<String[]> implements DeltaVConstants {
 
     private static Logger log = LoggerFactory.getLogger(SupportedMethodSetProperty.class);
 
@@ -42,7 +42,7 @@
         this.methods = methods;
     }
 
-    public Object getValue() {
+    public String[] getValue() {
         return methods;
     }
 
@@ -50,13 +50,14 @@
      * @see org.apache.jackrabbit.webdav.xml.XmlSerializable#toXml(Document)
      * @param document
      */
+    @Override
     public Element toXml(Document document) {
         Element elem = getName().toXml(document);
-        for (int i = 0; i < methods.length; i++) {
+        for (String method : methods) {
             Element methodElem = DomUtil.addChildElement(elem, XML_SUPPORTED_METHOD, DeltaVConstants.NAMESPACE);
-            DomUtil.setAttribute(methodElem, "name", DeltaVConstants.NAMESPACE, methods[i]);
+            DomUtil.setAttribute(methodElem, "name", DeltaVConstants.NAMESPACE, method);
         }
         return elem;
     }
 
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/UpdateInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/UpdateInfo.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/UpdateInfo.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/UpdateInfo.java Tue Feb 23 13:27:10 2010
@@ -102,11 +102,11 @@
         if (DomUtil.hasChildElement(updateElement, XML_VERSION, NAMESPACE)) {
             Element vEl = DomUtil.getChildElement(updateElement, XML_VERSION, NAMESPACE);
             ElementIterator hrefs = DomUtil.getChildren(vEl, DavConstants.XML_HREF, DavConstants.NAMESPACE);
-            List hrefList = new ArrayList();
+            List<String> hrefList = new ArrayList<String>();
             while (hrefs.hasNext()) {
                 hrefList.add(DomUtil.getText(hrefs.nextElement()));
             }
-            source = (String[])hrefList.toArray(new String[hrefList.size()]);
+            source = hrefList.toArray(new String[hrefList.size()]);
             type = UPDATE_BY_VERSION;
             done = true;
         }
@@ -223,8 +223,8 @@
         switch (updateType) {
             case UPDATE_BY_VERSION:
                 Element vE = DomUtil.addChildElement(elem, XML_VERSION, NAMESPACE);
-                for (int i = 0; i < updateSource.length; i++) {
-                    vE.appendChild(DomUtil.hrefToXml(updateSource[i], factory));
+                for (String source : updateSource) {
+                    vE.appendChild(DomUtil.hrefToXml(source, factory));
                 }
                 break;
             case UPDATE_BY_LABEL:
@@ -240,4 +240,4 @@
         }
         return elem;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/CompareBaselineReport.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/CompareBaselineReport.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/CompareBaselineReport.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/CompareBaselineReport.java Tue Feb 23 13:27:10 2010
@@ -34,7 +34,6 @@
 import org.w3c.dom.Document;
 
 import java.util.List;
-import java.util.Iterator;
 import java.util.ArrayList;
 
 /**
@@ -87,7 +86,7 @@
             throw new DavException(DavServletResponse.SC_BAD_REQUEST, "DAV:compare-baseline element expected.");
         }
 
-        // make sure the report is applied to a vh-resource
+        // make sure the report is applied to a version history resource
         if (resource != null && (resource instanceof BaselineResource)) {
             this.requestBaseline = (BaselineResource) resource;
         } else {
@@ -107,7 +106,7 @@
             throw new DavException(DavServletResponse.SC_BAD_REQUEST, "DAV:latest-activity-version report: The DAV:href in the request body MUST identify an activity.");
         }
 
-        // TODO: ev. add check for 'same-baseline-history' (RFC: "A server MAY require that the baselines being compared be from the same baseline history.")
+        // TODO: eventually add check for 'same-baseline-history' (RFC: "A server MAY require that the baselines being compared be from the same baseline history.")
     }
 
     /**
@@ -117,15 +116,13 @@
         Element el = DomUtil.createElement(document, XML_COMPARE_BASELINE_REPORT, DeltaVConstants.NAMESPACE);
         try {
             // TODO: check if correct
-            List requestVs = new ArrayList();
+            List<VersionResource> requestVs = new ArrayList<VersionResource>();
             getVersions(requestBaseline.getBaselineCollection(), requestVs);
 
-            List compareVs = new ArrayList();
+            List<VersionResource> compareVs = new ArrayList<VersionResource>();
             getVersions(compareBaseline.getBaselineCollection(), compareVs);
 
-            VersionResource[] rArr = (VersionResource[]) requestVs.toArray(new VersionResource[requestVs.size()]);
-            for (int i = 0; i < rArr.length; i++) {
-                VersionResource requestV = rArr[i];
+            for (VersionResource requestV : requestVs) {
                 if (!compareVs.remove(requestV)) {
                     // check if another version of the same vh is present (change)
                     VersionResource changedV = findChangedVersion(requestV, compareVs);
@@ -145,9 +142,7 @@
 
             // all remaining versions from the 'compare-baseline' can be considered
             // to be added-versions.
-            Iterator it = compareVs.iterator();
-            while (it.hasNext()) {
-                VersionResource addedV = (VersionResource) it.next();
+            for (VersionResource addedV : compareVs) {
                 Element cv = DomUtil.addChildElement(el, XML_ADDED_VERSION, DeltaVConstants.NAMESPACE);
                 cv.appendChild(DomUtil.hrefToXml(addedV.getHref(), document));
             }
@@ -157,18 +152,18 @@
         return el;
     }
 
-    private void getVersions(DavResource collection, List vList) throws DavException {
+    private void getVersions(DavResource collection, List<VersionResource> vList) throws DavException {
         DavResourceIterator it = collection.getMembers();
         while (it.hasNext()) {
             DavResource member = it.nextResource();
             if (member instanceof VersionControlledResource) {
-                String href = (String) new HrefProperty(member.getProperty(VersionControlledResource.CHECKED_IN)).getHrefs().get(0);
+                String href = new HrefProperty(member.getProperty(VersionControlledResource.CHECKED_IN)).getHrefs().get(0);
                 DavResourceLocator locator = member.getLocator();
                 DavResourceLocator vLocator = locator.getFactory().createResourceLocator(locator.getPrefix(), href);
 
                 DavResource v = member.getFactory().createResource(vLocator, member.getSession());
                 if (v instanceof VersionResource) {
-                    vList.add(v);
+                    vList.add((VersionResource) v);
                 } else {
                     log.error("Internal error: DAV:checked-in property must point to a VersionResource.");
                 }
@@ -179,15 +174,15 @@
         }
     }
 
-    private VersionResource findChangedVersion(VersionResource requestV, List compareVs) throws DavException {
+    private VersionResource findChangedVersion(VersionResource requestV, List<VersionResource> compareVs) throws DavException {
         VersionResource[] vs = requestV.getVersionHistory().getVersions();
-        for (int i = 0; i < vs.length; i++) {
-            if (compareVs.remove(vs[i])) {
+        for (VersionResource v : vs) {
+            if (compareVs.remove(v)) {
                 // another version of the same versionhistory is present among
                 // the compare-baseline versions.
-                return vs[i];
+                return v;
             }
         }
         return null;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ExpandPropertyReport.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ExpandPropertyReport.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ExpandPropertyReport.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ExpandPropertyReport.java Tue Feb 23 13:27:10 2010
@@ -67,7 +67,7 @@
 
     private DavResource resource;
     private ReportInfo info;
-    private Iterator propertyElements;
+    private Iterator<Element> propertyElements;
 
     /**
      * Returns {@link ReportType#EXPAND_PROPERTY}.
@@ -189,10 +189,10 @@
      * @return <code>MultiStatusResponse</code> for the given resource.
      * @see ExpandProperty
      */
-    private MultiStatusResponse getResponse(DavResource res, Iterator propertyElements) {
+    private MultiStatusResponse getResponse(DavResource res, Iterator<Element> propertyElements) {
         MultiStatusResponse resp = new MultiStatusResponse(res.getHref(), null);
         while (propertyElements.hasNext()) {
-            Element propertyElem = (Element)propertyElements.next();
+            Element propertyElem = propertyElements.next();
             // retrieve the localName present in the "name" attribute
             String nameAttr = propertyElem.getAttribute(ATTR_NAME);
             if (nameAttr == null || "".equals(nameAttr)) {
@@ -205,7 +205,7 @@
             Namespace namespace = (namespaceAttr != null) ? Namespace.getNamespace(namespaceAttr) : NAMESPACE;
 
             DavPropertyName propName = DavPropertyName.create(nameAttr, namespace);
-            DavProperty p = res.getProperty(propName);
+            DavProperty<?> p = res.getProperty(propName);
             if (p != null) {
                 if (p instanceof HrefProperty && res instanceof DeltaVResource) {
                     ElementIterator it = DomUtil.getChildren(propertyElem, XML_PROPERTY, NAMESPACE);
@@ -230,9 +230,9 @@
      * resource referenced to by the given DAV:href elements. The responses may
      * themselves have properties, which are defined by the separate list.
      */
-    private class ExpandProperty extends AbstractDavProperty {
+    private class ExpandProperty extends AbstractDavProperty<List<MultiStatusResponse>> {
 
-        private List valueList = new ArrayList();
+        private List<MultiStatusResponse> valueList = new ArrayList<MultiStatusResponse>();
 
         /**
          * Create a new <code>ExpandProperty</code>.
@@ -244,8 +244,8 @@
             super(hrefProperty.getName(), hrefProperty.isInvisibleInAllprop());
             try {
                 DavResource[] refResource = deltaVResource.getReferenceResources(hrefProperty.getName());
-                for (int i = 0; i < refResource.length; i++) {
-                    MultiStatusResponse resp = getResponse(refResource[i], elementIter);
+                for (DavResource res : refResource) {
+                    MultiStatusResponse resp = getResponse(res, elementIter);
                     valueList.add(resp);
                 }
             } catch (DavException e) {
@@ -259,8 +259,8 @@
          *
          * @return
          */
-        public Object getValue() {
+        public List<MultiStatusResponse> getValue() {
             return valueList;
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/LatestActivityVersionReport.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/LatestActivityVersionReport.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/LatestActivityVersionReport.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/LatestActivityVersionReport.java Tue Feb 23 13:27:10 2010
@@ -124,21 +124,19 @@
     private String getLatestVersionHref() {
         String latestVersionHref = ""; // not found (TODO: check if this valid according to the RFC)
         try {
-            List versionHrefs = new HrefProperty(activity.getProperty(ActivityResource.ACTIVITY_VERSION_SET)).getHrefs();
-            VersionResource[] versions = vhResource.getVersions();
-
-            for (int i = 0; i < versions.length; i++) {
-                VersionResource vr = versions[i];
+            List<String> versionHrefs = new HrefProperty(activity.getProperty(ActivityResource.ACTIVITY_VERSION_SET)).getHrefs();
+            
+            for (VersionResource vr : vhResource.getVersions()) {
                 String href = vr.getHref();
                 if (versionHrefs.contains(href)) {
                     if ("".equals(latestVersionHref)) {
                         // shortcut
                         latestVersionHref = href;
                     } else {
-                        // if this vr is a decendant of the one already found, set latestVersion again
-                        List predecessors = new HrefProperty(vr.getProperty(VersionResource.PREDECESSOR_SET)).getHrefs();
+                        // if this vr is a descendant of the one already found, set latestVersion again
+                        List<String> predecessors = new HrefProperty(vr.getProperty(VersionResource.PREDECESSOR_SET)).getHrefs();
                         if (predecessors.contains(latestVersionHref)) {
-                            // version is a decendant of the vr identified by latestVersionHref
+                            // version is a descendant of the vr identified by latestVersionHref
                             latestVersionHref = href;
                         } // else: version is predecessor -> nothing to do.
                     }
@@ -150,4 +148,4 @@
         }
         return latestVersionHref;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/LocateByHistoryReport.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/LocateByHistoryReport.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/LocateByHistoryReport.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/LocateByHistoryReport.java Tue Feb 23 13:27:10 2010
@@ -34,6 +34,7 @@
 import org.w3c.dom.Element;
 
 import java.util.HashSet;
+import java.util.Set;
 
 /**
  * <code>LocateByHistoryReport</code> encapsulates the DAV:locate-by-hisotry
@@ -52,7 +53,7 @@
     private static Logger log = LoggerFactory.getLogger(LocateByHistoryReport.class);
 
     private ReportInfo info;
-    private HashSet vhHrefSet = new HashSet();
+    private Set<String> vhHrefSet = new HashSet<String>();
     private DavResource resource;
 
     /**
@@ -171,4 +172,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ReportInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ReportInfo.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ReportInfo.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ReportInfo.java Tue Feb 23 13:27:10 2010
@@ -31,7 +31,6 @@
 import org.w3c.dom.Node;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 /**
@@ -48,7 +47,7 @@
     private final Namespace typeNamespace;
     private final int depth;
     private final DavPropertyNameSet propertyNames;
-    private final List content = new ArrayList();
+    private final List<Element> content = new ArrayList<Element>();
 
     /**
      * Create a new <code>ReportInfo</code>
@@ -152,9 +151,7 @@
         if (content.isEmpty()) {
             return false;
         }
-        Iterator it = content.iterator();
-        while (it.hasNext()) {
-            Element elem = (Element)it.next();
+        for (Element elem : content) {
             boolean sameNamespace = (namespace == null) ? elem.getNamespaceURI() == null : namespace.isSame(elem.getNamespaceURI());
             if (sameNamespace && elem.getLocalName().equals(localName)) {
                 return true;
@@ -173,11 +170,11 @@
      * @return Xml element with the given name/namespace or <code>null</code>
      */
     public Element getContentElement(String localName, Namespace namespace) {
-        List values = getContentElements(localName, namespace);
+        List<Element> values = getContentElements(localName, namespace);
         if (values.isEmpty()) {
             return null;
         } else {
-            return (Element)values.get(0);
+            return values.get(0);
         }
     }
 
@@ -191,11 +188,9 @@
      * @return List contain all child elements with the given name/namespace
      * or an empty list.
      */
-    public List getContentElements(String localName, Namespace namespace) {
-        List l = new ArrayList();
-        Iterator it = content.iterator();
-        while (it.hasNext()) {
-            Element elem = (Element)it.next();
+    public List<Element> getContentElements(String localName, Namespace namespace) {
+        List<Element> l = new ArrayList<Element>();
+        for (Element elem : content) {
             if (DomUtil.matches(elem, localName, namespace)) {
                 l.add(elem);
             }
@@ -232,14 +227,9 @@
     public Element toXml(Document document) {
         Element reportElement = DomUtil.createElement(document, typeLocalName, typeNamespace);
         if (!content.isEmpty()) {
-            Iterator it = content.iterator();
-            while (it.hasNext()) {
-                Object contentEntry = it.next();
-                if (contentEntry instanceof Node) {
-                    Node n = document.importNode((Node)contentEntry, true);
-                    reportElement.appendChild(n);
-                }
-                // else: another object. this should never occure and is therefore ignored.
+            for (Element contentEntry : content) {
+                Node n = document.importNode(contentEntry, true);
+                reportElement.appendChild(n);
             }
         }
         if (!propertyNames.isEmpty()) {
@@ -248,4 +238,4 @@
         return reportElement;
     }
 
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ReportType.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ReportType.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ReportType.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/ReportType.java Tue Feb 23 13:27:10 2010
@@ -37,7 +37,7 @@
 
     private static Logger log = LoggerFactory.getLogger(ReportType.class);
 
-    private static final HashMap types = new HashMap();
+    private static final HashMap<String, ReportType> types = new HashMap<String, ReportType>();
 
     public static final ReportType VERSION_TREE = register(XML_VERSION_TREE, NAMESPACE, VersionTreeReport.class);
     public static final ReportType EXPAND_PROPERTY = register(XML_EXPAND_PROPERTY, NAMESPACE, ExpandPropertyReport.class);
@@ -46,14 +46,14 @@
     private final String key;
     private final String localName;
     private final Namespace namespace;
-    private final Class reportClass;
+    private final Class<? extends Report> reportClass;
 
     /**
      * Private constructor
      *
      * @see ReportType#register(String, org.apache.jackrabbit.webdav.xml.Namespace, Class)
      */
-    private ReportType(String localName, Namespace namespace, String key, Class reportClass) {
+    private ReportType(String localName, Namespace namespace, String key, Class<? extends Report> reportClass) {
         this.localName = localName;
         this.namespace = namespace;
         this.key = key;
@@ -68,7 +68,7 @@
      */
     public Report createReport(DeltaVResource resource, ReportInfo info) throws DavException {
         try {
-            Report report = (Report) reportClass.newInstance();
+            Report report = reportClass.newInstance();
             report.init(resource, info);
             return report;
         } catch (IllegalAccessException e) {
@@ -143,13 +143,13 @@
      * if the given class does not implement the {@link Report} interface or if
      * it does not provide an empty constructor.
      */
-    public static ReportType register(String localName, Namespace namespace, Class reportClass) {
+    public static ReportType register(String localName, Namespace namespace, Class<? extends Report> reportClass) {
         if (localName == null || namespace == null || reportClass == null) {
             throw new IllegalArgumentException("A ReportType cannot be registered with a null name, namespace or report class");
         }
         String key = DomUtil.getExpandedName(localName, namespace);
         if (types.containsKey(key)) {
-            return (ReportType) types.get(key);
+            return types.get(key);
         } else {
             try {
                 Object report =  reportClass.newInstance();
@@ -182,7 +182,7 @@
         }
         String key = reportInfo.getReportName();
         if (types.containsKey(key)) {
-            return (ReportType) types.get(key);
+            return types.get(key);
         } else {
             throw new IllegalArgumentException("The request report '"+key+"' has not been registered yet.");
         }

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/SupportedReportSetProperty.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/SupportedReportSetProperty.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/SupportedReportSetProperty.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/SupportedReportSetProperty.java Tue Feb 23 13:27:10 2010
@@ -25,7 +25,7 @@
 import org.w3c.dom.Element;
 
 import java.util.HashSet;
-import java.util.Iterator;
+import java.util.Set;
 
 /**
  * <code>SupportedReportSetProperty</code> represents the DAV:supported-report-set
@@ -38,11 +38,11 @@
  * ANY value: a report element type
  * </pre>
  */
-public class SupportedReportSetProperty extends AbstractDavProperty {
+public class SupportedReportSetProperty extends AbstractDavProperty<Set<ReportType>> {
 
     private static Logger log = LoggerFactory.getLogger(SupportedReportSetProperty.class);
 
-    private final HashSet reportTypes = new HashSet();
+    private final Set<ReportType> reportTypes = new HashSet<ReportType>();
 
     /**
      * Create a new empty <code>SupportedReportSetProperty</code>.
@@ -58,8 +58,8 @@
      */
     public SupportedReportSetProperty(ReportType[] reportTypes) {
         super(DeltaVConstants.SUPPORTED_REPORT_SET, true);
-        for (int i = 0; i < reportTypes.length; i++) {
-            addReportType(reportTypes[i]);
+        for (ReportType reportType : reportTypes) {
+            addReportType(reportType);
         }
     }
 
@@ -80,10 +80,8 @@
      * @return true if the requested report is supported.
      */
     public boolean isSupportedReport(ReportInfo reqInfo) {
-        Iterator it = reportTypes.iterator();
-        while (it.hasNext()) {
-            ReportType rt = (ReportType)it.next();
-            if (rt.isRequestedReportType(reqInfo)) {
+        for (ReportType reportType : reportTypes) {
+            if (reportType.isRequestedReportType(reqInfo)) {
                 return true;
             }
         }
@@ -96,7 +94,7 @@
      * @return set of {@link ReportType}.
      * @see org.apache.jackrabbit.webdav.property.DavProperty#getValue()
      */
-    public Object getValue() {
+    public Set<ReportType> getValue() {
         return reportTypes;
     }
 
@@ -107,15 +105,15 @@
      * @see org.apache.jackrabbit.webdav.xml.XmlSerializable#toXml(Document)
      * @param document
      */
+    @Override
     public Element toXml(Document document) {
         Element elem = getName().toXml(document);
-        Iterator it = reportTypes.iterator();
-        while (it.hasNext()) {
+        for (ReportType rt : reportTypes) {
             Element sr = DomUtil.addChildElement(elem, DeltaVConstants.XML_SUPPORTED_REPORT, DeltaVConstants.NAMESPACE);
             Element r = DomUtil.addChildElement(sr, DeltaVConstants.XML_REPORT, DeltaVConstants.NAMESPACE);
-            r.appendChild(((ReportType)it.next()).toXml(document));
+            r.appendChild(rt.toXml(document));
         }
         return elem;
     }
 
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/VersionTreeReport.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/VersionTreeReport.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/VersionTreeReport.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/version/report/VersionTreeReport.java Tue Feb 23 13:27:10 2010
@@ -145,12 +145,11 @@
     private void buildResponse(DavResource res, DavPropertyNameSet propNameSet,
                                int depth, MultiStatus ms) {
         try {
-            VersionResource[] versions = getVersions(res);
-            for (int i = 0; i < versions.length; i++) {
+            for (VersionResource version : getVersions(res)) {
                 if (propNameSet.isEmpty()) {
-                    ms.addResourceStatus(versions[i], DavServletResponse.SC_OK, 0);
+                    ms.addResourceStatus(version, DavServletResponse.SC_OK, 0);
                 } else {
-                    ms.addResourceProperties(versions[i], propNameSet, 0);
+                    ms.addResourceProperties(version, propNameSet, 0);
                 }
             }
         } catch (DavException e) {
@@ -185,4 +184,4 @@
         }
         return versions;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/DomUtil.java Tue Feb 23 13:27:10 2010
@@ -85,14 +85,14 @@
      */
     public static Attr[] getNamespaceAttributes(Element element) {
         NamedNodeMap attributes = element.getAttributes();
-        List nsAttr = new ArrayList();
+        List<Attr> nsAttr = new ArrayList<Attr>();
         for (int i = 0; i < attributes.getLength(); i++) {
             Attr attr = (Attr) attributes.item(i);
             if (Namespace.XMLNS_NAMESPACE.getURI().equals(attr.getNamespaceURI())) {
                 nsAttr.add(attr);
             }
         }
-        return (Attr[]) nsAttr.toArray(new Attr[nsAttr.size()]);
+        return nsAttr.toArray(new Attr[nsAttr.size()]);
     }
 
     /**
@@ -286,8 +286,8 @@
      * @param parent
      * @return a list of all child nodes that are either Element, Text or CDATA.
      */
-    public static List getContent(Node parent) {
-        List content = new ArrayList();
+    public static List<Node> getContent(Node parent) {
+        List<Node> content = new ArrayList<Node>();
         if (parent != null) {
             NodeList children = parent.getChildNodes();
             for (int i = 0; i < children.getLength(); i++) {
@@ -657,4 +657,4 @@
         buf.append(localName);
         return buf.toString();
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/ElementIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/ElementIterator.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/ElementIterator.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/ElementIterator.java Tue Feb 23 13:27:10 2010
@@ -28,7 +28,7 @@
 /**
  * <code>ElementIterator</code>...
  */
-public class ElementIterator implements Iterator {
+public class ElementIterator implements Iterator<Element> {
 
     private static Logger log = LoggerFactory.getLogger(ElementIterator.class);
 
@@ -85,7 +85,7 @@
      * @see java.util.Iterator#next()
      * @see #nextElement()
      */
-    public Object next() {
+    public Element next() {
         return nextElement();
     }
 
@@ -134,4 +134,4 @@
         // no next element found -> set to null in order to leave the loop.
         next = null;
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/Namespace.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/Namespace.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/Namespace.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/xml/Namespace.java Tue Feb 23 13:27:10 2010
@@ -38,6 +38,24 @@
         this.uri = uri;
     }
 
+    //-----------------------------------------------------------< creation >---
+    
+    public static Namespace getNamespace(String prefix, String uri) {
+        if (prefix == null) {
+            prefix = EMPTY_NAMESPACE.getPrefix();
+        }
+        if (uri == null) {
+            uri = EMPTY_NAMESPACE.getURI();
+        }
+        return new Namespace(prefix, uri);
+    }
+
+    public static Namespace getNamespace(String uri) {
+        return getNamespace("", uri);
+    }
+
+    //--------------------------------------------------------------------------
+    
     public String getPrefix() {
         return prefix;
     }
@@ -50,10 +68,13 @@
         return uri.equals(namespaceURI);
     }
 
+    //-------------------------------------------------------------< Object >---
+    @Override
     public int hashCode() {
         return uri.hashCode();
     }
 
+    @Override
     public boolean equals(Object obj) {
         if (obj == this) {
             return true;
@@ -63,18 +84,4 @@
         }
         return false;
     }
-
-    public static Namespace getNamespace(String prefix, String uri) {
-        if (prefix == null) {
-            prefix = EMPTY_NAMESPACE.getPrefix();
-        }
-        if (uri == null) {
-            uri = EMPTY_NAMESPACE.getURI();
-        }
-        return new Namespace(prefix, uri);
-    }
-
-    public static Namespace getNamespace(String uri) {
-        return getNamespace("", uri);
-    }
 }
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/client/methods/DavMethodTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/client/methods/DavMethodTest.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/client/methods/DavMethodTest.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/client/methods/DavMethodTest.java Tue Feb 23 13:27:10 2010
@@ -29,10 +29,12 @@
 
     private static Logger log = LoggerFactory.getLogger(DavMethodTest.class);
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -49,30 +51,39 @@
         private TestDavMethod() {
             super("test");
         }
+        @Override
         public String getName() {
             return "test";
         }
+        @Override
         public int getStatusCode() {
             return 404;
         }
+        @Override
         public String getStatusText() {
             return "404";
         }
+        @Override
         public Document getResponseBodyAsDocument() throws IOException {
             throw new IOException();
         }
+        @Override
         public void checkSuccess() throws DavException, IOException {
             throw new DavException(404);
         }
+        @Override
         public boolean succeeded() {
             return false;
         }
+        @Override
         protected void checkUsed() {}
+        @Override
         protected boolean isSuccess(int statusCode) {
             return false;
         }
+        @Override
         protected boolean getSuccess() {
             return false;
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/io/OutputContextImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/io/OutputContextImplTest.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/io/OutputContextImplTest.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/io/OutputContextImplTest.java Tue Feb 23 13:27:10 2010
@@ -32,9 +32,11 @@
 
     public void testSetContentLength() {
         HttpServletResponse response = new DummyResponse() {
+            @Override
             public void setContentLength(int len) {
                 assertTrue(len >= 0);
             }
+            @Override
             public void setHeader(String name, String value) {
                 assertTrue(Long.parseLong(value) > Integer.MAX_VALUE);
             }
@@ -154,4 +156,4 @@
             return null;
         }
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/lock/ActiveLockTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/lock/ActiveLockTest.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/lock/ActiveLockTest.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/lock/ActiveLockTest.java Tue Feb 23 13:27:10 2010
@@ -51,14 +51,14 @@
         lock.setIsDeep(true);
 
         LockDiscovery disc = LockDiscovery.createFromXml(new LockDiscovery(lock).toXml(doc));
-        List l  = (List) disc.getValue();
+        List<ActiveLock> l  = disc.getValue();
 
         assertFalse(l.isEmpty());
         assertEquals(1, l.size());
-        ActiveLock al = (ActiveLock) l.get(0);
+        ActiveLock al = l.get(0);
 
         assertEquals("lockroot", al.getLockroot());
         assertEquals("owner", al.getOwner());
         assertTrue(al.isDeep());
     }
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918DestinationHeaderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918DestinationHeaderTest.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918DestinationHeaderTest.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918DestinationHeaderTest.java Tue Feb 23 13:27:10 2010
@@ -51,6 +51,7 @@
     private String username, password;
     private HttpClient client;
     
+    @Override
     protected void setUp() throws Exception {
         this.uri = URI.create(System.getProperty("webdav.test.url"));
         this.root = this.uri.toASCIIString();
@@ -66,6 +67,7 @@
         super.setUp();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -76,7 +78,7 @@
         String destinationuri = testuri + "2";
         String destinationpath = new URI(destinationuri).getRawPath();
         // make sure the scheme is removed
-        assertTrue(destinationpath.indexOf(":") < 0);
+        assertFalse(destinationpath.contains(":"));
         
         int status;
         try {

Modified: jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918IfHeaderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918IfHeaderTest.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918IfHeaderTest.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918IfHeaderTest.java Tue Feb 23 13:27:10 2010
@@ -54,6 +54,7 @@
     private String username, password;
     private HttpClient client;
     
+    @Override
     protected void setUp() throws Exception {
         this.uri = URI.create(System.getProperty("webdav.test.url"));
         this.root = this.uri.toASCIIString();
@@ -69,6 +70,7 @@
         super.setUp();
     }
   
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }

Modified: jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918PropfindTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918PropfindTest.java?rev=915333&r1=915332&r2=915333&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918PropfindTest.java (original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/test/java/org/apache/jackrabbit/webdav/server/RFC4918PropfindTest.java Tue Feb 23 13:27:10 2010
@@ -58,6 +58,7 @@
     private String username, password;
     private HttpClient client;
     
+    @Override
     protected void setUp() throws Exception {
         this.uri = URI.create(System.getProperty("webdav.test.url"));
         this.root = this.uri.toASCIIString();
@@ -73,6 +74,7 @@
         super.setUp();
     }
   
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }



Mime
View raw message