openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r1504673 - in /openjpa/trunk: ./ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ openjpa-jest/src/main/java/org/a...
Date Thu, 18 Jul 2013 21:34:23 GMT
Author: curtisr7
Date: Thu Jul 18 21:34:23 2013
New Revision: 1504673

URL: http://svn.apache.org/r1504673
Log:
OPENJPA-2410 : Detect SystemOut/Err in code at build time. Patch submitted by Di Wu Lau.

Added:
    openjpa/trunk/openjpa-project/suppressions.xml   (with props)
Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ClassTableJDBCSeq.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ValueTableJDBCSeq.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ReverseMappingTool.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/TableSchemaFactory.java
    openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/json/JSONObject.java
    openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/JESTServlet.java
    openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/JSONObject.java
    openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/XMLFormatter.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/MetaDataCacheMaintenance.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAVersion.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ManagedClassSubclasser.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataTool.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/identifier/IdentifierUtilImpl.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/SQLFormatter.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
    openjpa/trunk/openjpa-project/checkstyle.xml
    openjpa/trunk/pom.xml

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ClassTableJDBCSeq.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ClassTableJDBCSeq.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ClassTableJDBCSeq.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ClassTableJDBCSeq.java
Thu Jul 18 21:34:23 2013
@@ -180,8 +180,11 @@ public class ClassTableJDBCSeq 
                 }
             }
         });
