aboutsummaryrefslogtreecommitdiffstats
path: root/bcel-builder/src/test/java/org/aspectj/apache/bcel/util/ClassPathTests.java
blob: 53488df0e301d720921091fc5ddd39182ab64260 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package org.aspectj.apache.bcel.util;

import java.io.IOException;

import org.aspectj.apache.bcel.classfile.tests.BcelTestCase;
import org.aspectj.apache.bcel.util.ClassPath.ClassFile;

public class ClassPathTests extends BcelTestCase {

	public void testJava9ImageFile() throws IOException {
		String sunbootClasspath = System.getProperty("sun.boot.class.path");
		if (sunbootClasspath==null || !sunbootClasspath.contains(".jimage")) {
			// Not java9
			return;
		}
		ClassPath cp = new ClassPath(sunbootClasspath);
		ClassFile cf = cp.getClassFile("java/lang/Object");
		assertNotNull(cf);
		assertTrue(cf.getSize()>0);
		assertTrue(cf.getTime()>0);
	}
}