You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by di...@apache.org on 2001/07/21 15:14:34 UTC
cvs commit: jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties AclProperty.java PrincipalCollectionSetProperty.java SupportedLockProperty.java
dirkv 01/07/21 06:14:34
Modified: src/webdav/client/src/org/apache/webdav/lib/properties
AclProperty.java
PrincipalCollectionSetProperty.java
SupportedLockProperty.java
Log:
fix ClassCastException and improve current code
Revision Changes Path
1.3 +5 -7 jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/AclProperty.java
Index: AclProperty.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/AclProperty.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AclProperty.java 2001/06/09 00:15:35 1.2
+++ AclProperty.java 2001/07/21 13:14:34 1.3
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/AclProperty.java,v 1.2 2001/06/09 00:15:35 remm Exp $
- * $Revision: 1.2 $
- * $Date: 2001/06/09 00:15:35 $
+ * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/AclProperty.java,v 1.3 2001/07/21 13:14:34 dirkv Exp $
+ * $Revision: 1.3 $
+ * $Date: 2001/07/21 13:14:34 $
*
* ====================================================================
*
@@ -83,7 +83,7 @@
*
* @author Remy Maucherat
* @author Dirk Verbeeck
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class AclProperty extends BaseProperty {
@@ -134,9 +134,7 @@
} catch (ClassCastException e) {
}
}
- Ace[] tmp=new Ace[aces.size()];
- System.arraycopy(aces.toArray(),0,tmp,0,tmp.length);
- return tmp;
+ return (Ace[]) aces.toArray(new Ace[aces.size()]);
}
1.2 +6 -8 jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/PrincipalCollectionSetProperty.java
Index: PrincipalCollectionSetProperty.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/PrincipalCollectionSetProperty.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PrincipalCollectionSetProperty.java 2001/07/13 12:35:24 1.1
+++ PrincipalCollectionSetProperty.java 2001/07/21 13:14:34 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/PrincipalCollectionSetProperty.java,v 1.1 2001/07/13 12:35:24 dirkv Exp $
- * $Revision: 1.1 $
- * $Date: 2001/07/13 12:35:24 $
+ * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/PrincipalCollectionSetProperty.java,v 1.2 2001/07/21 13:14:34 dirkv Exp $
+ * $Revision: 1.2 $
+ * $Date: 2001/07/21 13:14:34 $
*
* ====================================================================
*
@@ -81,7 +81,7 @@
* defined in the WebDAV Access Control Protocol specification.
*
* @author Dirk Verbeeck
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class PrincipalCollectionSetProperty extends BaseProperty {
@@ -122,10 +122,8 @@
hrefVector.add(href);
}
}
- String[] hrefs = new String[hrefVector.size()];
- hrefs=(String[]) hrefVector.toArray(hrefs);
-
- this.hrefs=hrefs;
+
+ this.hrefs=(String[]) hrefVector.toArray(new String[hrefVector.size()]);
}
/**
1.3 +5 -5 jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/SupportedLockProperty.java
Index: SupportedLockProperty.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/SupportedLockProperty.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SupportedLockProperty.java 2001/05/18 06:44:40 1.2
+++ SupportedLockProperty.java 2001/07/21 13:14:34 1.3
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/SupportedLockProperty.java,v 1.2 2001/05/18 06:44:40 jericho Exp $
- * $Revision: 1.2 $
- * $Date: 2001/05/18 06:44:40 $
+ * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/SupportedLockProperty.java,v 1.3 2001/07/21 13:14:34 dirkv Exp $
+ * $Revision: 1.3 $
+ * $Date: 2001/07/21 13:14:34 $
*
* ====================================================================
*
@@ -79,7 +79,7 @@
/**
* @author BC Holmes
* @author <a href="mailto:jericho@thinkfree.com">Park, Sung-Gu</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class SupportedLockProperty extends BaseProperty {
@@ -131,7 +131,7 @@
} catch (ClassCastException e) {
}
}
- return (Lock[]) locks.toArray();
+ return (Lock[]) locks.toArray(new Lock[locks.size()]);
}