Changeset 3394


Ignore:
Timestamp:
08/15/03 13:26:05 (18 years ago)
Author:
piso
Message:

PRIN1: avoid ClassCastException?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Primitives.java

    r3393 r3394  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.328 2003-08-15 13:10:33 piso Exp $
     5 * $Id: Primitives.java,v 1.329 2003-08-15 13:26:05 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    739739        {
    740740            CharacterOutputStream out;
    741             try {
     741            if (second instanceof CharacterOutputStream)
    742742                out = (CharacterOutputStream) second;
    743             }
    744             catch (ClassCastException e) {
    745                 if (second == T)
    746                     out = getTerminalIO().getOutputStream();
    747                 else if (second == NIL)
    748                     out = getStandardOutput();
    749                 else
    750                     throw new TypeError(second, "output stream");
    751             }
     743            else if (second == T)
     744                out = getTerminalIO().getOutputStream();
     745            else if (second == NIL)
     746                out = getStandardOutput();
     747            else
     748                throw new TypeError(second, "output stream");
    752749            out.prin1(first);
    753750            return first;
Note: See TracChangeset for help on using the changeset viewer.