[Biojava-l] ClassCastException during ambiguity calcul

Eric BELLARD eric_bellard at yahoo.com
Wed Jan 14 05:40:44 EST 2004


Hi,

I'm calculating ambiguity of symbol sets and i've got
a class cast exception. I've managed to isolate the
bug. The following code triggers the exception:

		Set lc_set = new HashSet();

		SymbolList lc_sequence = DNATools.createDNA("AG");

		Iterator lc_i = lc_sequence.iterator();
		while (lc_i.hasNext()) {

			lc_set.add(lc_i.next());

		}

		lc_set.add(DNATools.getDNA().getGapSymbol());

		try {
			Symbol lc_symbol =
DNATools.getDNA().getAmbiguity(lc_set);
			System.out.println(lc_symbol.getName());
		} catch (IllegalSymbolException e) {
			throw e;
		}


If I don't add the gap symbol in the set I don't have
the exception.

Even an excpetion must be thrown during this code
execution, I don't think the class cast exception is
the good one.

Does someone have a clue? Is it a bug? Do you want me
to propose a fix?

I think I got good java skills but the worst
biological skill you've ever seen :-) 

Regards,

Eric

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


More information about the Biojava-l mailing list