Re: svn commit: r1053932 - /subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
On 12/30/10 8:33 AM, markp...@apache.org wrote: Author: markphip Date: Thu Dec 30 16:32:59 2010 New Revision: 1053932 URL: http://svn.apache.org/viewvc?rev=1053932view=rev Log: JavaHL: Followup to r1053915. Update the properties test to set and get a property with binary data. * subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (testBasicProperties): Set the property value with binary data instead of a String Also update other caller in same test to use the new Byte[] method with a String wc.setItemPropStatus(iota, Status.Kind.modified); thisTest.checkStatus(); @@ -705,7 +708,8 @@ public class BasicTests extends SVNTests itemPath = fileToSVNPath(new File(thisTest.getWCPath(), /A/B/E/alpha), false); -client.propertyCreate(itemPath, cqcq, qrz, Depth.empty, null, +String alphaVal = qrz; +client.propertyCreate(itemPath, cqcq, alphaVal.getBytes(), Depth.empty, null, Do you need to pass UTF-8 to alphaVal.getBytes? false, null); final MapString, MapString, byte[] propMaps = @@ -719,7 +723,7 @@ public class BasicTests extends SVNTests for (String key : propMap.keySet()) { assertEquals(cqcq, key); -assertEquals(qrz, new String(propMap.get(key))); +assertEquals(alphaVal, new String(propMap.get(key))); And here to the String constructor? Blair
Re: svn commit: r1053932 - /subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
On Thu, Dec 30, 2010 at 2:24 PM, Blair Zajac bl...@orcaware.com wrote: - client.propertyCreate(itemPath, cqcq, qrz, Depth.empty, null, + String alphaVal = qrz; + client.propertyCreate(itemPath, cqcq, alphaVal.getBytes(), Depth.empty, null, Do you need to pass UTF-8 to alphaVal.getBytes? Don't know. Do I? Tests pass. -- Thanks Mark Phippard http://markphip.blogspot.com/
Re: svn commit: r1053932 - /subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
On 12/30/10 11:54 AM, Mark Phippard wrote: On Thu, Dec 30, 2010 at 2:24 PM, Blair Zajacbl...@orcaware.com wrote: -client.propertyCreate(itemPath, cqcq, qrz, Depth.empty, null, +String alphaVal = qrz; +client.propertyCreate(itemPath, cqcq, alphaVal.getBytes(), Depth.empty, null, Do you need to pass UTF-8 to alphaVal.getBytes? Don't know. Do I? Tests pass. Looks like all the string conversions were remove, so it's moot. But typically, one always wants to pass UTF-8 to String's constructor and getBytes() so you don't have different encodings in different locales. Blair