View Javadoc
1 // Copyright (c) 2003, Chad Woolley, All rights reserved. 2 3 package org.throwableutil; 4 5 /*** 6 * This class is the template for a utility to throw checked exceptions as 7 * runtime exceptions. It will be modified with BCEL to ignore the checking of 8 * checked exceptions. 9 * 10 * @author Chad Woolley 11 * @version $Revision: 1.1 $ 12 */ 13 public class ThrowableUtilOrig { 14 /*** 15 * This method will throw any throwable which is passed in as an unchecked 16 * RuntimeException. Before deployment, this class will be modified with 17 * BCEL to remove the CHECKCAST instruction. 18 * 19 * @param throwable A Throwable which will be re-thrown as a 20 * RuntimeException 21 */ 22 public static void throwAsRuntime(Throwable throwable) { 23 throw (RuntimeException) throwable; 24 } 25 }

This page was automatically generated by Maven