This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 50987
Collapse All | Expand All

(-)ant/project/test/unit/src/org/netbeans/spi/project/support/ant/EditablePropertiesTest.java (-1 / +5 lines)
Lines 24-29 Link Here
24
import java.io.OutputStream;
24
import java.io.OutputStream;
25
import java.io.Reader;
25
import java.io.Reader;
26
import java.net.URL;
26
import java.net.URL;
27
import java.net.URI;
27
import java.util.HashMap;
28
import java.util.HashMap;
28
import java.util.Iterator;
29
import java.util.Iterator;
29
import java.util.Map;
30
import java.util.Map;
Lines 381-387 Link Here
381
    
382
    
382
    
383
    
383
    private String filenameOfTestProperties() throws Exception {
384
    private String filenameOfTestProperties() throws Exception {
384
        return EditablePropertiesTest.class.getResource("data/test.properties").getPath();
385
        // #50987: getResource() returns a URL which can potentially include escaped 
386
        // chars (e.g. '%20' instead of ' '). Need to unescape by converting to URI.
387
        // Note that URL.toURI() would be simpler on 1.5.
388
        return new URI(EditablePropertiesTest.class.getResource("data/test.properties").toString()).getPath();
385
    }
389
    }
386
    
390
    
387
    private EditableProperties loadTestProperties() throws IOException {
391
    private EditableProperties loadTestProperties() throws IOException {

Return to bug 50987