Author: rich
Date: Thu Mar 24 17:37:21 2005
New Revision: 158976
URL: http://svn.apache.org/viewcvs?view=rev&rev=158976
Log:
- Fix from Carlin Rogers for http://nagoya.apache.org/jira/browse/BEEHIVE-451 :
Overriding Exception Handler no longer works since rev157888
- Fixed an assertion error at
org.apache.beehive.netui.compiler.typesystem.impl.WrapperFactory:125 that
occurred when processing an annotated field of an unresolvable type.
tests: netui bvt (WinXP)
BB: self (linux)
Added:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/ErrorTypeImpl.java
Modified:
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/CompilerUtils.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/WrapperFactory.java
Modified:
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/CompilerUtils.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/CompilerUtils.java?view=diff&r1=158975&r2=158976
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/CompilerUtils.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/CompilerUtils.java
Thu Mar 24 17:37:21 2005
@@ -411,11 +411,11 @@
if ( existingMethodParams.length ==
methodParams.length )
{
isDuplicate = true;
- int methodParamsI = 0;
+
for ( int k = 0; k <
existingMethodParams.length; ++k )
{
- ParameterDeclaration
existingMethodParam = existingMethodParams[k];
- ParameterDeclaration methodParam =
methodParams[ methodParamsI ];
+ ParameterDeclaration
existingMethodParam = existingMethodParams[ k ];
+ ParameterDeclaration methodParam =
methodParams[ k ];
if ( !
existingMethodParam.getType().equals( methodParam.getType() ) )
{
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/WrapperFactory.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/WrapperFactory.java?view=diff&r1=158975&r2=158976
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/WrapperFactory.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/WrapperFactory.java
Thu Mar 24 17:37:21 2005
@@ -26,6 +26,7 @@
import
org.apache.beehive.netui.compiler.typesystem.impl.type.PrimitiveTypeImpl;
import org.apache.beehive.netui.compiler.typesystem.impl.type.TypeVariableImpl;
import org.apache.beehive.netui.compiler.typesystem.impl.type.VoidTypeImpl;
+import org.apache.beehive.netui.compiler.typesystem.impl.type.ErrorTypeImpl;
import org.apache.beehive.netui.compiler.typesystem.type.AnnotationType;
import org.apache.beehive.netui.compiler.typesystem.type.ClassType;
import org.apache.beehive.netui.compiler.typesystem.type.DeclaredType;
@@ -119,12 +120,25 @@
{
return getClassType( ( com.sun.mirror.type.ClassType ) delegate );
}
- else
+ else if ( delegate instanceof com.sun.mirror.type.InterfaceType )
{
- assert delegate instanceof com.sun.mirror.type.InterfaceType :
delegate.getClass().getName();
return getInterfaceType( ( com.sun.mirror.type.InterfaceType )
delegate );
}
+
+ //
+ // This must be an error type, which is indicated by a DeclaredType
with no type declaration.
+ //
+ assert delegate.getDeclaration() == null :
+ "expected error type, got " + delegate.toString() + " with
declaration " + delegate.getDeclaration();
+ return getErrorType( delegate );
+ }
+
+ public DeclaredType getErrorType( com.sun.mirror.type.DeclaredType
delegate )
+ {
+ if ( delegate == null ) return null;
+ return new ErrorTypeImpl( delegate );
}
+
public ClassType getClassType( com.sun.mirror.type.ClassType delegate )
{
@@ -316,13 +330,13 @@
{
if ( o == null ) return null;
- if ( o instanceof com.sun.mirror.declaration.Declaration )
+ if ( o instanceof com.sun.mirror.type.TypeMirror )
{
- return getDeclaration( ( com.sun.mirror.declaration.Declaration )
o );
+ return getTypeMirror( ( com.sun.mirror.type.TypeMirror ) o );
}
- else if ( o instanceof com.sun.mirror.type.TypeMirror )
+ else if ( o instanceof com.sun.mirror.declaration.Declaration )
{
- return getTypeMirror( ( com.sun.mirror.type.TypeMirror ) o );
+ return getDeclaration( ( com.sun.mirror.declaration.Declaration )
o );
}
else if ( o instanceof com.sun.mirror.declaration.AnnotationMirror )
{
Added:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/ErrorTypeImpl.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/ErrorTypeImpl.java?view=auto&rev=158976
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/ErrorTypeImpl.java
(added)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/ErrorTypeImpl.java
Thu Mar 24 17:37:21 2005
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.netui.compiler.typesystem.impl.type;
+
+public class ErrorTypeImpl
+ extends DeclaredTypeImpl
+{
+ public ErrorTypeImpl( com.sun.mirror.type.DeclaredType delegate )
+ {
+ super( delegate );
+ }
+}
+
+