Ignore:
Timestamp:
03/05/11 15:29:21 (9 years ago)
Author:
curtis
Message:

Fix some Eclipse warnings and formatting.

Location:
trunk/projects/jar2lib/src/main/java/loci/jar2lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/jar2lib/src/main/java/loci/jar2lib/ClassList.java

    r7635 r7639  
    3535package loci.jar2lib; 
    3636 
    37 import java.io.File; 
    3837import java.io.IOException; 
    3938import java.util.ArrayList; 
  • trunk/projects/jar2lib/src/main/java/loci/jar2lib/FixProxies.java

    r6926 r7639  
    122122        " conflicts.txt /path/to/proxies [/path/to/more/proxies ...]"); 
    123123      System.exit(1); 
     124      return; 
    124125    } 
    125126    final String conflictsFile = args[0]; 
  • trunk/projects/jar2lib/src/main/java/loci/jar2lib/Jar2Lib.java

    r7635 r7639  
    261261    log("--> Generating CMake build file"); 
    262262    generator.createCMakeLists(projectId, projectName, 
    263         sourceFiles, path(outputDir)); 
     263      sourceFiles, path(outputDir)); 
    264264  } 
    265265 
     
    267267   * Copies static project resources into the project directory. 
    268268   * In particular, copies the Jace C++ distribution and related files. 
    269    * 
    270    * @param includeDir Folder containing the C++ headers. 
    271269   */ 
    272270  public void generateSkeleton() throws IOException { 
     
    312310   * Post-processes the generated proxies to correct any 
    313311   * conflicts identified in the specified conflicts file. 
    314    * 
    315    * @param proxiesDir Folder containing the generated C++ proxies. 
    316    * @throws IOException 
    317312   */ 
    318313  public void fixConflicts() throws IOException { 
     
    405400  } 
    406401 
    407         /** 
     402  /** 
    408403   * Copies the given file to to the source folder 
    409404   * of the specified output directory. 
    410         * @throws IOException  
     405  * @throws IOException  
    411406   */ 
    412407  private void copySourceFile(final File sourceFile) throws IOException { 
    413         log(sourceFile.getPath()); 
    414         final File outputFile = new File(outputSourceDir, sourceFile.getName()); 
    415         final FileInputStream in = new FileInputStream(sourceFile); 
    416         writeStreamToFile(in, outputFile); 
    417         in.close(); 
     408    log(sourceFile.getPath()); 
     409    final File outputFile = new File(outputSourceDir, sourceFile.getName()); 
     410    final FileInputStream in = new FileInputStream(sourceFile); 
     411    writeStreamToFile(in, outputFile); 
     412    in.close(); 
    418413  } 
    419414 
     
    481476  /** Writes the contents of the given input stream to the specified file. */ 
    482477  private static void writeStreamToFile(final InputStream in, 
    483         final File outputFile) throws IOException 
    484         { 
    485           final OutputStream out = new FileOutputStream(outputFile); 
    486           final byte[] buf = new byte[512 * 1024]; // 512K buffer 
    487           while (true) { 
    488             int r = in.read(buf); 
    489             if (r <= 0) break; // EOF 
    490             out.write(buf, 0, r); 
    491           } 
    492           out.close(); 
    493         } 
     478    final File outputFile) throws IOException 
     479  { 
     480    final OutputStream out = new FileOutputStream(outputFile); 
     481    final byte[] buf = new byte[512 * 1024]; // 512K buffer 
     482    while (true) { 
     483      int r = in.read(buf); 
     484      if (r <= 0) break; // EOF 
     485      out.write(buf, 0, r); 
     486    } 
     487    out.close(); 
     488  } 
    494489 
    495490} 
  • trunk/projects/jar2lib/src/main/java/loci/jar2lib/StringReplace.java

    r6926 r7639  
    127127  // -- Helper utility methods -- 
    128128 
    129   public static String fixEscaped(String s) { 
    130     s = s.replaceAll("\\\\n", "\n"); 
     129  public static String fixEscaped(final String escapedString) { 
     130    String s = escapedString.replaceAll("\\\\n", "\n"); 
    131131    s = s.replaceAll("\\\\r", "\r"); 
    132132    s = s.replaceAll("\\\\t", "\t"); 
Note: See TracChangeset for help on using the changeset viewer.