OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 17 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17 Rev 180
Line 69... Line 69...
69
            }
69
            }
70
        }
70
        }
71
        return -1;
71
        return -1;
72
    }
72
    }
73
 
73
 
74
    @SuppressWarnings( { "deprecation" })
74
    @SuppressWarnings({ "deprecation" })
75
    protected void parseURL(URL url, String spec, int start, int limit) {
75
    protected void parseURL(URL url, String spec, int start, int limit) {
76
        String file = null;
76
        String file = null;
77
        String ref = null;
77
        String ref = null;
78
        // first figure out if there is an anchor
78
        // first figure out if there is an anchor
79
        int refPos = spec.indexOf('#', limit);
79
        int refPos = spec.indexOf('#', limit);
Line 110... Line 110...
110
        }
110
        }
111
        file = file != null ? "jar:" + file.replaceFirst("\\" + JarJarURLConnection.SEPARATOR, "!/") : null;
111
        file = file != null ? "jar:" + file.replaceFirst("\\" + JarJarURLConnection.SEPARATOR, "!/") : null;
112
        setURL(url, "jarjar", "", -1, file, ref);
112
        setURL(url, "jarjar", "", -1, file, ref);
113
    }
113
    }
114
 
114
 
115
    @SuppressWarnings( { "UnusedAssignment", "UnusedDeclaration" })
115
    @SuppressWarnings({ "UnusedAssignment", "UnusedDeclaration" })
116
    private String parseAbsoluteSpec(String spec) {
116
    private String parseAbsoluteSpec(String spec) {
117
        @SuppressWarnings("unused")
117
        @SuppressWarnings("unused")
118
        URL url = null;
118
        URL url = null;
119
        int index = -1;
119
        int index = -1;
120
 
120
 
121
        // check for !/
121
        // check for !/
122
        if ((index = indexOfBangSlash(spec)) == -1) {
122
        if ((index = indexOfBangSlash(spec)) == -1) {
123
            throw new IllegalArgumentException("no " + JarJarURLConnection.SEPARATOR + " in spec");
123
            throw new IllegalArgumentException("no " + JarJarURLConnection.SEPARATOR + " in spec: " + spec);
124
        }
124
        }
125
        // test the inner URL
125
        // test the inner URL
126
        try {
126
        try {
127
            String innerSpec = spec.substring(0, index - 1);
127
            String innerSpec = spec.substring(0, index - 1);
128
 
128