http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/query/Ordering.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/query/Ordering.java 
b/cayenne-server/src/main/java/org/apache/cayenne/query/Ordering.java
index 08417c4..1de21fa 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/query/Ordering.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/query/Ordering.java
@@ -268,10 +268,12 @@ public class Ordering implements Comparator<Object>, 
Serializable, XMLSerializab
         * @since 3.0
         */
        public void setAscending() {
-               if (sortOrder == null || sortOrder == SortOrder.DESCENDING)
+               if (sortOrder == null || sortOrder == SortOrder.DESCENDING) {
                        setSortOrder(SortOrder.ASCENDING);
-               else if (sortOrder == SortOrder.DESCENDING_INSENSITIVE)
+               }
+               else if (sortOrder == SortOrder.DESCENDING_INSENSITIVE) {
                        setSortOrder(SortOrder.ASCENDING_INSENSITIVE);
+               }
        }
 
        /**
@@ -281,10 +283,12 @@ public class Ordering implements Comparator<Object>, 
Serializable, XMLSerializab
         * @since 3.0
         */
        public void setDescending() {
-               if (sortOrder == null || sortOrder == SortOrder.ASCENDING)
+               if (sortOrder == null || sortOrder == SortOrder.ASCENDING) {
                        setSortOrder(SortOrder.DESCENDING);
-               else if (sortOrder == SortOrder.ASCENDING_INSENSITIVE)
+               }
+               else if (sortOrder == SortOrder.ASCENDING_INSENSITIVE) {
                        setSortOrder(SortOrder.DESCENDING_INSENSITIVE);
+               }
        }
 
        /** Returns true if the sorting is case insensitive */
