MCPcopy Create free account
hub / github.com/davidgiven/luje / checkURI

Method checkURI

lib/java/io/File.java:203–235  ·  view source on GitHub ↗
(URI uri)

Source from the content-addressed store, hash-verified

201 }
202
203 @SuppressWarnings("nls")
204 private void checkURI(URI uri) {
205 if (!uri.isAbsolute()) {
206 throw new IllegalArgumentException(Messages.getString("luni.AD", uri));
207 } else if (!uri.getRawSchemeSpecificPart().startsWith("/")) {
208 throw new IllegalArgumentException(Messages.getString("luni.AE", uri));
209 }
210
211 String temp = uri.getScheme();
212 if (temp == null || !temp.equals("file")) {
213 throw new IllegalArgumentException(Messages.getString("luni.AF", uri));
214 }
215
216 temp = uri.getRawPath();
217 if (temp == null || temp.length() == 0) {
218 throw new IllegalArgumentException(Messages.getString("luni.B0", uri));
219 }
220
221 if (uri.getRawAuthority() != null) {
222 throw new IllegalArgumentException(Messages.getString("luni.B1",
223 new String[] { "authority", uri.toString() }));
224 }
225
226 if (uri.getRawQuery() != null) {
227 throw new IllegalArgumentException(Messages.getString("luni.B1",
228 new String[] { "query", uri.toString() }));
229 }
230
231 if (uri.getRawFragment() != null) {
232 throw new IllegalArgumentException(Messages.getString("luni.B1",
233 new String[] { "fragment", uri.toString() }));
234 }
235 }
236
237 private static native byte[][] rootsImpl();
238

Callers 1

FileMethod · 0.95

Calls 12

getStringMethod · 0.95
equalsMethod · 0.95
lengthMethod · 0.95
startsWithMethod · 0.80
getSchemeMethod · 0.80
getRawPathMethod · 0.80
getRawAuthorityMethod · 0.80
getRawQueryMethod · 0.80
getRawFragmentMethod · 0.80
toStringMethod · 0.65
isAbsoluteMethod · 0.45

Tested by

no test coverage detected