@@ -46,11 +46,15 @@ public static void main(String[] args) throws Exception {
4646 System .out .println ("Loading classpath: " );
4747 String line = reader .readLine ();
4848 while (line != null ) {
49- ListEntry entry = ListEntry .from (line );
50- //System.out.println(entry);
51- File target = new File ("libraries/" + entry .path );
49+ String entryPath = ListEntry .getPathFrom (line );
50+ // if (DEBUG) {
51+ // ListEntry entry = ListEntry.from(line);
52+ // entryPath = entry.path;
53+ // System.out.println(entry);
54+ // }
55+ File target = new File ("libraries/" + entryPath );
5256 if (!target .exists ()) {
53- System .out .println ("Missing required library: " + entry . path );
57+ System .out .println ("Missing required library: " + entryPath );
5458 failed = true ;
5559 }
5660 classpath .append (File .pathSeparator ).append (target .getAbsolutePath ());
@@ -128,8 +132,14 @@ private static final class ListEntry {
128132 private final String path ;
129133
130134 private static ListEntry from (String line ) {
131- String [] parts = line .split ("\t " , 3 );
132- return new ListEntry (parts [0 ], parts [1 ], parts [2 ]);
135+ String sha256 = line .substring (0 , 64 );
136+ if (line .charAt (65 ) != '\t' ) throw new IllegalArgumentException ("Invalid bootstrap config line: " + line );
137+ String [] parts = line .substring (65 ).split ("\t " , 2 );
138+ return new ListEntry (sha256 , parts [0 ], parts [1 ]);
139+ }
140+
141+ private static String getPathFrom (String line ) {
142+ return line .substring (65 ).split ("\t " , 2 )[1 ];
133143 }
134144
135145 private ListEntry (String sha256 , String id , String path ) {
0 commit comments