-        if (!ret)
+        if (!ret) {
+            // START - ALLOW PRINT STATEMENTS
             System.out.println(_loc.get("clstable-seq-usage"));
+            // STOP - ALLOW PRINT STATEMENTS
+        }
     }
 
     /**
@@ -232,9 +235,11 @@ public class ClassTableJDBCSeq 
             Connection conn = conf.getDataSource2(null).getConnection();
             try {
                 long cur = seq.getSequence(mapping, conn);
-                if (ACTION_GET.equals(action))
+                if (ACTION_GET.equals(action)) {
+                    // START - ALLOW PRINT STATEMENTS
                     System.out.println(mapping + ": " + cur);
-                else {
+                    // STOP - ALLOW PRINT STATEMENTS
+                }else {
                     long set;
                     if (args.length > 1)
                         set = Long.parseLong(args[1]);
@@ -248,7 +253,9 @@ public class ClassTableJDBCSeq 
                             conn);
                         set = stat.seq;
                     }
+                    // START - ALLOW PRINT STATEMENTS
                     System.err.println(mapping + ": " + set);
+                    // STOP - ALLOW PRINT STATEMENTS
                 }
             } catch (NumberFormatException nfe) {
                 return false;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java
Thu Jul 18 21:34:23 2013
@@ -385,8 +385,11 @@ public class NativeJDBCSeq
                 }
             }
         });
-        if (!ret)
+        if (!ret) {
+            // START - ALLOW PRINT STATEMENTS
             System.out.println(_loc.get("native-seq-usage"));
+            // STOP - ALLOW PRINT STATEMENTS
+        }
     }
 
     /**
@@ -421,7 +424,9 @@ public class NativeJDBCSeq
             Connection conn = conf.getDataSource2(null).getConnection();
             try {
                 long cur = seq.getSequence(conn);
+                // START - ALLOW PRINT STATEMENTS
                 System.out.println(cur);
+                // STOP - ALLOW PRINT STATEMENTS
             } finally {
                 try { conn.close(); } catch (SQLException se) {}
             }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java
Thu Jul 18 21:34:23 2013
@@ -722,8 +722,11 @@ public class TableJDBCSeq extends Abstra
                 }
             }
         });
-        if (!ret)
+        if (!ret) {
+            // START - ALLOW PRINT STATEMENTS
             System.out.println(_loc.get("seq-usage"));
+            // STOP - ALLOW PRINT STATEMENTS
+        }
     }
 
     /**
@@ -759,9 +762,11 @@ public class TableJDBCSeq extends Abstra
             Connection conn = conf.getDataSource2(null).getConnection();
             try {
                 long cur = seq.getSequence(null, conn);
-                if (ACTION_GET.equals(action))
+                if (ACTION_GET.equals(action)) {
+                    // START - ALLOW PRINT STATEMENTS
                     System.out.println(cur);
-                else {
+                    // STOP - ALLOW PRINT STATEMENTS
+                } else {
                     long set;
                     if (args.length > 0)
                         set = Long.parseLong(args[0]);
@@ -775,7 +780,9 @@ public class TableJDBCSeq extends Abstra
                             conn);
                         set = stat.seq;
                     }
+                    // START - ALLOW PRINT STATEMENTS
                     System.err.println(set);
+                    // STOP - ALLOW PRINT STATEMENTS
                 }
             }
             catch (NumberFormatException nfe) {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ValueTableJDBCSeq.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ValueTableJDBCSeq.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ValueTableJDBCSeq.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ValueTableJDBCSeq.java
Thu Jul 18 21:34:23 2013
@@ -132,8 +132,11 @@ public class ValueTableJDBCSeq
                 }
             }
         });
-        if (!ret)
+        if (!ret) {
+            // START - ALLOW PRINT STATEMENTS
             System.out.println(_loc.get("clstable-seq-usage"));
+            // STOP - ALLOW PRINT STATEMENTS
+        }
     }
 
     /**
@@ -172,9 +175,11 @@ public class ValueTableJDBCSeq
             Connection conn = conf.getDataSource2(null).getConnection();
             try {
                 long cur = seq.getSequence(null, conn);
-                if (ACTION_GET.equals(action))
+                if (ACTION_GET.equals(action)) {
+                    // START - ALLOW PRINT STATEMENTS
                     System.out.println(seq.getPrimaryKeyValue() + ": " + cur);
-                else {
+                    // STOP - ALLOW PRINT STATEMENTS
+                } else {
                     long set;
                     if (args.length > 1)
                         set = Long.parseLong(args[1]);
@@ -188,7 +193,9 @@ public class ValueTableJDBCSeq
                             conn);
                         set = stat.seq;
                     }
+                    // START - ALLOW PRINT STATEMENTS
                     System.err.println(seq.getPrimaryKeyValue() + ": " + set);
+                    // STOP - ALLOW PRINT STATEMENTS
                 }
             }
             catch (NumberFormatException nfe) {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java
Thu Jul 18 21:34:23 2013
@@ -940,8 +940,11 @@ public class MappingTool
                 }
             }
         });
-        if (!ret)
+        if (!ret) {
+            // START - ALLOW PRINT STATEMENTS
             System.err.println(_loc.get("tool-usage"));
+            // STOP - ALLOW PRINT STATEMENTS
+        }
     }
 
     /**

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ReverseMappingTool.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ReverseMappingTool.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ReverseMappingTool.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ReverseMappingTool.java
Thu Jul 18 21:34:23 2013
@@ -1832,8 +1832,11 @@ public class ReverseMappingTool
                 }
             }
         });
-        if (!ret)
+        if (!ret) {
+            // START - ALLOW PRINT STATEMENTS
             System.out.println(_loc.get("revtool-usage"));
+            // STOP - ALLOW PRINT STATEMENTS
+        }
     }
 
     /**

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java
Thu Jul 18 21:34:23 2013
@@ -1379,8 +1379,11 @@ public class SchemaTool {
                 }
             }
         });
-        if (!ret)
+        if (!ret) {
+            // START - ALLOW PRINT STATEMENTS
             System.out.println(_loc.get("tool-usage"));
+            // STOP - ALLOW PRINT STATEMENTS
+        }
     }
 
     /**

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/TableSchemaFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/TableSchemaFactory.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/TableSchemaFactory.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/TableSchemaFactory.java
Thu Jul 18 21:34:23 2013
@@ -470,8 +470,11 @@ public class TableSchemaFactory
                 }
             }
         });
-        if (!ret)
+        if (!ret) {
+            // START - ALLOW PRINT STATEMENTS
             System.out.println(_loc.get("sch-usage"));
+            // STOP - ALLOW PRINT STATEMENTS
+        }
     }
 
     /**

Modified: openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/json/JSONObject.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/json/JSONObject.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/json/JSONObject.java (original)
+++ openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/json/JSONObject.java Thu Jul
18 21:34:23 2013
@@ -14,7 +14,7 @@
  * "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.    
+ * under the License.
  */
 
 package org.apache.openjpa.json;
@@ -32,8 +32,8 @@ import java.util.Map;
  * Persistent instances have a persistent identity that extends beyond the process lifetime
