From: <jsa...@us...> - 2008-10-28 13:51:04
|
Revision: 45 http://flexotask.svn.sourceforge.net/flexotask/?rev=45&view=rev Author: jsauerbach Date: 2008-10-28 13:51:00 +0000 (Tue, 28 Oct 2008) Log Message: ----------- Get rid of AnalysisException clause that never actually happens to simplify catch clauses. Modified Paths: -------------- trunk/flexotask/src/com/ibm/realtime/flexotask/validation/FieldViolation.java trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/builder/FlexotaskBuilder.java Modified: trunk/flexotask/src/com/ibm/realtime/flexotask/validation/FieldViolation.java =================================================================== --- trunk/flexotask/src/com/ibm/realtime/flexotask/validation/FieldViolation.java 2008-10-28 13:49:20 UTC (rev 44) +++ trunk/flexotask/src/com/ibm/realtime/flexotask/validation/FieldViolation.java 2008-10-28 13:51:00 UTC (rev 45) @@ -13,7 +13,6 @@ */ package com.ibm.realtime.flexotask.validation; -import com.ibm.realtime.analysis.AnalysisException; import com.ibm.realtime.analysis.FieldWrapper; /** @@ -45,9 +44,8 @@ * Returns the class in which the field violating the * type rules is declared. * @return the class object of the defining class. - * @throws AnalysisException */ - public Class getDefiningClass() throws AnalysisException { + public Class getDefiningClass() { return ((FieldWrapper) target).getDefiningClass(); } Modified: trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/builder/FlexotaskBuilder.java =================================================================== --- trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/builder/FlexotaskBuilder.java 2008-10-28 13:49:20 UTC (rev 44) +++ trunk/flexotask-development/src/com/ibm/realtime/flexotask/development/builder/FlexotaskBuilder.java 2008-10-28 13:51:00 UTC (rev 45) @@ -213,17 +213,12 @@ IResourceStatus.INTERNAL_ERROR, ee.getMessage(), ee)); } } else { - try { - FieldViolation fv = (FieldViolation) entry; - IType type = jproj.findType(Utils.convertInnerclass(fv - .getDefiningClass().getName())); - IField ifield = type.getField(fv.getFieldName()); - reportTypeRuleViolation(fv.getDefiningClass(), entry, Utils - .getLineNumber(ifield)); - } catch (AnalysisException ee) { - throw new CoreException(new Status(IStatus.ERROR, BUILDER_ID, - IResourceStatus.INTERNAL_ERROR, ee.getMessage(), ee)); - } + FieldViolation fv = (FieldViolation) entry; + IType type = jproj.findType(Utils.convertInnerclass(fv + .getDefiningClass().getName())); + IField ifield = type.getField(fv.getFieldName()); + reportTypeRuleViolation(fv.getDefiningClass(), entry, Utils + .getLineNumber(ifield)); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |