Remove 'throws ConditionThrowable' method annotations:

  it's an unchecked exception now, so no need to declare it thrown.
parent 77b724f1
......@@ -36,7 +36,7 @@ package org.armedbear.lisp;
public abstract class AbstractArray extends LispObject
{
@Override
public LispObject typep(LispObject type) throws ConditionThrowable
public LispObject typep(LispObject type)
{
if (type == Symbol.ARRAY)
return T;
......@@ -46,7 +46,7 @@ public abstract class AbstractArray extends LispObject
}
@Override
public boolean equalp(LispObject obj) throws ConditionThrowable
public boolean equalp(LispObject obj)
{
if (obj instanceof AbstractArray) {
AbstractArray a = (AbstractArray) obj;
......@@ -70,7 +70,7 @@ public abstract class AbstractArray extends LispObject
return false;
}
public LispObject arrayDisplacement() throws ConditionThrowable
public LispObject arrayDisplacement()
{
return LispThread.currentThread().setValues(NIL, Fixnum.ZERO);
}
......@@ -80,18 +80,18 @@ public abstract class AbstractArray extends LispObject
return false;
}
public int getFillPointer() throws ConditionThrowable
public int getFillPointer()
{
noFillPointer();
return -1; // Not reached.
}
public void setFillPointer(LispObject fillPointer) throws ConditionThrowable
public void setFillPointer(LispObject fillPointer)
{
setFillPointer(fillPointer.intValue());
}
public void setFillPointer(int fillPointer) throws ConditionThrowable
public void setFillPointer(int fillPointer)
{
noFillPointer();
}
......@@ -105,7 +105,7 @@ public abstract class AbstractArray extends LispObject
public abstract LispObject getDimensions();
public abstract int getDimension(int n) throws ConditionThrowable;
public abstract int getDimension(int n);
public abstract LispObject getElementType();
......@@ -113,7 +113,7 @@ public abstract class AbstractArray extends LispObject
@Override
public abstract void aset(int index, LispObject newValue)
throws ConditionThrowable;
;
// FIXME Detect overflow!
protected static final int computeTotalSize(int[] dimensions)
......@@ -125,7 +125,7 @@ public abstract class AbstractArray extends LispObject
}
public int getRowMajorIndex(LispObject[] subscripts)
throws ConditionThrowable
{
int[] subs = new int[subscripts.length];
for (int i = 0; i < subscripts.length; i++) {
......@@ -138,7 +138,7 @@ public abstract class AbstractArray extends LispObject
return getRowMajorIndex(subs);
}
public int getRowMajorIndex(int[] subscripts) throws ConditionThrowable
public int getRowMajorIndex(int[] subscripts)
{
final int rank = getRank();
if (rank != subscripts.length) {
......@@ -165,20 +165,20 @@ public abstract class AbstractArray extends LispObject
return sum;
}
public LispObject get(int[] subscripts) throws ConditionThrowable
public LispObject get(int[] subscripts)
{
return AREF(getRowMajorIndex(subscripts));
}
public void set(int[] subscripts, LispObject newValue)
throws ConditionThrowable
{
aset(getRowMajorIndex(subscripts), newValue);
}
public abstract void fill(LispObject obj) throws ConditionThrowable;
public abstract void fill(LispObject obj);
public String writeToString(int[] dimv) throws ConditionThrowable
public String writeToString(int[] dimv)
{
StringBuilder sb = new StringBuilder();
LispThread thread = LispThread.currentThread();
......@@ -229,7 +229,7 @@ public abstract class AbstractArray extends LispObject
// Helper for writeToString().
private void appendContents(int[] dimensions, int index, StringBuilder sb,
LispThread thread)
throws ConditionThrowable
{
if (dimensions.length == 0) {
if (Symbol.PRINT_CIRCLE.symbolValue(thread) != NIL) {
......@@ -318,12 +318,10 @@ public abstract class AbstractArray extends LispObject
* @param initialElement @c null if none
* @param initialContents @c null if none
* @return @c this or a new array
* @throws org.armedbear.lisp.ConditionThrowable
*/
public abstract AbstractArray adjustArray(int[] dims,
LispObject initialElement,
LispObject initialContents)
throws ConditionThrowable;
LispObject initialContents);
/**
*
......@@ -331,10 +329,8 @@ public abstract class AbstractArray extends LispObject
* @param displacedTo
* @param displacement
* @return
* @throws org.armedbear.lisp.ConditionThrowable
*/
public abstract AbstractArray adjustArray(int[] dims,
AbstractArray displacedTo,
int displacement)
throws ConditionThrowable;
int displacement);
}
......@@ -43,7 +43,7 @@ public abstract class AbstractBitVector extends AbstractVector
protected long[] bits;
@Override
public LispObject typep(LispObject type) throws ConditionThrowable
public LispObject typep(LispObject type)
{
if (type == Symbol.BIT_VECTOR)
return T;
......@@ -71,7 +71,7 @@ public abstract class AbstractBitVector extends AbstractVector
}
@Override
public boolean equal(LispObject obj) throws ConditionThrowable
public boolean equal(LispObject obj)
{
if (this == obj)
return true;
......@@ -89,7 +89,7 @@ public abstract class AbstractBitVector extends AbstractVector
}
@Override
public boolean equalp(LispObject obj) throws ConditionThrowable
public boolean equalp(LispObject obj)
{
if (this == obj)
return true;
......@@ -111,7 +111,7 @@ public abstract class AbstractBitVector extends AbstractVector
}
@Override
public void fill(LispObject obj) throws ConditionThrowable
public void fill(LispObject obj)
{
if (obj instanceof Fixnum) {
switch (((Fixnum)obj).value) {
......@@ -140,7 +140,7 @@ public abstract class AbstractBitVector extends AbstractVector
}
@Override
public LispObject subseq(int start, int end) throws ConditionThrowable
public LispObject subseq(int start, int end)
{
SimpleBitVector v = new SimpleBitVector(end - start);
int i = start, j = 0;
......@@ -177,7 +177,7 @@ public abstract class AbstractBitVector extends AbstractVector
}
@Override
public String writeToString() throws ConditionThrowable
public String writeToString()
{
final LispThread thread = LispThread.currentThread();
final int length = length();
......@@ -198,13 +198,13 @@ public abstract class AbstractBitVector extends AbstractVector
// Ignores fill pointer.
@Override
public LispObject AREF(LispObject index) throws ConditionThrowable
public LispObject AREF(LispObject index)
{
return AREF(Fixnum.getValue(index));
}
@Override
public LispObject reverse() throws ConditionThrowable
public LispObject reverse()
{
int length = length();
SimpleBitVector result = new SimpleBitVector(length);
......@@ -218,9 +218,9 @@ public abstract class AbstractBitVector extends AbstractVector
return result;
}
protected abstract int getBit(int index) throws ConditionThrowable;
protected abstract int getBit(int index);
protected abstract void setBit(int index) throws ConditionThrowable;
protected abstract void setBit(int index);
protected abstract void clearBit(int index) throws ConditionThrowable;
protected abstract void clearBit(int index);
}
......@@ -36,7 +36,7 @@ package org.armedbear.lisp;
public abstract class AbstractString extends AbstractVector
{
@Override
public LispObject typep(LispObject type) throws ConditionThrowable
public LispObject typep(LispObject type)
{
if (type instanceof Symbol) {
if (type == Symbol.STRING)
......@@ -81,14 +81,14 @@ public abstract class AbstractString extends AbstractVector
return this;
}
public abstract void fill(char c) throws ConditionThrowable;
public abstract void fill(char c);
public abstract char charAt(int index) throws ConditionThrowable;
public abstract char charAt(int index);
public abstract void setCharAt(int index, char c) throws ConditionThrowable;
public abstract void setCharAt(int index, char c);
public final String writeToString(int beginIndex, int endIndex)
throws ConditionThrowable
{
if (beginIndex < 0)
beginIndex = 0;
......@@ -114,7 +114,7 @@ public abstract class AbstractString extends AbstractVector
}
@Override
public String writeToString() throws ConditionThrowable
public String writeToString()
{
return writeToString(0, length());
}
......
......@@ -35,7 +35,7 @@ package org.armedbear.lisp;
public abstract class AbstractVector extends AbstractArray
{
@Override
public LispObject typep(LispObject type) throws ConditionThrowable
public LispObject typep(LispObject type)
{
if (type == Symbol.VECTOR)
return T;
......@@ -61,7 +61,7 @@ public abstract class AbstractVector extends AbstractArray
}
@Override
public boolean equalp(LispObject obj) throws ConditionThrowable
public boolean equalp(LispObject obj)
{
if (obj instanceof AbstractVector)
{
......@@ -89,7 +89,7 @@ public abstract class AbstractVector extends AbstractArray
}
@Override
public final int getDimension(int n) throws ConditionThrowable
public final int getDimension(int n)
{
if (n != 0)
{
......@@ -108,9 +108,9 @@ public abstract class AbstractVector extends AbstractArray
public abstract int capacity();
public abstract LispObject subseq(int start, int end) throws ConditionThrowable;
public abstract LispObject subseq(int start, int end);
public LispObject deleteEq(LispObject item) throws ConditionThrowable
public LispObject deleteEq(LispObject item)
{
final int limit = length();
int i = 0;
......@@ -127,7 +127,7 @@ public abstract class AbstractVector extends AbstractArray
return this;
}
public LispObject deleteEql(LispObject item) throws ConditionThrowable
public LispObject deleteEql(LispObject item)
{
final int limit = length();
int i = 0;
......@@ -144,16 +144,16 @@ public abstract class AbstractVector extends AbstractArray
return this;
}
public abstract void shrink(int n) throws ConditionThrowable;
public abstract void shrink(int n);
public int checkIndex(int index) throws ConditionThrowable
public int checkIndex(int index)
{
if (index < 0 || index >= capacity())
badIndex(index, capacity());
return index;
}
protected void badIndex(int index, int limit) throws ConditionThrowable
protected void badIndex(int index, int limit)
{
FastStringBuffer sb = new FastStringBuffer("Invalid array index ");
sb.append(index);
......@@ -173,12 +173,12 @@ public abstract class AbstractVector extends AbstractArray
}
public void setFillPointer(int n) throws ConditionThrowable
public void setFillPointer(int n)
{
noFillPointer();
}
public void setFillPointer(LispObject obj) throws ConditionThrowable
public void setFillPointer(LispObject obj)
{
noFillPointer();
}
......@@ -189,10 +189,10 @@ public abstract class AbstractVector extends AbstractArray
}
@Override
public abstract LispObject reverse() throws ConditionThrowable;
public abstract LispObject reverse();
@Override
public LispObject nreverse() throws ConditionThrowable
public LispObject nreverse()
{
int i = 0;
int j = length() - 1;
......@@ -208,7 +208,7 @@ public abstract class AbstractVector extends AbstractArray
}
@Override
public String writeToString() throws ConditionThrowable
public String writeToString()
{
final LispThread thread = LispThread.currentThread();
if (Symbol.PRINT_READABLY.symbolValue(thread) != NIL)
......@@ -300,24 +300,24 @@ public abstract class AbstractVector extends AbstractArray
public abstract AbstractArray adjustArray(int size,
LispObject initialElement,
LispObject initialContents)
throws ConditionThrowable;
;
public abstract AbstractArray adjustArray(int size,
AbstractArray displacedTo,
int displacement)
throws ConditionThrowable;
;
public AbstractArray adjustArray(int[] dims,
LispObject initialElement,
LispObject initialContents)
throws ConditionThrowable {
{
return adjustArray(dims[0], initialElement, initialContents);
}
public AbstractArray adjustArray(int[] dims,
AbstractArray displacedTo,
int displacement)
throws ConditionThrowable {
{
return adjustArray(dims[0], displacedTo, displacement);
}
}
......@@ -35,19 +35,19 @@ package org.armedbear.lisp;
public class ArithmeticError extends LispError
{
protected ArithmeticError(LispClass cls) throws ConditionThrowable
protected ArithmeticError(LispClass cls)
{
super(cls);
}
public ArithmeticError(LispObject initArgs) throws ConditionThrowable
public ArithmeticError(LispObject initArgs)
{
super(StandardClass.ARITHMETIC_ERROR);
initialize(initArgs);
}
@Override
protected void initialize(LispObject initArgs) throws ConditionThrowable
protected void initialize(LispObject initArgs)
{
super.initialize(initArgs);
LispObject operation = NIL;
......@@ -67,7 +67,7 @@ public class ArithmeticError extends LispError
setOperands(operands);
}
public ArithmeticError(String message) throws ConditionThrowable
public ArithmeticError(String message)
{
super(StandardClass.ARITHMETIC_ERROR);
setFormatControl(message);
......@@ -89,7 +89,7 @@ public class ArithmeticError extends LispError
}
@Override
public LispObject typep(LispObject type) throws ConditionThrowable
public LispObject typep(LispObject type)
{
if (type == Symbol.ARITHMETIC_ERROR)
return T;
......@@ -98,24 +98,24 @@ public class ArithmeticError extends LispError
return super.typep(type);
}
private final LispObject getOperation() throws ConditionThrowable
private final LispObject getOperation()
{
return getInstanceSlotValue(Symbol.OPERATION);
}
private final void setOperation(LispObject operation)
throws ConditionThrowable
{
setInstanceSlotValue(Symbol.OPERATION, operation);
}
private final LispObject getOperands() throws ConditionThrowable
private final LispObject getOperands()
{
return getInstanceSlotValue(Symbol.OPERANDS);
}
private final void setOperands(LispObject operands)
throws ConditionThrowable
{
setInstanceSlotValue(Symbol.OPERANDS, operands);
}
......@@ -125,7 +125,7 @@ public class ArithmeticError extends LispError
new Primitive("arithmetic-error-operation", "condition")
{
@Override
public LispObject execute(LispObject arg) throws ConditionThrowable
public LispObject execute(LispObject arg)
{
if (arg instanceof ArithmeticError) {
return ((ArithmeticError)arg).getOperation();
......@@ -140,7 +140,7 @@ public class ArithmeticError extends LispError
new Primitive("arithmetic-error-operands", "condition")
{
@Override
public LispObject execute(LispObject arg) throws ConditionThrowable
public LispObject execute(LispObject arg)
{
if (arg instanceof ArithmeticError) {
return ((ArithmeticError)arg).getOperands();
......
......@@ -99,7 +99,7 @@ public class Autoload extends Function
"org.armedbear.lisp.".concat(className)));
}
public void load() throws ConditionThrowable
public void load()
{
if (className != null) {
final LispThread thread = LispThread.currentThread();
......@@ -156,14 +156,14 @@ public class Autoload extends Function
}
@Override
public LispObject execute() throws ConditionThrowable
public LispObject execute()
{
load();
return symbol.execute();
}
@Override
public LispObject execute(LispObject arg) throws ConditionThrowable
public LispObject execute(LispObject arg)
{
load();
return symbol.execute(arg);
......@@ -171,7 +171,7 @@ public class Autoload extends Function
@Override
public LispObject execute(LispObject first, LispObject second)
throws ConditionThrowable
{
load();
return symbol.execute(first, second);
......@@ -180,7 +180,7 @@ public class Autoload extends Function
@Override
public LispObject execute(LispObject first, LispObject second,
LispObject third)
throws ConditionThrowable
{
load();
return symbol.execute(first, second, third);
......@@ -189,7 +189,7 @@ public class Autoload extends Function
@Override
public LispObject execute(LispObject first, LispObject second,
LispObject third, LispObject fourth)
throws ConditionThrowable
{
load();
return symbol.execute(first, second, third, fourth);
......@@ -199,7 +199,7 @@ public class Autoload extends Function
public LispObject execute(LispObject first, LispObject second,
LispObject third, LispObject fourth,
LispObject fifth)
throws ConditionThrowable
{
load();
return symbol.execute(first, second, third, fourth, fifth);
......@@ -209,7 +209,7 @@ public class Autoload extends Function
public LispObject execute(LispObject first, LispObject second,
LispObject third, LispObject fourth,
LispObject fifth, LispObject sixth)
throws ConditionThrowable
{
load();
return symbol.execute(first, second, third, fourth, fifth, sixth);
......@@ -220,7 +220,7 @@ public class Autoload extends Function
LispObject third, LispObject fourth,
LispObject fifth, LispObject sixth,
LispObject seventh)
throws ConditionThrowable
{
load();
return symbol.execute(first, second, third, fourth, fifth, sixth,
......@@ -232,7 +232,7 @@ public class Autoload extends Function
LispObject third, LispObject fourth,
LispObject fifth, LispObject sixth,
LispObject seventh, LispObject eighth)
throws ConditionThrowable
{
load();
return symbol.execute(first, second, third, fourth, fifth, sixth,
......@@ -240,14 +240,14 @@ public class Autoload extends Function
}
@Override
public LispObject execute(LispObject[] args) throws ConditionThrowable
public LispObject execute(LispObject[] args)
{
load();
return symbol.execute(args);
}
@Override
public String writeToString() throws ConditionThrowable
public String writeToString()
{
StringBuffer sb = new StringBuffer("#<AUTOLOAD ");
sb.append(symbol.writeToString());
......@@ -270,7 +270,7 @@ public class Autoload extends Function
new Primitive("autoload", PACKAGE_EXT, true)
{
@Override
public LispObject execute(LispObject first) throws ConditionThrowable
public LispObject execute(LispObject first)
{
if (first instanceof Symbol) {
Symbol symbol = (Symbol) first;
......@@ -288,7 +288,7 @@ public class Autoload extends Function
}
@Override
public LispObject execute(LispObject first, LispObject second)
throws ConditionThrowable
{
final String fileName = second.getStringValue();
if (first instanceof Symbol) {
......@@ -313,7 +313,7 @@ public class Autoload extends Function
new Primitive("resolve", PACKAGE_EXT, true, "symbol")
{
@Override
public LispObject execute(LispObject arg) throws ConditionThrowable
public LispObject execute(LispObject arg)
{
Symbol symbol = checkSymbol(arg);
LispObject fun = symbol.getSymbolFunction();
......@@ -331,7 +331,7 @@ public class Autoload extends Function
new Primitive("autoloadp", PACKAGE_EXT, true, "symbol")
{
@Override
public LispObject execute(LispObject arg) throws ConditionThrowable
public LispObject execute(LispObject arg)
{
if (arg instanceof Symbol) {
if (arg.getSymbolFunction() instanceof Autoload)
......
......@@ -46,7 +46,7 @@ public final class AutoloadMacro extends Autoload
}
private static void installAutoloadMacro(Symbol symbol, String fileName)
throws ConditionThrowable
{
AutoloadMacro am = new AutoloadMacro(symbol, fileName);
if (symbol.getSymbolFunction() instanceof SpecialOperator)
......@@ -56,13 +56,13 @@ public final class AutoloadMacro extends Autoload
}
@Override
public void load() throws ConditionThrowable
public void load()
{
Load.loadSystemFile(getFileName(), true);
}
@Override
public String writeToString() throws ConditionThrowable
public String writeToString()
{
StringBuffer sb = new StringBuffer("#<AUTOLOAD-MACRO ");
sb.append(getSymbol().writeToString());
......@@ -77,7 +77,7 @@ public final class AutoloadMacro extends Autoload
new Primitive("autoload-macro", PACKAGE_EXT, true)
{
@Override
public LispObject execute(LispObject first) throws ConditionThrowable
public LispObject execute(LispObject first)
{
if (first instanceof Symbol) {
Symbol symbol = (Symbol) first;
......@@ -95,7 +95,7 @@ public final class AutoloadMacro extends Autoload
}
@Override
public LispObject execute(LispObject first, LispObject second)
throws ConditionThrowable
{
final String fileName = second.getStringValue();
if (first instanceof Symbol) {
......
......@@ -47,7 +47,7 @@ public final class BasicVector_UnsignedByte16 extends AbstractVector
}
private BasicVector_UnsignedByte16(LispObject[] array)
throws ConditionThrowable