aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1714062 - in /aries/trunk/transaction: transaction-blueprint/src/main/java/org/apache/aries/transaction/ transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/ transaction-testbundle/src/main/java/org/apache/aries/transa...
Date Thu, 12 Nov 2015 15:00:59 GMT
Author: cschneider
Date: Thu Nov 12 15:00:59 2015
New Revision: 1714062

URL: http://svn.apache.org/viewvc?rev=1714062&view=rev
Log:
[ARIES-1450] Fix some issues reported by sonar

Modified:
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/ComponentTxData.java
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TransactionAttribute.java
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TransactionToken.java
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TxInterceptorImpl.java
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/AnnotationProcessor.java
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/TxNamespaceHandler.java
    aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/Connector.java
    aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/NotSupportedTestBeanImpl.java
    aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/TestBeanImpl.java

Modified: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/ComponentTxData.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/ComponentTxData.java?rev=1714062&r1=1714061&r2=1714062&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/ComponentTxData.java
(original)
+++ aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/ComponentTxData.java
Thu Nov 12 15:00:59 2015
@@ -8,41 +8,58 @@ import java.util.Map;
 import javax.transaction.Transactional;
 import javax.transaction.Transactional.TxType;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public class ComponentTxData {
+    private static final Logger LOG = LoggerFactory.getLogger(ComponentTxData.class);
     private static final int BANNED_MODIFIERS = Modifier.PRIVATE | Modifier.STATIC;
     
     Map<Method, TxType> txMap = new HashMap<Method, Transactional.TxType>();
     private boolean isTransactional;
     private Class<?> beanClass;
     
-    TxType getEffectiveType(Method m) {
-        try {
-            Method effectiveMethod = beanClass.getDeclaredMethod(m.getName(), m.getParameterTypes());
-            return txMap.get(effectiveMethod);
-        } catch (NoSuchMethodException e) {
-            try {
-                Method effectiveMethod = beanClass.getMethod(m.getName(), m.getParameterTypes());
-                return txMap.get(effectiveMethod);
-            } catch (NoSuchMethodException e1) {
-                return null;
-            } catch (SecurityException e1) {
-                throw new RuntimeException("Security exception when determining effective
method", e1);
-            }
-        } catch (SecurityException e) {
-            throw new RuntimeException("Security exception when determining effective method",
e);
-        }
-    }
-    
     public ComponentTxData(Class<?> c) {
         beanClass = c;
         isTransactional = false;
         // Check class hierarchy
-        while (c != Object.class) {
-            isTransactional |= parseTxData(c);
-            for (Class<?> iface : c.getInterfaces()) {
+        Class<?> current = c;
+        while (current != Object.class) {
+            isTransactional |= parseTxData(current);
+            for (Class<?> iface : current.getInterfaces()) {
                 isTransactional |= parseTxData(iface);
             }
-            c = c.getSuperclass();
+            current = current.getSuperclass();
+        }
+    }
+    
+    TxType getEffectiveType(Method m) {
+        if (txMap.containsKey(m)) {
+                return txMap.get(m);
+        }
+        try {
+            Method effectiveMethod = beanClass.getDeclaredMethod(m.getName(), m.getParameterTypes());
+            TxType txType = txMap.get(effectiveMethod);
+            txMap.put(m, txType);
+            return txType;
+        } catch (NoSuchMethodException e) { // NOSONAR
+            return getFromMethod(m);
+        } catch (SecurityException e) {
+            throw new RuntimeException("Security exception when determining effective method",
e); // NOSONAR
+        }
+    }
+
+    private TxType getFromMethod(Method m) {
+        try {
+            Method effectiveMethod = beanClass.getMethod(m.getName(), m.getParameterTypes());
+            TxType txType = txMap.get(effectiveMethod);
+            txMap.put(m, txType);
+            return txType;
+        } catch (NoSuchMethodException e1) {
+            LOG.debug("No method found when scanning for transactions", e1);
+            return null;
+        } catch (SecurityException e1) {
+            throw new RuntimeException("Security exception when determining effective method",
e1); // NOSONAR
         }
     }
 
@@ -63,18 +80,18 @@ public class ComponentTxData {
                    txMap.put(m, defaultType);
                 }
             } catch(IllegalStateException e) {
-                // don't break bean creation due to invalid transaction attribute
+                LOG.warn("Invalid transaction annoation found", e);
             }
         }
 
         return shouldAssignInterceptor;
     }
 
-    private TxType getType(Transactional jtaT) {
+    private static TxType getType(Transactional jtaT) {
         return (jtaT != null) ? jtaT.value() : null;
     }
 
-    private void assertAllowedModifier(Method m) {
+    private static void assertAllowedModifier(Method m) {
         if ((m.getModifiers() & BANNED_MODIFIERS) != 0) {
             throw new IllegalArgumentException("Transaction annotation is not allowed on
private or static method " + m);
         }

Modified: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TransactionAttribute.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TransactionAttribute.java?rev=1714062&r1=1714061&r2=1714062&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TransactionAttribute.java
(original)
+++ aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TransactionAttribute.java
Thu Nov 12 15:00:59 2015
@@ -29,9 +29,13 @@ import javax.transaction.Transaction;
 import javax.transaction.TransactionManager;
 import javax.transaction.Transactional.TxType;
 
+/**
+ * TODO This is copied from aries transaction. We could share this code
+ */
 public enum TransactionAttribute {
     MANDATORY
     {
+      @Override
       public TransactionToken begin(TransactionManager man) throws SystemException
       {
         if (man.getStatus() == Status.STATUS_NO_TRANSACTION) {
@@ -43,6 +47,7 @@ public enum TransactionAttribute {
     },
     NEVER
     {
+      @Override
       public TransactionToken begin(TransactionManager man) throws SystemException
       {
         if (man.getStatus() == Status.STATUS_ACTIVE) {
@@ -54,6 +59,7 @@ public enum TransactionAttribute {
     },
     NOT_SUPPORTED
     {
+      @Override
       public TransactionToken begin(TransactionManager man) throws SystemException
       {
         if (man.getStatus() == Status.STATUS_ACTIVE) {
@@ -63,8 +69,9 @@ public enum TransactionAttribute {
         return new TransactionToken(null, null, NOT_SUPPORTED);
       }
 
+      @Override
       public void finish(TransactionManager man, TransactionToken tranToken) throws SystemException,
-          InvalidTransactionException, IllegalStateException
+          InvalidTransactionException
       {
         Transaction tran = tranToken.getSuspendedTransaction();
         if (tran != null) {
@@ -74,6 +81,7 @@ public enum TransactionAttribute {
     },
     REQUIRED
     {
+      @Override
       public TransactionToken begin(TransactionManager man) throws SystemException, NotSupportedException
       {
         if (man.getStatus() == Status.STATUS_NO_TRANSACTION) {
@@ -84,8 +92,9 @@ public enum TransactionAttribute {
         return new TransactionToken(man.getTransaction(), null, REQUIRED);
       }
 
+      @Override
       public void finish(TransactionManager man, TransactionToken tranToken) throws SystemException,
-          InvalidTransactionException, IllegalStateException, SecurityException, RollbackException,
+          InvalidTransactionException, RollbackException,
           HeuristicMixedException, HeuristicRollbackException
       {
         if (tranToken.isCompletionAllowed()) {
@@ -99,8 +108,9 @@ public enum TransactionAttribute {
     },
     REQUIRES_NEW
     {
+      @Override
       public TransactionToken begin(TransactionManager man) throws SystemException, NotSupportedException,
-          InvalidTransactionException, IllegalStateException
+          InvalidTransactionException
       {
          Transaction suspendedTransaction = (man.getStatus() == Status.STATUS_ACTIVE) ? man.suspend()
: null;
 
@@ -116,8 +126,9 @@ public enum TransactionAttribute {
         return new TransactionToken(man.getTransaction(), suspendedTransaction, REQUIRES_NEW,
true);
       }
 
+      @Override
       public void finish(TransactionManager man, TransactionToken tranToken) throws SystemException,
-          InvalidTransactionException, IllegalStateException, SecurityException, RollbackException,
+          InvalidTransactionException, RollbackException,
           HeuristicMixedException, HeuristicRollbackException
       {
         if (tranToken.isCompletionAllowed()) {
@@ -136,8 +147,9 @@ public enum TransactionAttribute {
     },
     SUPPORTS
     {
+      @Override
       public TransactionToken begin(TransactionManager man) throws SystemException, NotSupportedException,
-          InvalidTransactionException, IllegalStateException
+          InvalidTransactionException
       {
           if (man.getStatus() == Status.STATUS_ACTIVE) {
               return new TransactionToken(man.getTransaction(), null, SUPPORTS);
@@ -151,17 +163,16 @@ public enum TransactionAttribute {
     {
       return valueOf(type.name());
     }
-
-    public TransactionToken begin(TransactionManager man) throws SystemException, NotSupportedException,
-        InvalidTransactionException, IllegalStateException
+    
+    public TransactionToken begin(TransactionManager man) throws SystemException, NotSupportedException,
InvalidTransactionException // NOSONAR
     {
       return null;
     }
 
-    public void finish(TransactionManager man, TransactionToken tranToken) throws SystemException,
-        InvalidTransactionException, IllegalStateException, SecurityException, RollbackException,
+    public void finish(TransactionManager man, TransactionToken tranToken) throws SystemException,
// NOSONAR
+        InvalidTransactionException, RollbackException,
         HeuristicMixedException, HeuristicRollbackException
     {
-
+        // No operation by default
     }
 }

Modified: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TransactionToken.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TransactionToken.java?rev=1714062&r1=1714061&r2=1714062&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TransactionToken.java
(original)
+++ aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TransactionToken.java
Thu Nov 12 15:00:59 2015
@@ -53,10 +53,18 @@ public class TransactionToken
        return suspendedTransaction;
    }
 
+   public void setSuspendedTransaction(Transaction suspendedTransaction) {
+       this.suspendedTransaction = suspendedTransaction;
+   }
+
    public TransactionAttribute getTransactionAttribute() {
        return transactionAttribute;
    }
 
+   public void setTransactionStrategy(TransactionAttribute transactionAttribute) {
+       this.transactionAttribute = transactionAttribute;
+   }
+
    public boolean isCompletionAllowed() {
        return isCompletionAllowed;
    }

Modified: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TxInterceptorImpl.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TxInterceptorImpl.java?rev=1714062&r1=1714061&r2=1714062&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TxInterceptorImpl.java
(original)
+++ aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/TxInterceptorImpl.java
Thu Nov 12 15:00:59 2015
@@ -46,10 +46,12 @@ public class TxInterceptorImpl implement
         this.txData = txData;
     }
 
+    @Override
     public int getRank() {
         return 1; // Higher rank than jpa interceptor to make sure transaction is started
first
     }
 
+    @Override
     public Object preCall(ComponentMetadata cm, Method m, Object... parameters) throws Throwable
{
         final TxType type = txData.getEffectiveType(m);
         if (type == null) {
@@ -66,6 +68,7 @@ public class TxInterceptorImpl implement
         return token;
     }
 
+    @Override
     public void postCallWithException(ComponentMetadata cm, Method m, Throwable ex, Object
preCallToken) {
         if (!(preCallToken instanceof TransactionToken)) {
             return;
@@ -90,10 +93,8 @@ public class TxInterceptorImpl implement
         }
     }
 
-    private String getCmId(ComponentMetadata cm) {
-        return cm == null ? null : cm.getId();
-    }
 
+    @Override
     public void postCallWithReturn(ComponentMetadata cm, Method m, Object returnType, Object
preCallToken)
         throws Exception {
         LOGGER.debug("PostCallWithReturn for bean {}, method {}.", getCmId(cm), m);
@@ -101,24 +102,27 @@ public class TxInterceptorImpl implement
         if (preCallToken == null) {
             return;
         }
-        if (preCallToken instanceof TransactionToken) {
-            final TransactionToken token = (TransactionToken)preCallToken;
-            token.getCoordination().end();
-            try {
-                token.getTransactionAttribute().finish(tm, token);
-            } catch (Exception e) {
-                // We are throwing an exception, so we don't error it out
-                LOGGER.debug("Exception while completing transaction.", e);
-                RollbackException rbe = new javax.transaction.RollbackException();
-                rbe.addSuppressed(e);
-                throw rbe;
-            }
-        } else {
-            // TODO: what now?
+        if (!(preCallToken instanceof TransactionToken)) {
+            throw new IllegalStateException("Expected a TransactionToken from preCall but
got " + preCallToken);
+        }
+        final TransactionToken token = (TransactionToken)preCallToken;
+        token.getCoordination().end();
+        try {
+            token.getTransactionAttribute().finish(tm, token);
+        } catch (Exception e) {
+            // We are throwing an exception, so we don't error it out
+            LOGGER.debug("Exception while completing transaction.", e);
+            RollbackException rbe = new javax.transaction.RollbackException();
+            rbe.addSuppressed(e);
+            throw rbe;
         }
     }
+    
+    private static String getCmId(ComponentMetadata cm) {
+        return cm == null ? null : cm.getId();
+    }
 
-    private boolean isRollBackException(Throwable ex) {
+    private static boolean isRollBackException(Throwable ex) {
         return ex instanceof RuntimeException || ex instanceof Error;
     }
 

Modified: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/AnnotationProcessor.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/AnnotationProcessor.java?rev=1714062&r1=1714061&r2=1714062&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/AnnotationProcessor.java
(original)
+++ aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/AnnotationProcessor.java
Thu Nov 12 15:00:59 2015
@@ -47,16 +47,17 @@ public class AnnotationProcessor impleme
         this.coordinator = coordinator;
     }
 
-    public void afterDestroy(Object arg0, String arg1) {
-    }
-
-    public Object afterInit(Object arg0, String arg1, BeanCreator arg2, BeanMetadata arg3)
{
-        return arg0;
+    @Override
+    public void beforeDestroy(Object arg0, String arg1) {
+        // Nothing to be done
     }
 
-    public void beforeDestroy(Object arg0, String arg1) {
+    @Override
+    public void afterDestroy(Object arg0, String arg1) {
+        // Nothing to be done
     }
 
+    @Override
     public Object beforeInit(Object bean, String beanName, BeanCreator beanCreator, BeanMetadata
beanData) {
         ComponentTxData txData = new ComponentTxData(bean.getClass());
         if (txData.isTransactional()) {
@@ -65,5 +66,10 @@ public class AnnotationProcessor impleme
         }
         return bean;
     }
+    
+    @Override
+    public Object afterInit(Object arg0, String arg1, BeanCreator arg2, BeanMetadata arg3)
{
+        return arg0;
+    }
 
 }

Modified: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/TxNamespaceHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/TxNamespaceHandler.java?rev=1714062&r1=1714061&r2=1714062&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/TxNamespaceHandler.java
(original)
+++ aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/TxNamespaceHandler.java
Thu Nov 12 15:00:59 2015
@@ -19,6 +19,7 @@
 package org.apache.aries.transaction.parsing;
 
 import java.net.URL;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
@@ -52,20 +53,18 @@ public class TxNamespaceHandler implemen
         schemaMap.put(TX_NAMESPACE_URI, "transactionv20.xsd");
     }
 
-    private void parseElement(Element elt, ComponentMetadata cm, ParserContext pc)
+    private void parseElement(Element elt, ParserContext pc)
     {
         LOGGER.debug("parser asked to parse element {} ", elt.getNodeName());
 
         ComponentDefinitionRegistry cdr = pc.getComponentDefinitionRegistry();
         if ("enable".equals(elt.getLocalName())) {
             Node n = elt.getChildNodes().item(0);
-            if (n == null || Boolean.parseBoolean(n.getNodeValue())) {
-                //We need to register a bean processor to add annotation-based config
-                if (!cdr.containsComponentDefinition(ANNOTATION_PARSER_BEAN_NAME)) {
-                    LOGGER.debug("Enabling annotation based transactions");
-                    MutableBeanMetadata meta = createAnnotationParserBean(pc, cdr);
-                    cdr.registerComponentDefinition(meta);
-                }
+            if ((n == null || Boolean.parseBoolean(n.getNodeValue())) &&
+                !cdr.containsComponentDefinition(ANNOTATION_PARSER_BEAN_NAME)) {
+                LOGGER.debug("Enabling annotation based transactions");
+                MutableBeanMetadata meta = createAnnotationParserBean(pc, cdr);
+                cdr.registerComponentDefinition(meta);
             }
         }
     }
@@ -87,21 +86,23 @@ public class TxNamespaceHandler implemen
         return meta;
     }
 
+    @Override
     public ComponentMetadata decorate(Node node, ComponentMetadata cm, ParserContext pc)
     {
         if (node instanceof Element) {
-            Element elt = (Element) node;
-            parseElement(elt, cm, pc);
+            parseElement((Element) node, pc);
         }
         return cm;
     }
 
+    @Override
     public Metadata parse(Element elt, ParserContext pc)
     {
-        parseElement(elt, pc.getEnclosingComponent(), pc);
+        parseElement(elt, pc);
         return null;
     }
 
+    @Override
     public URL getSchemaLocation(String namespaceUri)
     {
         String xsdPath = schemaMap.get(namespaceUri);
@@ -117,9 +118,10 @@ public class TxNamespaceHandler implemen
     }
 
     @SuppressWarnings("rawtypes")
+    @Override
     public Set<Class> getManagedClasses()
     {
-        return null;
+        return Collections.emptySet();
     }
     
 }

Modified: aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/Connector.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/Connector.java?rev=1714062&r1=1714061&r2=1714062&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/Connector.java
(original)
+++ aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/Connector.java
Thu Nov 12 15:00:59 2015
@@ -71,12 +71,13 @@ public class Connector implements Counte
             stmt.executeUpdate(sql);
             conn.commit();
         } catch (Exception e) {
-            // Ignore
+            throw new RuntimeException(e.getMessage(), e); // NOSONAR
         } finally {
             safeClose(stmt);
         }
     }
     
+    @Override
     public int countRows() {
         PreparedStatement stmt = null;
         ResultSet rs = null;
@@ -87,7 +88,7 @@ public class Connector implements Counte
             rs.last();
             count = rs.getRow();
         } catch (Exception e) {
-            throw new RuntimeException(e.getMessage(), e);
+            throw new RuntimeException(e.getMessage(), e); // NOSONAR
         }
         finally {
             safeClose(rs);
@@ -119,33 +120,33 @@ public class Connector implements Counte
         safeClose(conn);
     }
 
-    public void safeClose(Connection conn) {
+    private static void safeClose(Connection conn) {
         if (conn != null) {
             try {
                 conn.close();
             } catch (SQLException e) {
-                // Ignore
+                throw new IllegalStateException(e);
             }
         }
     }
 
-    public void safeClose(Statement stmt) {
+    private static void safeClose(Statement stmt) {
         if (stmt != null) {
             try {
                 stmt.close();
             } catch (SQLException e) {
-                // Ignore
+                throw new IllegalStateException(e);
             }
         }
     }
     
 
-    private void safeClose(ResultSet rs) {
+    private static void safeClose(ResultSet rs) {
         if (rs != null) {
             try {
                 rs.close();
             } catch (SQLException e) {
-                // Ignore
+                throw new IllegalStateException(e);
             }
         }
     }

Modified: aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/NotSupportedTestBeanImpl.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/NotSupportedTestBeanImpl.java?rev=1714062&r1=1714061&r2=1714062&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/NotSupportedTestBeanImpl.java
(original)
+++ aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/NotSupportedTestBeanImpl.java
Thu Nov 12 15:00:59 2015
@@ -28,21 +28,18 @@ public class NotSupportedTestBeanImpl ex
     @Transactional(Transactional.TxType.NOT_SUPPORTED)
     @Override
     public void delegateInsertRow(String name, int value) throws SQLException {
-        // TODO Auto-generated method stub
         super.delegateInsertRow(name, value);
     }
 
     @Transactional(Transactional.TxType.NOT_SUPPORTED)
     @Override
     public void throwApplicationException() throws SQLException {
-        // TODO Auto-generated method stub
         super.throwApplicationException();
     }
 
     @Transactional(Transactional.TxType.NOT_SUPPORTED)
     @Override
     public void throwRuntimeException() {
-        // TODO Auto-generated method stub
         super.throwRuntimeException();
     }
 

Modified: aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/TestBeanImpl.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/TestBeanImpl.java?rev=1714062&r1=1714061&r2=1714062&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/TestBeanImpl.java
(original)
+++ aries/trunk/transaction/transaction-testbundle/src/main/java/org/apache/aries/transaction/test/impl/TestBeanImpl.java
Thu Nov 12 15:00:59 2015
@@ -26,9 +26,7 @@ public class TestBeanImpl implements Tes
     private Connector connector;
     private TestBean bean;
 
-    public TestBeanImpl() {
-    }
-
+    @Override
     public void insertRow(String name, int value, Exception e) throws SQLException {
         connector.insertRow(name, value);
         if (e instanceof SQLException) { 
@@ -38,16 +36,19 @@ public class TestBeanImpl implements Tes
         }
     }
 
+    @Override
     public void delegateInsertRow(String name, int value) throws SQLException {
         bean.insertRow(name, value, null);
     }
 
+    @Override
     public void throwApplicationException() throws SQLException {
         throw new SQLException("Test exception");
     }
 
+    @Override
     public void throwRuntimeException() {
-        throw new RuntimeException("Test exception");
+        throw new RuntimeException("Test exception"); // NOSONAR
     }
 
     public void setTestBean(TestBean bean) {



Mime
View raw message