unlike other common
  * identity such as {@linkplain System#identityHashCode(Object) identity hash code} for a
Java instance in a JVM.
  * <br>
- * A JSONObject instance must need such a persistent identity.  
- * 
+ * A JSONObject instance must need such a persistent identity.
+ *
  * @author Pinaki Poddar
  *
  */
@@ -42,25 +42,25 @@ public class JSONObject implements JSON 
     private final String _id;
     private final boolean _ref;
     private final Map<String, Object> _values;
-    
+
     public JSONObject(String type, Object id, boolean ref) {
         _type = type;
         _id   = id.toString();
         _ref  = ref;
         _values = new LinkedHashMap<String, Object>();
     }
-    
+
     public void set(String key, Object value) {
         _values.put(key, value);
     }
-    
+
     public void write(PrintWriter writer) {
         writer.println(toString());
     }
     public String toString() {
         return asString(0).toString();
     }
-    
+
     public StringBuilder asString(int indent) {
         StringBuilder buf = new StringBuilder().append(OBJECT_START);
         buf.append(encodeField(_ref ? REF_MARKER : ID_MARKER, ior(), 0));
@@ -77,7 +77,7 @@ public class JSONObject implements JSON 
            .append(OBJECT_END);
         return buf;
     }
-    
+
     /**
      * Encoding a JSON field is a quoted field name, followed by a :, followed by a value
(which itself can be JSON)
      * @param field
@@ -91,22 +91,22 @@ public class JSONObject implements JSON 
               .append(VALUE_SEPARATOR)
               .append(quoteFieldValue(value, indent));
     }
-    
+
     private static StringBuilder newIndent(int indent) {
         char[] tabs = new char[indent*4];
         Arrays.fill(tabs, SPACE);
         return new StringBuilder().append(tabs);
     }
-    
-    
+
+
     StringBuilder ior() {
         return new StringBuilder(_type).append('-').append(_id);
     }
-    
+
     private static StringBuilder quoteFieldName(String s) {
         return new StringBuilder().append(QUOTE).append(s).append(QUOTE);
     }
-    
+
     /**
      * Creates a StringBuilder for the given value.
      * If the value is null, outputs <code>null</code> without quote
@@ -122,29 +122,29 @@ public class JSONObject implements JSON 
         if (o instanceof JSON) return ((JSON)o).asString(indent);
         return quoted(o.toString());
     }
-    
+
     private static StringBuilder quoted(Object o) {
         if (o == null) return new StringBuilder(NULL_LITERAL);
         return new StringBuilder().append(QUOTE).append(o.toString()).append(QUOTE);
     }
-    
+
     /**
      * An array of objects. Members can be JSON too.
-     *  
+     *
      * @author Pinaki Poddar
      *
      */
     public static class Array implements JSON {
         private List<Object> _members = new ArrayList<Object>();
-        
+
         public void add(Object o) {
             _members.add(o);
         }
-        
+
         public String toString() {
             return asString(0).toString();
         }
-        
+
         public StringBuilder asString(int indent) {
             StringBuilder buf = new StringBuilder().append(ARRAY_START);
             StringBuilder tab = JSONObject.newIndent(indent+1);
@@ -153,35 +153,35 @@ public class JSONObject implements JSON 
                 buf.append(NEWLINE).append(tab);
                 if (o instanceof JSON)
                     buf.append(((JSON)o).asString(indent+1));
-                else 
+                else
                     buf.append(o);
             }
             buf.append(NEWLINE)
                .append(JSONObject.newIndent(indent))
                .append(ARRAY_END);
-           
+
             return buf;
         }
     }
-    
+
     /**
      * A map whose key or value can be JSON.
      * A map is encoded as JSON as an array of entries. Each entry is a key value pair separated
with :
-     * 
+     *
      * @author Pinaki Poddar
      *
      */
     public static class KVMap implements JSON {
         private Map<Object,Object> _entries = new LinkedHashMap<Object,Object>();
-        
+
         public void put(Object k, Object v) {
             _entries.put(k,v);
         }
-        
+
         public String toString() {
             return asString(0).toString();
         }
-        
+
         public StringBuilder asString(int indent) {
             StringBuilder buf = new StringBuilder().append(ARRAY_START);
             StringBuilder tab = JSONObject.newIndent(indent+1);
@@ -191,7 +191,7 @@ public class JSONObject implements JSON 
                 Object key = e.getKey();
                 if (key instanceof JSON) {
                     buf.append(((JSON)key).asString(indent+1));
-                } else { 
+                } else {
                     buf.append(key);
                 }
                 buf.append(VALUE_SEPARATOR);
@@ -201,7 +201,7 @@ public class JSONObject implements JSON 
                 } else {
                     buf.append(value);
                 }
-                
+
             }
             buf.append(NEWLINE)
                .append(JSONObject.newIndent(indent))
