apex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [32/50] incubator-apex-core git commit: APEXCORE-267 #resolve #comment removed violations from API
Date Fri, 29 Jan 2016 07:21:51 GMT
APEXCORE-267 #resolve #comment removed violations from API


Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/commit/9da2e852
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/tree/9da2e852
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/diff/9da2e852

Branch: refs/heads/master
Commit: 9da2e852f559d4c916d0d25a2c168810d2951eb0
Parents: 7629be8
Author: MalharJenkins <jenkins@datatorrent.com>
Authored: Fri Jan 8 14:12:52 2016 -0800
Committer: Chandni Singh <csingh@apache.org>
Committed: Fri Jan 8 14:13:21 2016 -0800

----------------------------------------------------------------------
 api/pom.xml                                     |  2 +-
 .../java/com/datatorrent/api/Attribute.java     | 20 +++++++-------------
 .../java/com/datatorrent/api/AutoMetric.java    |  6 +++++-
 .../java/com/datatorrent/api/Component.java     |  2 +-
 .../main/java/com/datatorrent/api/Context.java  |  9 +++++++--
 api/src/main/java/com/datatorrent/api/DAG.java  |  3 ++-
 .../com/datatorrent/api/DefaultInputPort.java   |  3 +--
 .../com/datatorrent/api/DefaultOutputPort.java  |  4 ++--
 .../com/datatorrent/api/DefaultPartition.java   | 19 +++++++++----------
 .../java/com/datatorrent/api/LocalMode.java     |  8 ++++----
 .../java/com/datatorrent/api/Partitioner.java   |  4 ++--
 .../main/java/com/datatorrent/api/Stats.java    |  1 +
 .../java/com/datatorrent/api/StatsListener.java | 13 ++++++++++++-
 .../datatorrent/api/StreamingApplication.java   |  2 +-
 .../java/com/datatorrent/api/StringCodec.java   | 14 ++++++--------
 .../api/annotation/ApplicationAnnotation.java   |  3 ++-
 .../annotation/InputPortFieldAnnotation.java    |  6 +++++-
 .../com/datatorrent/api/annotation/Name.java    |  6 +++++-
 .../annotation/OutputPortFieldAnnotation.java   |  5 ++---
 .../datatorrent/api/annotation/RecordField.java |  6 +++++-
 .../datatorrent/api/annotation/Stateless.java   |  6 +++++-
 .../com/datatorrent/api/AttributeMapTest.java   |  8 ++++----
 .../com/datatorrent/api/Object2StringTest.java  | 13 +++++++------
 23 files changed, 96 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/pom.xml
----------------------------------------------------------------------
diff --git a/api/pom.xml b/api/pom.xml
index f6e1ada..4c8f00b 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -71,7 +71,7 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
         <configuration>
-          <maxAllowedViolations>61</maxAllowedViolations>
+          <logViolationsToConsole>true</logViolationsToConsole>
         </configuration>
       </plugin>
     </plugins>

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/Attribute.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/Attribute.java b/api/src/main/java/com/datatorrent/api/Attribute.java
index 459d719..fe6907a 100644
--- a/api/src/main/java/com/datatorrent/api/Attribute.java
+++ b/api/src/main/java/com/datatorrent/api/Attribute.java
@@ -189,7 +189,7 @@ public class Attribute<T> implements Serializable
       public DefaultAttributeMap clone() throws CloneNotSupportedException
       {
         DefaultAttributeMap clone = (DefaultAttributeMap)super.clone();
-        clone.map = (HashMap< Attribute< ?>, Object>)map.clone();
+        clone.map = (HashMap<Attribute<?>, Object>)map.clone();
         return clone;
       }
 
@@ -255,8 +255,7 @@ public class Attribute<T> implements Serializable
               result.put(attribute, context.getValue(attribute));
             }
           }
-        }
-        catch (Exception ex) {
+        } catch (Exception ex) {
           DTThrowable.rethrow(ex);
         }
         return result;
