Changeset 3128 for trunk


Ignore:
Timestamp:
08/31/07 14:40:13 (13 years ago)
Author:
curtis
Message:

Fix jikes warnings.

Location:
trunk/loci/formats
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/IndexedColorModel.java

    r3127 r3128  
    2727import java.awt.image.*; 
    2828import java.io.IOException; 
    29 /* debug */ import java.io.FileWriter; 
    3029 
    3130public class IndexedColorModel extends ColorModel { 
  • trunk/loci/formats/in/AVIReader.java

    r3125 r3128  
    121121    } 
    122122 
    123     int size = core.sizeY[0] * effectiveWidth * bytes; 
    124     if (!isIndexed()) size *= core.sizeC[0]; 
    125     byte[] buf = new byte[size]; 
     123    int bufSize = core.sizeY[0] * effectiveWidth * bytes; 
     124    if (!isIndexed()) bufSize *= core.sizeC[0]; 
     125    byte[] buf = new byte[bufSize]; 
    126126    return openBytes(no, buf); 
    127127  } 
     
    143143    } 
    144144 
    145     int size = effectiveWidth * bytes * core.sizeY[0]; 
    146     if (!isIndexed()) size *= core.sizeC[0]; 
    147  
    148     if (buf.length < size) throw new FormatException("Buffer too small."); 
     145    int minSize = effectiveWidth * bytes * core.sizeY[0]; 
     146    if (!isIndexed()) minSize *= core.sizeC[0]; 
     147 
     148    if (buf.length < minSize) throw new FormatException("Buffer too small."); 
    149149 
    150150    long fileOff = ((Long) offsets.get(no)).longValue(); 
Note: See TracChangeset for help on using the changeset viewer.