@@ -308,10 +312,12 @@ public class Ordering implements Comparator<Object>, 
Serializable, XMLSerializab
         * @since 3.0
         */
        public void setCaseInsensitive() {
-               if (sortOrder == null || sortOrder == SortOrder.ASCENDING)
+               if (sortOrder == null || sortOrder == SortOrder.ASCENDING) {
                        setSortOrder(SortOrder.ASCENDING_INSENSITIVE);
-               else if (sortOrder == SortOrder.DESCENDING)
+               }
+               else if (sortOrder == SortOrder.DESCENDING) {
                        setSortOrder(SortOrder.DESCENDING_INSENSITIVE);
+               }
        }
 
        /**
@@ -321,10 +327,12 @@ public class Ordering implements Comparator<Object>, 
Serializable, XMLSerializab
         * @since 3.0
         */
        public void setCaseSensitive() {
-               if (sortOrder == null || sortOrder == 
SortOrder.ASCENDING_INSENSITIVE)
+               if (sortOrder == null || sortOrder == 
SortOrder.ASCENDING_INSENSITIVE) {
                        setSortOrder(SortOrder.ASCENDING);
-               else if (sortOrder == SortOrder.DESCENDING_INSENSITIVE)
+               }
+               else if (sortOrder == SortOrder.DESCENDING_INSENSITIVE) {
                        setSortOrder(SortOrder.DESCENDING);
+               }
        }
 
        /**

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/query/PrefetchTreeNode.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/query/PrefetchTreeNode.java 
b/cayenne-server/src/main/java/org/apache/cayenne/query/PrefetchTreeNode.java
index 2f72e4e..f398d4c 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/query/PrefetchTreeNode.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/query/PrefetchTreeNode.java
@@ -306,7 +306,7 @@ public class PrefetchTreeNode implements Serializable, 
XMLSerializable {
         */
        public void merge(PrefetchTreeNode node) {
                if (node == null) {
-                       throw new NullPointerException("Null node");
+                       throw new IllegalArgumentException("Null node");
                }
 
                PrefetchTreeNode start = node.getName() != null ? 
addPath(node.getName()) : this;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/query/SelectQueryMetadata.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/query/SelectQueryMetadata.java
 
b/cayenne-server/src/main/java/org/apache/cayenne/query/SelectQueryMetadata.java
index 66c947d..5c4ec62 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/query/SelectQueryMetadata.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/query/SelectQueryMetadata.java
@@ -194,7 +194,7 @@ class SelectQueryMetadata extends BaseQueryMetadata {
         */
        public void addPathSplitAliases(String path, String... aliases) {
                if (aliases == null) {
-                       throw new NullPointerException("Null aliases");
+                       throw new IllegalArgumentException("Null aliases");
                }
 
                if (aliases.length == 0) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/query/UpdateBatchQuery.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/query/UpdateBatchQuery.java 
b/cayenne-server/src/main/java/org/apache/cayenne/query/UpdateBatchQuery.java
index 8b44d86..3d9e8e9 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/query/UpdateBatchQuery.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/query/UpdateBatchQuery.java
@@ -69,7 +69,7 @@ public class UpdateBatchQuery extends BatchQuery {
         super(dbEntity, toDbAttributes(qualifierAttributes, 
updatedAttributes), batchCapacity);
 
         if (nullQualifierNames == null) {
-            throw new NullPointerException("Null 'nullQualifierNames'");
+            throw new IllegalArgumentException("Null 'nullQualifierNames'");
         }
 
         this.updatedAttributes = updatedAttributes;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/reflect/BaseToManyProperty.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/BaseToManyProperty.java
 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/BaseToManyProperty.java
index f2c9879..e296d1c 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/BaseToManyProperty.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/BaseToManyProperty.java
@@ -62,7 +62,7 @@ public abstract class BaseToManyProperty extends 
BaseArcProperty implements
 
     public void addTarget(Object source, Object target, boolean setReverse) {
         if (target == null) {
-            throw new NullPointerException("Attempt to add null object.");
+            throw new IllegalArgumentException("Attempt to add null object.");
         }
 
         // TODO, Andrus, 2/9/2006 - CayenneDataObject differences:

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/reflect/ClassDescriptorMap.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/ClassDescriptorMap.java
 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/ClassDescriptorMap.java
index 73992a6..1700f72 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/ClassDescriptorMap.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/ClassDescriptorMap.java
@@ -91,7 +91,7 @@ public class ClassDescriptorMap {
 
     public ClassDescriptor getDescriptor(String entityName) {
         if (entityName == null) {
-            throw new NullPointerException("Null 'entityName'");
+            throw new IllegalArgumentException("Null 'entityName'");
         }
 
         ClassDescriptor cached = descriptors.get(entityName);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/reflect/ConverterFactory.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/ConverterFactory.java 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/ConverterFactory.java
index c0d0b61..8fad950 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/ConverterFactory.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/ConverterFactory.java
@@ -61,10 +61,12 @@ public class ConverterFactory {
                 if (object instanceof Boolean) {
                     return (Boolean)object;
                 } else if (object instanceof Integer || object instanceof Long 
|| object instanceof Short || object instanceof Byte) {
-                       if (((Number)object).longValue() == 0)
-                               return Boolean.FALSE;
-                       else if (((Number)object).longValue() == 1)
-                               return Boolean.TRUE;
+                       if (((Number)object).longValue() == 0) {
+                        return Boolean.FALSE;
+                    }
+                       else if (((Number)object).longValue() == 1) {
+                        return Boolean.TRUE;
+                    }
                 }
 
                 return "true".equalsIgnoreCase(object.toString())
@@ -85,7 +87,7 @@ public class ConverterFactory {
                     return (Long)object;
                 }
 
-                return new Long(object.toString());
+                return Long.valueOf(object.toString());
             }
         };
         
@@ -94,14 +96,14 @@ public class ConverterFactory {
             @Override
             protected Integer convert(Object object, Class<Integer> type) {
                 if (object == null) {
-                    return type.isPrimitive() ? Integer.valueOf(0) : null;
+                    return type.isPrimitive() ? 0 : null;
                 }
 
                 if (object instanceof Integer) {
                     return (Integer)object;
                 }
 
-                return new Integer(object.toString());
+                return Integer.valueOf(object.toString());
             }
         };
 
@@ -110,14 +112,14 @@ public class ConverterFactory {
             @Override
             protected Byte convert(Object object, Class<Byte> type) {
                 if (object == null) {
-                    return type.isPrimitive() ? Byte.valueOf((byte) 0) : null;
+                    return type.isPrimitive() ? (byte) 0 : null;
                 }
 
                 if (object instanceof Byte) {
                     return (Byte)object;
                 }
 
-                return new Byte(object.toString());
+                return Byte.valueOf(object.toString());
             }
         };
 
@@ -126,14 +128,14 @@ public class ConverterFactory {
             @Override
             protected Short convert(Object object, Class<Short> type) {
                 if (object == null) {
-                    return type.isPrimitive() ? Short.valueOf((short) 0) : 
null;
+                    return type.isPrimitive() ? (short) 0 : null;
                 }
 
                 if (object instanceof Short) {
                     return (Short)object;
                 }
 
-                return new Short(object.toString());
+                return Short.valueOf(object.toString());
             }
         };
 
@@ -142,7 +144,7 @@ public class ConverterFactory {
             @Override
             protected Character convert(Object object, Class<Character> type) {
                 if (object == null) {
-                    return type.isPrimitive() ? Character.valueOf((char) 0) : 
null;
+                    return type.isPrimitive() ? (char) 0 : null;
                 }
 
                 if (object instanceof Character) {
@@ -159,14 +161,14 @@ public class ConverterFactory {
             @Override
             protected Double convert(Object object, Class<Double> type) {
                 if (object == null) {
-                    return type.isPrimitive() ? new Double(0.0d) : null;
+                    return type.isPrimitive() ? 0.0d : null;
                 }
 
                 if (object instanceof Double) {
                     return (Double)object;
                 }
 
-                return new Double(object.toString());
+                return Double.valueOf(object.toString());
             }
         };
 
@@ -175,14 +177,14 @@ public class ConverterFactory {
             @Override
             protected Float convert(Object object, Class<Float> type) {
                 if (object == null) {
-                    return type.isPrimitive() ? new Float(0.0f) : null;
+                    return type.isPrimitive() ? 0.0f : null;
                 }
 
                 if (object instanceof Float) {
                     return (Float)object;
                 }
 
-                return new Float(object.toString());
+                return Float.valueOf(object.toString());
             }
         };
 
@@ -221,9 +223,15 @@ public class ConverterFactory {
                Converter<Date> toDateConverter = new Converter<Date>() {
                        @Override
                        protected Date convert(Object value, Class<Date> type) {
-                               if (value == null) return null;
-                               if (value instanceof Date) return (Date) value;
-                               if (value instanceof Number) return new 
Date(((Number)value).longValue());
+                               if (value == null) {
+                    return null;
+                }
+                               if (value instanceof Date) {
+                    return (Date) value;
+                }
+                               if (value instanceof Number){
+                                   return new 
Date(((Number)value).longValue());
+                }
                                return new Date(value.toString());
                        }
                };
@@ -231,9 +239,15 @@ public class ConverterFactory {
                Converter<Timestamp> toTimestampConverter = new 
Converter<Timestamp>() {
                        @Override
                        protected Timestamp convert(Object value, 
Class<Timestamp> type) {
-                               if (value == null) return null;
-                               if (value instanceof Timestamp) return 
(Timestamp) value;
-                               if (value instanceof Number) return new 
Timestamp(((Number)value).longValue());
+                               if (value == null) {
+                    return null;
+                }
+                               if (value instanceof Timestamp) {
+                    return (Timestamp) value;
+                }
+                               if (value instanceof Number){
+                                   return new 
Timestamp(((Number)value).longValue());
+                }
                                return new 
Timestamp(Date.parse(value.toString()));
                        }
                };

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry.java
 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry.java
index 3b01d5e..31773bb 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry.java
@@ -167,7 +167,7 @@ public class LifecycleCallbackRegistry {
         */
        public void addListener(Object listener) {
                if (listener == null) {
-                       throw new NullPointerException("Null listener");
+                       throw new IllegalArgumentException("Null listener");
                }
 
                Class<?> listenerType = listener.getClass();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/reflect/PersistentDescriptor.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/PersistentDescriptor.java
 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/PersistentDescriptor.java
index 548ea90..d1497aa 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/PersistentDescriptor.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/PersistentDescriptor.java
@@ -309,7 +309,7 @@ public class PersistentDescriptor implements 
ClassDescriptor {
         */
        public Object createObject() {
                if (objectClass == null) {
-                       throw new NullPointerException("Null objectClass. 
Descriptor wasn't initialized properly.");
+                       throw new IllegalArgumentException("Null objectClass. 
Descriptor wasn't initialized properly.");
                }
 
                try {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/reflect/PersistentDescriptorFactory.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/PersistentDescriptorFactory.java
 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/PersistentDescriptorFactory.java
index c31d754..dbc05c7 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/PersistentDescriptorFactory.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/PersistentDescriptorFactory.java
@@ -90,11 +90,11 @@ public abstract class PersistentDescriptorFactory 
implements ClassDescriptorFact
                 String collectionType = relationship.getCollectionType();
                 if (collectionType == null || 
ObjRelationship.DEFAULT_COLLECTION_TYPE.equals(collectionType)) {
                     createToManyListProperty(descriptor, relationship);
-                } else if (collectionType.equals("java.util.Map")) {
+                } else if ("java.util.Map".equals(collectionType)) {
                     createToManyMapProperty(descriptor, relationship);
-                } else if (collectionType.equals("java.util.Set")) {
+                } else if ("java.util.Set".equals(collectionType)) {
                     createToManySetProperty(descriptor, relationship);
-                } else if (collectionType.equals("java.util.Collection")) {
+                } else if ("java.util.Collection".equals(collectionType)) {
                     createToManyCollectionProperty(descriptor, relationship);
                 } else {
                     throw new IllegalArgumentException("Unsupported to-many 
collection type: " + collectionType);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/reflect/PropertyAccessor.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/PropertyAccessor.java 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/PropertyAccessor.java
index c9812cf..21f75e9 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/PropertyAccessor.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/PropertyAccessor.java
@@ -29,7 +29,7 @@ public class PropertyAccessor implements Accessor {
 
     public PropertyAccessor(PropertyDescriptor property) {
         if (property == null) {
-            throw new NullPointerException("Null property");
+            throw new IllegalArgumentException("Null property");
         }
         this.property = property;
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/reflect/ToAnyConverter.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/ToAnyConverter.java 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/ToAnyConverter.java
index cc25824..d028ac1 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/ToAnyConverter.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/ToAnyConverter.java
@@ -29,8 +29,12 @@ import org.apache.cayenne.CayenneRuntimeException;
 public class ToAnyConverter<T> extends Converter<T> {
        @Override
        protected T convert(Object value, Class<T> type) {
-               if (value == null) return null;
-               if (type.isAssignableFrom(value.getClass())) return (T) value; 
// no conversion needed
+               if (value == null) {
+            return null;
+        }
+               if (type.isAssignableFrom(value.getClass())) {
+            return (T) value; // no conversion needed
+        }
                
         try {
             Constructor<?> constructor;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/reflect/valueholder/ValueHolderMapProperty.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/valueholder/ValueHolderMapProperty.java
 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/valueholder/ValueHolderMapProperty.java
index 2a91499..49887d1 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/reflect/valueholder/ValueHolderMapProperty.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/reflect/valueholder/ValueHolderMapProperty.java
@@ -46,7 +46,7 @@ class ValueHolderMapProperty extends 
ValueHolderToManyProperty implements
     public void addTarget(Object source, Object target, boolean setReverse) {
 
         if (target == null) {
-            throw new NullPointerException("Attempt to add null object.");
+            throw new IllegalArgumentException("Attempt to add null object.");
         }
 
         // Now do the rest of the normal handling (regardless of whether it was

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/resource/FilesystemResourceLocator.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/resource/FilesystemResourceLocator.java
 
b/cayenne-server/src/main/java/org/apache/cayenne/resource/FilesystemResourceLocator.java
index 8bd3128..9867a95 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/resource/FilesystemResourceLocator.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/resource/FilesystemResourceLocator.java
@@ -66,7 +66,7 @@ public class FilesystemResourceLocator implements 
ResourceLocator {
      */
     public FilesystemResourceLocator(Collection<File> roots) {
         if (roots == null) {
-            throw new NullPointerException("Null roots");
+            throw new IllegalArgumentException("Null roots");
         }
 
         init(roots.toArray(new File[roots.size()]));

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/util/ReferenceMap.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/util/ReferenceMap.java 
b/cayenne-server/src/main/java/org/apache/cayenne/util/ReferenceMap.java
index 99a91a4..d3035f9 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/util/ReferenceMap.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/util/ReferenceMap.java
@@ -146,7 +146,7 @@ abstract class ReferenceMap<K, V, R extends Reference<V>> 
extends AbstractMap<K,
     @Override
     public V put(K key, V value) {
         if(value == null) {
-            throw new NullPointerException("ReferenceMap can't contain null 
values");
+            throw new IllegalArgumentException("ReferenceMap can't contain 
null values");
         }
         checkReferenceQueue();
         R refValue = newReference(value);
@@ -172,7 +172,7 @@ abstract class ReferenceMap<K, V, R extends Reference<V>> 
extends AbstractMap<K,
         checkReferenceQueue();
         for(Map.Entry<? extends K, ? extends V> entry : m.entrySet()) {
             if(entry.getValue() == null) {
-                throw new NullPointerException("ReferenceMap can't contain 
null values");
+                throw new IllegalArgumentException("ReferenceMap can't contain 
null values");
             }
             R value = newReference(entry.getValue());
             map.put(entry.getKey(), value);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/util/RegexUtil.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/util/RegexUtil.java 
b/cayenne-server/src/main/java/org/apache/cayenne/util/RegexUtil.java
index 2292caf..c07c4a4 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/util/RegexUtil.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/util/RegexUtil.java
@@ -75,7 +75,7 @@ class RegexUtil {
      */
     static String sqlPatternToRegex(String pattern) {
         if (pattern == null) {
-            throw new NullPointerException("Null pattern.");
+            throw new IllegalArgumentException("Null pattern.");
         }
 
         if (pattern.length() == 0) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/util/RelationshipFault.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/util/RelationshipFault.java 
b/cayenne-server/src/main/java/org/apache/cayenne/util/RelationshipFault.java
index 067e7cb..6654d4c 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/util/RelationshipFault.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/util/RelationshipFault.java
@@ -46,11 +46,11 @@ public abstract class RelationshipFault {
 
     public RelationshipFault(Persistent relationshipOwner, String 
relationshipName) {
         if (relationshipOwner == null) {
-            throw new NullPointerException("'relationshipOwner' can't be 
null.");
+            throw new IllegalArgumentException("'relationshipOwner' can't be 
null.");
         }
 
         if (relationshipName == null) {
-            throw new NullPointerException("'relationshipName' can't be 
null.");
+            throw new IllegalArgumentException("'relationshipName' can't be 
null.");
         }
 
         this.relationshipOwner = relationshipOwner;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/util/Util.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/util/Util.java 
b/cayenne-server/src/main/java/org/apache/cayenne/util/Util.java
index 5fdfcf4..7aa0f9b 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/util/Util.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/util/Util.java
@@ -295,8 +295,9 @@ public class Util {
         * @since 4.1
         */
        public static String capitalized(String name) {
-               if (name == null || name.length() == 0)
+               if (name == null || name.length() == 0) {
                        return name;
+               }
 
                char c = Character.toUpperCase(name.charAt(0));
                return (name.length() == 1) ? Character.toString(c) : c + 
name.substring(1);
@@ -308,8 +309,9 @@ public class Util {
         * @since 4.2
         */
        public static String uncapitalized(String aString) {
-               if (aString == null || aString.length() == 0)
+               if (aString == null || aString.length() == 0) {
                        return aString;
+               }
 
                char c = Character.toLowerCase(aString.charAt(0));
                return (aString.length() == 1) ? Character.toString(c) : c + 
aString.substring(1);
@@ -393,13 +395,15 @@ public class Util {
         * @since 3.0
         */
        public static String stripPackageName(String className) {
-               if (className == null || className.length() == 0)
+               if (className == null || className.length() == 0) {
                        return className;
+               }
 
                int lastDot = className.lastIndexOf('.');
 
-               if ((-1 == lastDot) || ((className.length() - 1) == lastDot))
+               if ((-1 == lastDot) || ((className.length() - 1) == lastDot)) {
                        return className;
+               }
 
                return className.substring(lastDot + 1);
        }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/util/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/util/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java
 
b/cayenne-server/src/main/java/org/apache/cayenne/util/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java
index 91f15f2..a76b35c 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/util/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/util/concurrentlinkedhashmap/ConcurrentLinkedHashMap.java
@@ -258,7 +258,7 @@ public class ConcurrentLinkedHashMap<K, V> extends 
AbstractMap<K, V> implements
     /** Asserts that the object is not null. */
     static void checkNotNull(Object o) {
         if (o == null) {
-            throw new NullPointerException();
+            throw new IllegalArgumentException();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/main/java/org/apache/cayenne/validation/BeanValidationFailure.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/main/java/org/apache/cayenne/validation/BeanValidationFailure.java
 
b/cayenne-server/src/main/java/org/apache/cayenne/validation/BeanValidationFailure.java
index 6969b16..47e4784 100644
--- 
a/cayenne-server/src/main/java/org/apache/cayenne/validation/BeanValidationFailure.java
+++ 
b/cayenne-server/src/main/java/org/apache/cayenne/validation/BeanValidationFailure.java
@@ -80,7 +80,7 @@ public class BeanValidationFailure extends 
SimpleValidationFailure {
 
     public static ValidationFailure validateMandatory(Object bean, String 
attribute) {
         if (bean == null) {
-            throw new NullPointerException("Null bean.");
+            throw new IllegalArgumentException("Null bean.");
         }
 
         try {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/cayenne-server/src/test/java/org/apache/cayenne/util/WeakValueMapTest.java
----------------------------------------------------------------------
diff --git 
a/cayenne-server/src/test/java/org/apache/cayenne/util/WeakValueMapTest.java 
b/cayenne-server/src/test/java/org/apache/cayenne/util/WeakValueMapTest.java
index ace6579..4aeced3 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/util/WeakValueMapTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/util/WeakValueMapTest.java
@@ -205,13 +205,13 @@ public class WeakValueMapTest {
         }
     }
 
-    @Test(expected = NullPointerException.class)
+    @Test(expected = IllegalArgumentException.class)
     public void testPutNullValue() {
         Map<Object, Object> map = new WeakValueMap<>();
         map.put("1", null);
     }
 
-    @Test(expected = NullPointerException.class)
+    @Test(expected = IllegalArgumentException.class)
     public void testPutAllNullValue() {
 
         Map<Object, Object> values = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/87c6ccc8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 51fbc47..6295c70 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,10 +41,6 @@
                <slf4j.version>1.7.25</slf4j.version>
                <ant.version>1.9.9</ant.version>
 
-        <pmd.skip>false</pmd.skip>
-        <checkstyle.skip>false</checkstyle.skip>
-        <findbugs.skip>false</findbugs.skip>
-
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     </properties>
@@ -970,7 +966,7 @@
                             <artifactId>maven-checkstyle-plugin</artifactId>
                             <version>2.17</version>
                             <configuration>
-                                <skip>${checkstyle.skip}</skip>
+                                <skip>true</skip>
                                 <consoleOutput>false</consoleOutput>
                                 <enableRulesSummary>false</enableRulesSummary>
                                 <failOnViolation>false</failOnViolation>
@@ -999,7 +995,7 @@
                             <artifactId>maven-pmd-plugin</artifactId>
                             <version>3.8</version>
                             <configuration>
-                                <skip>${pmd.skip}</skip>
+                                <skip>true</skip>
                                 <sourceEncoding>utf-8</sourceEncoding>
                                 <targetJdk>1.8</targetJdk>
                                 <verbose>true</verbose>

Reply via email to