@@ -298,17 +297,13 @@ public class Attribute<T> implements Serializable
                   Class<?> klass = attribute.defaultValue.getClass();
                   if (klass == String.class) {
                     codec = new String2String();
-                  }
-                  else if (klass == Integer.class) {
+                  } else if (klass == Integer.class) {
                     codec = new Integer2String();
-                  }
-                  else if (klass == Long.class) {
+                  } else if (klass == Long.class) {
                     codec = new Long2String();
-                  }
-                  else if (klass == Boolean.class) {
+                  } else if (klass == Boolean.class) {
                     codec = new Boolean2String();
-                  }
-                  else if (Enum.class.isAssignableFrom(klass)) {
+                  } else if (Enum.class.isAssignableFrom(klass)) {
                     codec = new Enum2String(klass);
                   }
                 }
@@ -322,8 +317,7 @@ public class Attribute<T> implements Serializable
               set.add(attribute);
             }
           }
-        }
-        catch (Exception ex) {
+        } catch (Exception ex) {
           DTThrowable.rethrow(ex);
         }
         map.put(clazz, set);

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/AutoMetric.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/AutoMetric.java b/api/src/main/java/com/datatorrent/api/AutoMetric.java
index 74d062a..b487e04 100644
--- a/api/src/main/java/com/datatorrent/api/AutoMetric.java
+++ b/api/src/main/java/com/datatorrent/api/AutoMetric.java
@@ -19,7 +19,11 @@
 package com.datatorrent.api;
 
 import java.io.IOException;
-import java.lang.annotation.*;
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 import java.util.Collection;
 import java.util.Map;
 

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/Component.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/Component.java b/api/src/main/java/com/datatorrent/api/Component.java
index f15d6de..05c1a30 100644
--- a/api/src/main/java/com/datatorrent/api/Component.java
+++ b/api/src/main/java/com/datatorrent/api/Component.java
@@ -65,7 +65,7 @@ public interface Component<CONTEXT extends Context>
    * @param <COMPLEMENT>
    * @since 0.3.2
    */
-  public static abstract class ComponentComplementPair<COMPONENT extends Component<?>,
COMPLEMENT>
+  public abstract static class ComponentComplementPair<COMPONENT extends Component<?>,
COMPLEMENT>
   {
     public final COMPONENT component;
 

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/Context.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/Context.java b/api/src/main/java/com/datatorrent/api/Context.java
index 6092dce..ceed8a2 100644
--- a/api/src/main/java/com/datatorrent/api/Context.java
+++ b/api/src/main/java/com/datatorrent/api/Context.java
@@ -25,7 +25,12 @@ import java.util.Map;
 
 import com.datatorrent.api.Attribute.AttributeMap;
 import com.datatorrent.api.Operator.ProcessingMode;
-import com.datatorrent.api.StringCodec.*;
+import com.datatorrent.api.StringCodec.Class2String;
+import com.datatorrent.api.StringCodec.Collection2String;
+import com.datatorrent.api.StringCodec.Integer2String;
+import com.datatorrent.api.StringCodec.Map2String;
+import com.datatorrent.api.StringCodec.Object2String;
+import com.datatorrent.api.StringCodec.String2String;
 import com.datatorrent.api.annotation.Stateless;
 
 /**
@@ -292,7 +297,7 @@ public interface Context
      * by this construct is conveyed to tracker application and influences the aggregations
done on it by the tracker.
      */
     Attribute<AutoMetric.DimensionsScheme> METRICS_DIMENSIONS_SCHEME = new Attribute<AutoMetric.DimensionsScheme>(new
-      Object2String<AutoMetric.DimensionsScheme>());
+        Object2String<AutoMetric.DimensionsScheme>());
 
     /**
      * Return the operator runtime id.

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/DAG.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/DAG.java b/api/src/main/java/com/datatorrent/api/DAG.java
index 7c793f9..72096e1 100644
--- a/api/src/main/java/com/datatorrent/api/DAG.java
+++ b/api/src/main/java/com/datatorrent/api/DAG.java
@@ -54,7 +54,8 @@ public interface DAG extends DAGContext, Serializable
    * significant performance gains. Optimizations are subject to resource
    * availability.
    */
