From e293cbbdf58532a4479e3e37516d5409a14eaa9b Mon Sep 17 00:00:00 2001 From: parrt Date: Tue, 4 Oct 2011 11:50:57 -0800 Subject: [PATCH] UnsupportedOperationException [git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9107] --- .../org/antlr/v4/runtime/tree/BaseASTAdaptor.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/runtime/Java/src/org/antlr/v4/runtime/tree/BaseASTAdaptor.java b/runtime/Java/src/org/antlr/v4/runtime/tree/BaseASTAdaptor.java index d21101eef..d844a27af 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/tree/BaseASTAdaptor.java +++ b/runtime/Java/src/org/antlr/v4/runtime/tree/BaseASTAdaptor.java @@ -29,9 +29,14 @@ package org.antlr.v4.runtime.tree; -import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.RecognitionException; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.WritableToken; -import java.util.*; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** An ASTAdaptor that works with any BaseAST implementation. */ public abstract class BaseASTAdaptor implements ASTAdaptor { @@ -213,7 +218,7 @@ public abstract class BaseASTAdaptor implements ASTAdaptor { } public void setType(Object t, int type) { - throw new NoSuchMethodError("don't know enough about AST node"); + throw new UnsupportedOperationException("don't know enough about AST node"); } public String getText(Object t) { @@ -221,7 +226,7 @@ public abstract class BaseASTAdaptor implements ASTAdaptor { } public void setText(Object t, String text) { - throw new NoSuchMethodError("don't know enough about AST node"); + throw new UnsupportedOperationException("don't know enough about AST node"); } public Object getChild(Object t, int i) {