make/tools/src/build/tools/jarreorder/JarReorder.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File jdk Sdiff make/tools/src/build/tools/jarreorder

make/tools/src/build/tools/jarreorder/JarReorder.java

Print this page




 145             name = cleanPath(new File(name));
 146             if ( name != null && name.length() > 0 && !inputSet.contains(name) ) {
 147                 inputSet.add(name);
 148             }
 149         }
 150 
 151         // Expand file/directory input so we get a complete set (except ordered)
 152         //   Should be everything not excluded and not in order list.
 153         Set<String> allFilesIncluded = expand(null, inputSet, processed);
 154 
 155         // Create simple sorted list so we can add ordered items at end.
 156         List<String> allFiles = new ArrayList<String>(allFilesIncluded);
 157         Collections.sort(allFiles);
 158 
 159         // Now add the ordered set to the end of the list.
 160         // Add in REVERSE ORDER, so that the first element is closest to
 161         // the end (and the index).
 162         for (int i = orderList.size() - 1; i >= 0; --i) {
 163             String s = orderList.get(i);
 164             if (allFilesExcluded.contains(s)) {
 165                 System.err.println("Included order file " + s
 166                     + " is also excluded, skipping.");
 167             } else if (new File(s).exists()) {
 168                 allFiles.add(s);
 169             } else {
 170                 System.err.println("Included order file " + s
 171                     + " missing, skipping.");
 172             }
 173         }
 174 
 175         // Print final results.
 176         for (String str : allFiles) {
 177             out.println(str);
 178         }
 179         out.flush();
 180         out.close();
 181     }
 182 
 183     /*
 184      * Read a file containing a list of files and directories into a List.
 185      */




 145             name = cleanPath(new File(name));
 146             if ( name != null && name.length() > 0 && !inputSet.contains(name) ) {
 147                 inputSet.add(name);
 148             }
 149         }
 150 
 151         // Expand file/directory input so we get a complete set (except ordered)
 152         //   Should be everything not excluded and not in order list.
 153         Set<String> allFilesIncluded = expand(null, inputSet, processed);
 154 
 155         // Create simple sorted list so we can add ordered items at end.
 156         List<String> allFiles = new ArrayList<String>(allFilesIncluded);
 157         Collections.sort(allFiles);
 158 
 159         // Now add the ordered set to the end of the list.
 160         // Add in REVERSE ORDER, so that the first element is closest to
 161         // the end (and the index).
 162         for (int i = orderList.size() - 1; i >= 0; --i) {
 163             String s = orderList.get(i);
 164             if (allFilesExcluded.contains(s)) {
 165                 if (false) System.err.println("Included order file " + s
 166                     + " is also excluded, skipping.");
 167             } else if (new File(s).exists()) {
 168                 allFiles.add(s);
 169             } else {
 170                 System.err.println("Included order file " + s
 171                     + " missing, skipping.");
 172             }
 173         }
 174 
 175         // Print final results.
 176         for (String str : allFiles) {
 177             out.println(str);
 178         }
 179         out.flush();
 180         out.close();
 181     }
 182 
 183     /*
 184      * Read a file containing a list of files and directories into a List.
 185      */


make/tools/src/build/tools/jarreorder/JarReorder.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File