-  enum Locality {
+  enum Locality
+  {
     /**
      * Adjacent operators should be deployed into the same executing thread,
      * effectively serializing the computation. This setting is beneficial

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/DefaultInputPort.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/DefaultInputPort.java b/api/src/main/java/com/datatorrent/api/DefaultInputPort.java
index 2ed871d..046a35d 100644
--- a/api/src/main/java/com/datatorrent/api/DefaultInputPort.java
+++ b/api/src/main/java/com/datatorrent/api/DefaultInputPort.java
@@ -85,8 +85,7 @@ public abstract class DefaultInputPort<T> implements InputPort<T>,
Sink<T>
   {
     try {
       return count;
-    }
-    finally {
+    } finally {
       if (reset) {
         count = 0;
       }

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/DefaultOutputPort.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/DefaultOutputPort.java b/api/src/main/java/com/datatorrent/api/DefaultOutputPort.java
index d145657..078a372 100644
--- a/api/src/main/java/com/datatorrent/api/DefaultOutputPort.java
+++ b/api/src/main/java/com/datatorrent/api/DefaultOutputPort.java
@@ -57,9 +57,9 @@ public class DefaultOutputPort<T> implements Operator.OutputPort<T>
    * Called by execution engine to inject sink at deployment time.
    */
   @Override
-  final public void setSink(Sink<Object> s)
+  public final void setSink(Sink<Object> s)
   {
-    this.sink = s == null? Sink.BLACKHOLE: s;
+    this.sink = s == null ? Sink.BLACKHOLE : s;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/DefaultPartition.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/DefaultPartition.java b/api/src/main/java/com/datatorrent/api/DefaultPartition.java
index 222f44e..16b435f 100644
--- a/api/src/main/java/com/datatorrent/api/DefaultPartition.java
+++ b/api/src/main/java/com/datatorrent/api/DefaultPartition.java
@@ -18,18 +18,19 @@
  */
 package com.datatorrent.api;
 
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import com.google.common.collect.Sets;
+
 import com.datatorrent.api.Attribute.AttributeMap.DefaultAttributeMap;
 import com.datatorrent.api.Operator.InputPort;
 import com.datatorrent.api.Partitioner.Partition;
 import com.datatorrent.api.Partitioner.PartitionKeys;
 import com.datatorrent.api.Partitioner.PartitioningContext;
 import com.datatorrent.api.StatsListener.BatchedOperatorStats;
-import com.google.common.collect.Sets;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
 
 /**
  * <p>
@@ -204,8 +205,7 @@ public class DefaultPartition<T> implements Partitioner.Partition<T>
       Partition<?> p;
       if (iterator.hasNext()) {
         p = iterator.next();
-      }
-      else {
+      } else {
         iterator = partitions.iterator();
         p = iterator.next();
       }
@@ -213,8 +213,7 @@ public class DefaultPartition<T> implements Partitioner.Partition<T>
       PartitionKeys pks = p.getPartitionKeys().get(inputPort);
       if (pks == null) {
         p.getPartitionKeys().put(inputPort, new PartitionKeys(partitionMask, Sets.newHashSet(i)));
-      }
-      else {
+      } else {
         pks.partitions.add(i);
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/LocalMode.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/LocalMode.java b/api/src/main/java/com/datatorrent/api/LocalMode.java
index 0115f2a..51d3da3 100644
--- a/api/src/main/java/com/datatorrent/api/LocalMode.java
+++ b/api/src/main/java/com/datatorrent/api/LocalMode.java
@@ -37,7 +37,7 @@ public abstract class LocalMode
    *
    * @return
    */
-  abstract public DAG getDAG();
+  public abstract DAG getDAG();
 
   /**
    * <p>
@@ -46,7 +46,7 @@ public abstract class LocalMode
    * @return
    * @throws java.lang.Exception
    */
-  abstract public DAG cloneDAG() throws Exception;
+  public abstract DAG cloneDAG() throws Exception;
 
   /**
    * Build the logical plan through the given streaming application instance and/or from
configuration.
@@ -64,7 +64,7 @@ public abstract class LocalMode
    * @throws Exception
    * @since 0.3.5
    */
-  abstract public DAG prepareDAG(StreamingApplication app, Configuration conf) throws Exception;
+  public abstract DAG prepareDAG(StreamingApplication app, Configuration conf) throws Exception;
 
   /**
    * <p>
@@ -72,7 +72,7 @@ public abstract class LocalMode
    *
    * @return
    */
-  abstract public Controller getController();
+  public abstract Controller getController();
 
   public interface Controller
   {

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/Partitioner.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/Partitioner.java b/api/src/main/java/com/datatorrent/api/Partitioner.java
index 1627c51..d743821 100644
--- a/api/src/main/java/com/datatorrent/api/Partitioner.java
+++ b/api/src/main/java/com/datatorrent/api/Partitioner.java
@@ -67,8 +67,8 @@ public interface Partitioner<T>
   public class PartitionKeys implements java.io.Serializable
   {
     private static final long serialVersionUID = 201312271835L;
-    final public int mask;
-    final public Set<Integer> partitions;
+    public final int mask;
+    public final Set<Integer> partitions;
 
     public PartitionKeys(int mask, Set<Integer> partitions)
     {

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/Stats.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/Stats.java b/api/src/main/java/com/datatorrent/api/Stats.java
index 3ba1402..0e4377d 100644
--- a/api/src/main/java/com/datatorrent/api/Stats.java
+++ b/api/src/main/java/com/datatorrent/api/Stats.java
@@ -47,6 +47,7 @@ public interface Stats extends Serializable
       return "CheckpointStats{" + "checkpointStartTime=" + checkpointStartTime + ", checkpointTime="
+ checkpointTime + '}';
     }
   }
+
   public static class OperatorStats implements Stats
   {
     public long windowId;

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/StatsListener.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/StatsListener.java b/api/src/main/java/com/datatorrent/api/StatsListener.java
index 38b93cd..624a095 100644
--- a/api/src/main/java/com/datatorrent/api/StatsListener.java
+++ b/api/src/main/java/com/datatorrent/api/StatsListener.java
@@ -20,7 +20,10 @@ package com.datatorrent.api;
 
 import java.io.IOException;
 import java.io.Serializable;
-import java.lang.annotation.*;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 import java.util.List;
 
 import com.datatorrent.api.Stats.OperatorStats;
@@ -78,6 +81,7 @@ public interface StatsListener
      * The Object to identify the response
      */
     public Object getResponseId();
+
     /*
      * The data payload that needs to be sent back
      */
@@ -95,12 +99,19 @@ public interface StatsListener
       * @return
       */
     List<OperatorStats> getLastWindowedStats();
+
     int getOperatorId();
+
     long getCurrentWindowId();
+
     long getTuplesProcessedPSMA();
+
     long getTuplesEmittedPSMA();
+
     double getCpuPercentageMA();
+
     long getLatencyMA();
+
     List<OperatorResponse> getOperatorResponse();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/StreamingApplication.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/StreamingApplication.java b/api/src/main/java/com/datatorrent/api/StreamingApplication.java
index f4ecd4a..cf1d6ec 100644
--- a/api/src/main/java/com/datatorrent/api/StreamingApplication.java
+++ b/api/src/main/java/com/datatorrent/api/StreamingApplication.java
@@ -55,7 +55,7 @@ public interface StreamingApplication
   {
     LOCAL,
     CLUSTER
-  };
+  }
 
   /**
    * <p>populateDAG.</p>

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/StringCodec.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/StringCodec.java b/api/src/main/java/com/datatorrent/api/StringCodec.java
index b19d15e..72d5f34 100644
--- a/api/src/main/java/com/datatorrent/api/StringCodec.java
+++ b/api/src/main/java/com/datatorrent/api/StringCodec.java
@@ -22,12 +22,13 @@ import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
 
 import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.lang.StringUtils;
 
 import com.datatorrent.netlet.util.DTThrowable;
-import java.util.*;
 
 /**
  * This interface is essentially serializer/deserializer interface which works with String
as
@@ -166,7 +167,7 @@ public interface StringCodec<T>
 
       try {
         @SuppressWarnings("unchecked")
-        Class<? extends T> clazz = (Class<? extends T>) Thread.currentThread().getContextClassLoader().loadClass(parts[0]);
+        Class<? extends T> clazz = (Class<? extends T>)Thread.currentThread().getContextClassLoader().loadClass(parts[0]);
         if (parts.length == 1) {
           return clazz.newInstance();
         }
@@ -174,8 +175,7 @@ public interface StringCodec<T>
         //String[] properties = parts[1].split(separator, 2);
         if (parts.length == 2) {
           return clazz.getConstructor(String.class).newInstance(parts[1]);
-        }
-        else {
+        } else {
           T object = clazz.getConstructor(String.class).newInstance(parts[1]);
           HashMap<String, String> hashMap = new HashMap<String, String>();
           for (int i = 2; i < parts.length; i++) {
@@ -185,8 +185,7 @@ public interface StringCodec<T>
           BeanUtils.populate(object, hashMap);
           return object;
         }
-      }
-      catch (Throwable cause) {
+      } catch (Throwable cause) {
         DTThrowable.rethrow(cause);
       }
 
@@ -354,8 +353,7 @@ public interface StringCodec<T>
         @SuppressWarnings({"rawtypes", "unchecked"})
         Class<? extends T> clazz = (Class)Thread.currentThread().getContextClassLoader().loadClass(string);
         return clazz;
-      }
-      catch (Throwable cause) {
+      } catch (Throwable cause) {
         DTThrowable.rethrow(cause);
       }
 

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/annotation/ApplicationAnnotation.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/annotation/ApplicationAnnotation.java b/api/src/main/java/com/datatorrent/api/annotation/ApplicationAnnotation.java
index b568ade..f81c15e 100644
--- a/api/src/main/java/com/datatorrent/api/annotation/ApplicationAnnotation.java
+++ b/api/src/main/java/com/datatorrent/api/annotation/ApplicationAnnotation.java
@@ -33,7 +33,8 @@ import java.lang.annotation.Target;
 @Documented
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)
-public @interface ApplicationAnnotation {
+public @interface ApplicationAnnotation
+{
   
   /**
    * <p>Compile time application alias.</p> 

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/annotation/InputPortFieldAnnotation.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/annotation/InputPortFieldAnnotation.java
b/api/src/main/java/com/datatorrent/api/annotation/InputPortFieldAnnotation.java
index c247c82..76fe497 100644
--- a/api/src/main/java/com/datatorrent/api/annotation/InputPortFieldAnnotation.java
+++ b/api/src/main/java/com/datatorrent/api/annotation/InputPortFieldAnnotation.java
@@ -18,7 +18,11 @@
  */
 package com.datatorrent.api.annotation;
 
-import java.lang.annotation.*;
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 
 /**
  * Annotation for input ports on streaming operators.<p>

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/annotation/Name.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/annotation/Name.java b/api/src/main/java/com/datatorrent/api/annotation/Name.java
index 2d03a92..57ead03 100644
--- a/api/src/main/java/com/datatorrent/api/annotation/Name.java
+++ b/api/src/main/java/com/datatorrent/api/annotation/Name.java
@@ -18,7 +18,11 @@
  */
 package com.datatorrent.api.annotation;
 
-import java.lang.annotation.*;
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 
 /**
  * <p>Name class.</p>

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/annotation/OutputPortFieldAnnotation.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/annotation/OutputPortFieldAnnotation.java
b/api/src/main/java/com/datatorrent/api/annotation/OutputPortFieldAnnotation.java
index 46aee64..62b43c6 100644
--- a/api/src/main/java/com/datatorrent/api/annotation/OutputPortFieldAnnotation.java
+++ b/api/src/main/java/com/datatorrent/api/annotation/OutputPortFieldAnnotation.java
@@ -24,8 +24,6 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-import com.datatorrent.api.Context;
-
 /**
  *
  * Annotation for output ports on streaming operators.<p>
@@ -35,7 +33,8 @@ import com.datatorrent.api.Context;
 @Documented
 @Target(ElementType.FIELD)
 @Retention(RetentionPolicy.RUNTIME)
-public @interface OutputPortFieldAnnotation {
+public @interface OutputPortFieldAnnotation
+{
   /**
    * <p>optional.</p>
    */

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/annotation/RecordField.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/annotation/RecordField.java b/api/src/main/java/com/datatorrent/api/annotation/RecordField.java
index 8a95d26..1675c54 100644
--- a/api/src/main/java/com/datatorrent/api/annotation/RecordField.java
+++ b/api/src/main/java/com/datatorrent/api/annotation/RecordField.java
@@ -18,7 +18,11 @@
  */
 package com.datatorrent.api.annotation;
 
-import java.lang.annotation.*;
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 
 /**
  * <p>RecordField class.</p>

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/main/java/com/datatorrent/api/annotation/Stateless.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/datatorrent/api/annotation/Stateless.java b/api/src/main/java/com/datatorrent/api/annotation/Stateless.java
index 2d79bc8..150c35c 100644
--- a/api/src/main/java/com/datatorrent/api/annotation/Stateless.java
+++ b/api/src/main/java/com/datatorrent/api/annotation/Stateless.java
@@ -18,7 +18,11 @@
  */
 package com.datatorrent.api.annotation;
 
-import java.lang.annotation.*;
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 
 /**
  * When a class or interface is annotated with this annotation, the object which are

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/test/java/com/datatorrent/api/AttributeMapTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/com/datatorrent/api/AttributeMapTest.java b/api/src/test/java/com/datatorrent/api/AttributeMapTest.java
index 97703f7..fcb1809 100644
--- a/api/src/test/java/com/datatorrent/api/AttributeMapTest.java
+++ b/api/src/test/java/com/datatorrent/api/AttributeMapTest.java
@@ -23,9 +23,9 @@ import java.util.Set;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import static org.junit.Assert.*;
 
-import com.datatorrent.api.Attribute;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
 
 /**
  *
@@ -47,7 +47,7 @@ public class AttributeMapTest
   {
     hello,
     howdy
-  };
+  }
 
   interface iface
   {
@@ -63,4 +63,4 @@ public class AttributeMapTest
   }
 
   private static final Logger logger = LoggerFactory.getLogger(AttributeMapTest.class);
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/9da2e852/api/src/test/java/com/datatorrent/api/Object2StringTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/com/datatorrent/api/Object2StringTest.java b/api/src/test/java/com/datatorrent/api/Object2StringTest.java
index 0307588..e42a462 100644
--- a/api/src/test/java/com/datatorrent/api/Object2StringTest.java
+++ b/api/src/test/java/com/datatorrent/api/Object2StringTest.java
@@ -22,7 +22,9 @@ import org.hamcrest.BaseMatcher;
 import org.hamcrest.Description;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThat;
 
 /**
  * This tests the Object2String codec
@@ -100,7 +102,7 @@ public class Object2StringTest
         return false;
       }
 
-      TestBean testBean = (TestBean) o;
+      TestBean testBean = (TestBean)o;
 
       if (intVal != testBean.intVal) {
         return false;
@@ -120,7 +122,7 @@ public class Object2StringTest
     {
       int result = intVal;
       result = 31 * result + (stringVal != null ? stringVal.hashCode() : 0);
-      result = 31 * result + (int) (longVal ^ (longVal >>> 32));
+      result = 31 * result + (int)(longVal ^ (longVal >>> 32));
       return result;
     }
   }
@@ -222,8 +224,7 @@ public class Object2StringTest
     try {
       bean2String.fromString(bean);
       assertFalse(true);
-    }
-    catch (RuntimeException e) {
+    } catch (RuntimeException e) {
       if (e.getCause() instanceof ClassNotFoundException) {
         String expRegex = "java.lang.ClassNotFoundException: com.datatorrent.api.Object2StringTest\\$TestBean1";
         assertThat("exception message", e.getMessage(), RegexMatcher.matches(expRegex));
@@ -257,7 +258,7 @@ public class Object2StringTest
     @Override
     public boolean matches(Object o)
     {
-      return ((String) o).matches(regex);
+      return ((String)o).matches(regex);
 
     }
 


Mime
View raw message