From 07b7dfd1a70ba222b899d9813f8c449dbf3b785f Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:07:28 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835124 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/test/exceptions/Checked.java | 58 ---------- .../sca/test/exceptions/ExceptionHandler.java | 32 ------ .../sca/test/exceptions/ExceptionThrower.java | 31 ------ .../tuscany/sca/test/exceptions/UnChecked.java | 57 ---------- .../test/exceptions/impl/ExceptionHandlerImpl.java | 120 --------------------- .../test/exceptions/impl/ExceptionThrowerImpl.java | 48 --------- 6 files changed, 346 deletions(-) delete mode 100644 branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java delete mode 100644 branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java delete mode 100644 branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java delete mode 100644 branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java delete mode 100644 branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java delete mode 100644 branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java (limited to 'branches/sca-java-1.1/itest/exceptions/src/main/java') diff --git a/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java b/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java deleted file mode 100644 index b95b0ccb31..0000000000 --- a/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - -package org.apache.tuscany.sca.test.exceptions; - - -public class Checked extends Exception { - private static final long serialVersionUID = -129752837478357452L; - - /** - * - */ - public Checked() { - - } - - /** - * @param message - */ - public Checked(String message) { - super(message); - - } - - /** - * @param cause - */ - public Checked(Throwable cause) { - super(cause); - - } - - /** - * @param message - * @param cause - */ - public Checked(String message, Throwable cause) { - super(message, cause); - - } - -} diff --git a/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java b/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java deleted file mode 100644 index 0d14240513..0000000000 --- a/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - -package org.apache.tuscany.sca.test.exceptions; - -public interface ExceptionHandler { - - public abstract void testing(); - - public abstract Checked getTheBad(); - - public abstract String getTheGood(); - - public abstract UnChecked getTheUgly(); - -} \ No newline at end of file diff --git a/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java b/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java deleted file mode 100644 index 80073e7679..0000000000 --- a/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - -package org.apache.tuscany.sca.test.exceptions; - -public interface ExceptionThrower { - public static final String SO_THEY_SAY = "All is good that ends good."; - - public String theGood() throws org.apache.tuscany.sca.test.exceptions.Checked; - - public String theBad() throws org.apache.tuscany.sca.test.exceptions.Checked; - - public String theUgly() throws org.apache.tuscany.sca.test.exceptions.Checked; - -} diff --git a/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java b/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java deleted file mode 100644 index 453528444d..0000000000 --- a/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - -package org.apache.tuscany.sca.test.exceptions; - -public class UnChecked extends RuntimeException { - private static final long serialVersionUID = -1318118082838092244L; - - /** - * - */ - public UnChecked() { - - } - - /** - * @param message - */ - public UnChecked(String message) { - super(message); - - } - - /** - * @param cause - */ - public UnChecked(Throwable cause) { - super(cause); - - } - - /** - * @param message - * @param cause - */ - public UnChecked(String message, Throwable cause) { - super(message, cause); - - } - -} diff --git a/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java b/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java deleted file mode 100644 index 32a23c5e7d..0000000000 --- a/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - -package org.apache.tuscany.sca.test.exceptions.impl; - -import org.apache.tuscany.sca.test.exceptions.Checked; -import org.apache.tuscany.sca.test.exceptions.ExceptionHandler; -import org.apache.tuscany.sca.test.exceptions.ExceptionThrower; -import org.apache.tuscany.sca.test.exceptions.UnChecked; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -@Scope("COMPOSITE") -public class ExceptionHandlerImpl implements ExceptionHandler { - static final String INIT = "INIT"; - - private ExceptionThrower exceptionThrower; - - private String theGood; - - private Checked theBad; - - private UnChecked theUgly; - - /* - * (non-Javadoc) - * - * @see org.apache.tuscany.sca.test.exceptions.impl.ExceptionHandler#testing() - */ - public void testing() { - - assert exceptionThrower != null : "'exceptionThrower' never wired"; - String result = INIT; - try { - theGood = result = exceptionThrower.theGood(); - assert result == ExceptionThrower.SO_THEY_SAY; - } catch (Throwable e) { - assert result == INIT; - assert false; - e.printStackTrace(); - } - - result = INIT; - try { - result = exceptionThrower.theBad(); - // incredible - assert false : "Expected 'Check' Exception"; - - } catch (Checked e) { - // This is good... - assert result == INIT; - theBad = e; - } catch (Throwable t) { - // This is not so good. - t.printStackTrace(); - assert result == INIT; - assert false : "Got wrong exception '" + t.getClass().getName(); - } - - result = INIT; - try { - result = exceptionThrower.theUgly(); - // incredible - assert false : "Expected 'UnCheck' Exception"; - - } catch (Checked e) { - // This is not so good... - assert false : "Got wrong exception '" + e.getClass().getName(); - assert result == INIT; - } catch (UnChecked e) { - theUgly = e; - - } catch (Throwable t) { - // This is not good. - assert false; - assert result == INIT; - - System.out.println(ExceptionThrower.SO_THEY_SAY + " " + INIT); - } - - } - - @Reference - public void setExceptionThrower(ExceptionThrower exceptionThrower) { - this.exceptionThrower = exceptionThrower; - } - - public String getTheGood() { - return theGood; - } - - public Checked getTheBad() { - return theBad; - } - - public UnChecked getTheUgly() { - return theUgly; - } - - public ExceptionThrower getExceptionThrower() { - return exceptionThrower; - } - -} diff --git a/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java b/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java deleted file mode 100644 index 067615eed8..0000000000 --- a/branches/sca-java-1.1/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ - -package org.apache.tuscany.sca.test.exceptions.impl; - -import org.apache.tuscany.sca.test.exceptions.Checked; -import org.apache.tuscany.sca.test.exceptions.ExceptionThrower; -import org.apache.tuscany.sca.test.exceptions.UnChecked; - -/** - * - * - */ -public class ExceptionThrowerImpl implements ExceptionThrower { - - public String theBad() throws Checked { - - throw new Checked("theBad"); - - } - - public String theGood() throws Checked { - - return SO_THEY_SAY; - } - - public String theUgly() throws Checked { - - throw new UnChecked("theUgly"); - } - -} -- cgit v1.2.3