@@ -209,7 +209,7 @@ public class JSONObject implements JSON 
             return buf;
         }
     }
-    
+
     public static void main(String[] args) throws Exception {
         JSONObject o = new JSONObject("Person", 1234, false);
         JSONObject r = new JSONObject("Person", 1234, true);
@@ -235,7 +235,8 @@ public class JSONObject implements JSON 
         o.set("friend", f);
         o.set("friends", a);
         o.set("map", map);
-        
+        // START - ALLOW PRINT STATEMENTS
         System.err.println(o);
+        // STOP - ALLOW PRINT STATEMENTS
     }
 }

Modified: openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/JESTServlet.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/JESTServlet.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/JESTServlet.java
(original)
+++ openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/JESTServlet.java
Thu Jul 18 21:34:23 2013
@@ -83,7 +83,9 @@ public class JESTServlet extends HttpSer
             throw new ServletException(_loc.get("no-persistence-unit-param").toString());
         }
         boolean standalone = "true".equalsIgnoreCase(config.getInitParameter(INIT_PARA_STANDALONE));
+        // START - ALLOW PRINT STATEMENTS
         System.err.println("Standalone Deployment Mode " + standalone);
+        // STOP - ALLOW PRINT STATEMENTS
         if (standalone) {
             createPersistenceUnit();
         }
@@ -114,7 +116,8 @@ public class JESTServlet extends HttpSer
     }
     
     protected void createPersistenceUnit() throws ServletException {
-        try {
+        // START - ALLOW PRINT STATEMENTS
+        try {            
             System.err.println("Creating Standalone Persistent Unit  " + _unit);
             _emf = OpenJPAPersistence.cast(Persistence.createEntityManagerFactory(_unit));
             System.err.println("Created Standalone Persistent Unit  " + _unit + ":" + _emf);
@@ -123,6 +126,7 @@ public class JESTServlet extends HttpSer
             e.printStackTrace();
             throw new ServletException(_loc.get("no-persistence-unit-standalone", _unit).toString(),
e);
         } 
+        // STOP - ALLOW PRINT STATEMENTS
     }
     
     protected boolean findPersistenceUnit() {

Modified: openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/JSONObject.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/JSONObject.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/JSONObject.java
(original)
+++ openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/JSONObject.java
Thu Jul 18 21:34:23 2013
@@ -235,7 +235,8 @@ public class JSONObject implements JSON 
         o.set("friend", f);
         o.set("friends", a);
         o.set("map", map);
-        
+        // START - ALLOW PRINT STATEMENTS
         System.err.println(o);
+        // STOP - ALLOW PRINT STATEMENTS
     }
 }

Modified: openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/XMLFormatter.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/XMLFormatter.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/XMLFormatter.java
(original)
+++ openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/XMLFormatter.java
Thu Jul 18 21:34:23 2013
@@ -98,7 +98,6 @@ import org.w3c.dom.Element;
  *
  */
 public class XMLFormatter implements ObjectFormatter<Document> {
-    
     public static final  Schema          _xsd;
     private static final DocumentBuilder _builder;
     private static final Transformer     _transformer;
@@ -400,7 +399,9 @@ public class XMLFormatter implements Obj
                     
                 case JavaTypes.PC_UNTYPED:
                 case JavaTypes.OBJECT:
+                    // START - ALLOW PRINT STATEMENTS
                     System.err.println("Not handled " + fmd.getName() + " of type " + fmd.getDeclaredType());
+                    // STOP - ALLOW PRINT STATEMENTS
             }
             
             if (child != null) {

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/MetaDataCacheMaintenance.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/MetaDataCacheMaintenance.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/MetaDataCacheMaintenance.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/MetaDataCacheMaintenance.java
Thu Jul 18 21:34:23 2013
@@ -102,8 +102,10 @@ public class MetaDataCacheMaintenance {
     }
 
     private static int usage() {
+        // START - ALLOW PRINT STATEMENTS
         System.err.println("Usage: java MetaDataCacheMaintenance " +
             "[-scanDevPath t|f] [-<openjpa.PropertyName> value] store | dump");
+        // STOP - ALLOW PRINT STATEMENTS
         return -1;
     }
 

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAVersion.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAVersion.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAVersion.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAVersion.java
Thu Jul 18 21:34:23 2013
@@ -97,8 +97,10 @@ public class OpenJPAVersion {
         VERSION_ID = "openjpa-" + VERSION_NUMBER + "-r" + REVISION_NUMBER;
     }
 
-    public static void main(String [] args) {
+    public static void main(String[] args) {
+        // START - ALLOW PRINT STATEMENTS
         System.out.println(new OpenJPAVersion().toString());
+        // STOP - ALLOW PRINT STATEMENTS
     }
 
     public String toString() {

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java
Thu Jul 18 21:34:23 2013
@@ -1294,8 +1294,10 @@ public class ApplicationIdTool {
                 }
             }
         });
