Changeset 5136


Ignore:
Timestamp:
05/29/09 16:06:57 (11 years ago)
Author:
curtis
Message:

Fix problem where UnsupportedOperationException is thrown on some systems.

Location:
trunk/components/loci-plugins/src/loci/plugins/prefs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/loci-plugins/src/loci/plugins/prefs/OptionsList.java

    r5133 r5136  
    2828import java.io.IOException; 
    2929import java.util.HashMap; 
    30 import java.util.List; 
    3130import java.util.Vector; 
    3231 
     
    109108    Option o = options.get(key); 
    110109    if (o instanceof StringOption) { 
    111       List<String> possible = ((StringOption) o).getPossible(); 
     110      Vector<String> possible = ((StringOption) o).getPossible(); 
    112111      return possible.toArray(new String[0]); 
    113112    } 
     
    122121    Option o = options.get(key); 
    123122    if (o instanceof StringOption) { 
    124       List<String> possible = ((StringOption) o).getPossible(); 
     123      Vector<String> possible = ((StringOption) o).getPossible(); 
    125124      return possible.contains(value); 
    126125    } 
  • trunk/components/loci-plugins/src/loci/plugins/prefs/StringOption.java

    r5133 r5136  
    3131import java.util.Arrays; 
    3232import java.util.HashMap; 
    33 import java.util.List; 
     33import java.util.Vector; 
    3434 
    3535/** 
     
    5353 
    5454  /** List of possible values. */ 
    55   protected List<String> possibleValues; 
     55  protected Vector<String> possibleValues; 
    5656 
    5757  /** The option's current value. */ 
     
    6161 
    6262  /** Parses a string of comma-separated values into a list of tokens. */ 
    63   public static List<String> parseList(String s) { 
     63  public static Vector<String> parseList(String s) { 
    6464    if (s == null) return null; 
    6565    String[] array = s.split(","); 
    6666    for (int i=0; i<array.length; i++) array[i] = array[i].trim(); 
    67     return Arrays.asList(array); 
     67    return new Vector<String>(Arrays.asList(array)); 
    6868  } 
    6969 
     
    8585   */ 
    8686  public StringOption(String key, boolean save, String label, 
    87     String info, String defaultValue, List<String> possibleValues) 
     87    String info, String defaultValue, Vector<String> possibleValues) 
    8888  { 
    8989    super(key, save, label, info); 
     
    9696 
    9797  /** Gets the list of possible values. */ 
    98   public List<String> getPossible() { 
     98  public Vector<String> getPossible() { 
    9999    return possibleValues; 
    100100  } 
Note: See TracChangeset for help on using the changeset viewer.