Ignore:
Timestamp:
06/30/10 21:15:03 (9 years ago)
Author:
melissa
Message:

Merged r6602 to 4.2 branch.

Location:
branches/4.2/components/bio-formats/src/loci/formats/services
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/bio-formats/src/loci/formats/services

  • branches/4.2/components/bio-formats/src/loci/formats/services/LuraWaveServiceImpl.java

    r6128 r6613  
    2626import java.io.IOException; 
    2727import java.io.InputStream; 
     28import java.lang.reflect.Field; 
    2829 
    2930import loci.common.services.AbstractService; 
     
    6162  public static final String INVALID_LICENSE_MSG = "Invalid license code: "; 
    6263 
     64  /** Identifying field in stub class. */ 
     65  public static final String STUB_FIELD = "IS_STUB"; 
     66 
    6367  /** LuraWave decoder delegate. */ 
    6468  private lwfDecoder delegate; 
     
    7074   * Default constructor. 
    7175   */ 
    72   public LuraWaveServiceImpl() { 
     76  public LuraWaveServiceImpl() throws DependencyException { 
    7377    license = System.getProperty(LICENSE_PROPERTY); 
    7478    checkClassDependency(com.luratech.lwf.lwfDecoder.class); 
     79    try { 
     80      Field isStub = com.luratech.lwf.lwfDecoder.class.getField(STUB_FIELD); 
     81      if (isStub != null) { 
     82        throw new DependencyException(NO_LURAWAVE_MSG); 
     83      } 
     84    } 
     85    catch (NoSuchFieldException e) { } 
    7586  } 
    7687 
Note: See TracChangeset for help on using the changeset viewer.