+        // START - ALLOW PRINT STATEMENTS
         if (!ret)
             System.err.println(_loc.get("appid-usage"));
+        // STOP - ALLOW PRINT STATEMENTS
     }
 
     /**

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ManagedClassSubclasser.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ManagedClassSubclasser.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ManagedClassSubclasser.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ManagedClassSubclasser.java
Thu Jul 18 21:34:23 2013
@@ -300,7 +300,9 @@ public class ManagedClassSubclasser {
             dir.mkdirs();
             dir = Files.getPackageFile(dir, bc.getPackageName(), true);
             File f = new File(dir, bc.getClassName() + ".class");
+            // START - ALLOW PRINT STATEMENTS
             System.err.println("Writing to " + f);
+            // STOP - ALLOW PRINT STATEMENTS
             AsmAdaptor.write(bc, f);
         }
     }

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
Thu Jul 18 21:34:23 2013
@@ -4780,8 +4780,11 @@ public class PCEnhancer { 
     public static void main(String[] args) {
         Options opts = new Options();
         args = opts.setFromCmdLine(args);
-        if (!run(args, opts))
+        if (!run(args, opts)) {
+            // START - ALLOW PRINT STATEMENTS
             System.err.println(_loc.get("enhance-usage"));
+            // STOP - ALLOW PRINT STATEMENTS
+        }
     }
 
     /**

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataTool.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataTool.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataTool.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataTool.java Thu
Jul 18 21:34:23 2013
@@ -263,8 +263,11 @@ public class MetaDataTool
                 }
             }
         });
-        if (!ret)
+        if (!ret) {
+            // START - ALLOW PRINT STATEMENTS
             System.err.println(_loc.get("tool-usage"));
+            // STOP - ALLOW PRINT STATEMENTS
+        }
     }
 
     /**

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java
Thu Jul 18 21:34:23 2013
@@ -1731,8 +1731,9 @@ public class ProxyManagerImpl
                         }
                     });
             }
-
+            // START - ALLOW PRINT STATEMENTS
             System.out.println(bc.getName());
+            // STOP - ALLOW PRINT STATEMENTS
             AsmAdaptor.write(bc, new File(dir, bc.getClassName() + ".class"));
         }
     }

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
Thu Jul 18 21:34:23 2013
@@ -90,6 +90,7 @@ public class ProductDerivations {
                 ProductDerivations.class.getName(),"derivations");
         }
 
+        // START - ALLOW PRINT STATEMENTS
         // if some derivations weren't instantiable, warn
         if (errors)
             System.err.println(_loc.get("bad-product-derivations",
@@ -101,6 +102,7 @@ public class ProductDerivations {
                     _derivationErrors[i]);
             break;
         }
+        // STOP - ALLOW PRINT STATEMENTS
 
         Collections.sort(derivations, new ProductDerivationComparator());
         _derivations =
@@ -480,7 +482,9 @@ public class ProductDerivations {
      * Prints product derivation information.
      */
     public static void main(String[] args) {
+        // START - ALLOW PRINT STATEMENTS
         System.err.println(derivationErrorsToString());
+        // STOP - ALLOW PRINT STATEMENTS
     }
 
     /**

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/identifier/IdentifierUtilImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/identifier/IdentifierUtilImpl.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/identifier/IdentifierUtilImpl.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/identifier/IdentifierUtilImpl.java
Thu Jul 18 21:34:23 2013
@@ -365,7 +365,6 @@ public class IdentifierUtilImpl implemen
      */
     public boolean isReservedWord(IdentifierRule rule, String name) {
         if (rule == null) {
-            System.out.println("NAmingConfig: " + _config.getClass().getName());
             throw new IllegalArgumentException("Naming rule is null!");
         }
         if (rule.getReservedWords() == null) {

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/SQLFormatter.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/SQLFormatter.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/SQLFormatter.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/SQLFormatter.java
Thu Jul 18 21:34:23 2013
@@ -266,7 +266,9 @@ public class SQLFormatter {
     public static void main(String [] args) {
         SQLFormatter formatter = new SQLFormatter();
         for (int i = 0; i < args.length; i++) {
+            // START - ALLOW PRINT STATEMENTS
             System.out.println(formatter.prettyPrint(args[i]));
+            // STOP - ALLOW PRINT STATEMENTS
         }
     }
 }

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
Thu Jul 18 21:34:23 2013
@@ -652,7 +652,9 @@ public class PersistenceProductDerivatio
      */
     private static void log(String msg) {
         // at this point logging isn't configured yet
+        // START - ALLOW PRINT STATEMENTS
         System.err.println(msg);
+        // STOP - ALLOW PRINT STATEMENTS
     }
 
     private void addPuNameCollision(String puName, String file1, String file2){

Modified: openjpa/trunk/openjpa-project/checkstyle.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/checkstyle.xml?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/openjpa-project/checkstyle.xml (original)
+++ openjpa/trunk/openjpa-project/checkstyle.xml Thu Jul 18 21:34:23 2013
@@ -1,37 +1,40 @@
 <?xml version="1.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.   
--->
+<!-- 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. -->
 <!DOCTYPE module PUBLIC
   "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
   "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
 
-<!-- This is a temporary file.
-     As we get closer to enforcing the OpenJPA style to be like the 
-     default Sun Microsystems Definition default file, then
-     we can remove this file and remove the reference from the
-     pom.xml -->
+<!-- This is a temporary file. As we get closer to enforcing the OpenJPA 
+	style to be like the default Sun Microsystems Definition default file, then 
+	we can remove this file and remove the reference from the pom.xml -->
 
 <module name="Checker">
-    <module name="NewlineAtEndOfFile"/>
-    <module name="TreeWalker">
-        <module name="LineLength">
-        <property name="max" value="120"/>
-        </module>
-    </module>
+	<module name="NewlineAtEndOfFile" />
+	<module name="TreeWalker">
+		<module name="FileContentsHolder" />
+		<module name="LineLength">
+			<property name="max" value="120" />
+		</module>
+		<module name="RegexpSinglelineJava">
+			<property name="format" value="System\.(out|err)\.print(ln)?\(" />
+			<property name="ignoreComments" value="true" />
+		</module>
+	</module>
+	<module name="SuppressionCommentFilter">
+		<property name="offCommentFormat" value="// START - ALLOW PRINT STATEMENTS" />
+		<property name="onCommentFormat" value="// END - ALLOW PRINT STATEMENTS" />
+	</module>
+
+	<module name="SuppressionFilter">
+		<property name="file" value="openjpa-project/suppressions.xml" />
+	</module>
 </module>

Added: openjpa/trunk/openjpa-project/suppressions.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/suppressions.xml?rev=1504673&view=auto
==============================================================================
--- openjpa/trunk/openjpa-project/suppressions.xml (added)
+++ openjpa/trunk/openjpa-project/suppressions.xml Thu Jul 18 21:34:23 2013
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.1//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
+
+<suppressions>
+	<suppress checks="RegexpSinglelineJava" files=".*openjpa-examples.*tools.*java" />
+	<suppress checks="RegexpSinglelineJava" files=".*openjpa-examples.*client.*java" />
+	<suppress checks="RegexpSinglelineJava" files=".*openjpa-examples.*server.*java" />
+	<suppress checks="RegexpSinglelineJava" files=".*openjpa-examples.*util.*java" />
+	<suppress checks="RegexpSinglelineJava" files="Test.*java" />
+	<suppress checks="RegexpSinglelineJava" files=".*src\\test.*java" />
+	<suppress checks="RegexpSinglelineJava" files="Main.java" /> 
+</suppressions>

Propchange: openjpa/trunk/openjpa-project/suppressions.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openjpa/trunk/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/pom.xml?rev=1504673&r1=1504672&r2=1504673&view=diff
==============================================================================
--- openjpa/trunk/pom.xml (original)
+++ openjpa/trunk/pom.xml Thu Jul 18 21:34:23 2013
@@ -792,12 +792,12 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-checkstyle-plugin</artifactId>
-                    <version>2.2</version>
+                    <version>2.4</version>
                     <dependencies>
                         <dependency>
                             <groupId>org.codehaus.plexus</groupId>
                             <artifactId>plexus-velocity</artifactId>
-                            <version>1.1.3</version>
+                            <version>1.1.5</version>
                         </dependency>
                     </dependencies>
                 </plugin>



Mime
View raw message