phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdsi...@apache.org
Subject phoenix git commit: PHOENIX-4150 nit: adding license and reformating comments
Date Fri, 08 Sep 2017 22:46:11 GMT
Repository: phoenix
Updated Branches:
  refs/heads/master 481440d08 -> 2ad5d4b48


PHOENIX-4150 nit: adding license and reformating comments

Signed-off-by: Thomas D'Silva <tdsilva@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/2ad5d4b4
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/2ad5d4b4
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/2ad5d4b4

Branch: refs/heads/master
Commit: 2ad5d4b48c16743b3f3968a858f9da19c14070fa
Parents: 481440d
Author: aertoria <castives@gmail.com>
Authored: Fri Sep 8 13:25:28 2017 -0700
Committer: Thomas D'Silva <tdsilva@apache.org>
Committed: Fri Sep 8 15:35:46 2017 -0700

----------------------------------------------------------------------
 .../query/PropertyNotAllowedException.java      | 16 +++++++++++
 .../apache/phoenix/query/PropertyPolicy.java    |  6 ++--
 .../phoenix/query/TestPropertyPolicy.java       | 29 ++++++++++++++------
 .../org.apache.phoenix.query.PropertyPolicy     | 15 ++++++++++
 4 files changed, 56 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2ad5d4b4/phoenix-core/src/main/java/org/apache/phoenix/query/PropertyNotAllowedException.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/PropertyNotAllowedException.java
b/phoenix-core/src/main/java/org/apache/phoenix/query/PropertyNotAllowedException.java
index ed0e23e..9d9eaf9 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/query/PropertyNotAllowedException.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/query/PropertyNotAllowedException.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.phoenix.query;
 
 import java.sql.SQLException;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2ad5d4b4/phoenix-core/src/main/java/org/apache/phoenix/query/PropertyPolicy.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/PropertyPolicy.java b/phoenix-core/src/main/java/org/apache/phoenix/query/PropertyPolicy.java
index 3314a13..a59f912 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/query/PropertyPolicy.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/query/PropertyPolicy.java
@@ -36,10 +36,12 @@ import java.util.Properties;
  *      final Set<String> offendingProperties = new HashSet<>();
  *
  *      for(Object k:properties.keySet()){
- *          if (propertiesKeyDisAllowed.contains(k)) offendingProperties.put((String)k,properties.getProperty((String)k));
+ *          if (propertiesKeyDisAllowed.contains(k)) offendingProperties
+ *          .put((String)k,properties.getProperty((String)k));
  *      }
  *
- *      if (offendingProperties.size()>0) throw new IllegalArgumentException("properties
not allowed. offending properties" + offendingProperties);
+ *      if (offendingProperties.size()>0) throw new IllegalArgumentException(
+ *      "properties not allowed. offending properties" + offendingProperties);
  *  }
  *}
  *</code>

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2ad5d4b4/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java b/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
index ddc452c..8573bff 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
@@ -1,7 +1,19 @@
 /*
- * Copyright, 1999-2013, SALESFORCE.com
- * All Rights Reserved
- * Company Confidential
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.apache.phoenix.query;
 
@@ -19,16 +31,17 @@ import static java.util.Arrays.asList;
  * configuration settings.
  */
 public class TestPropertyPolicy implements PropertyPolicy {
-  final static Set<String> propertiesKeyDisAllowed = Collections.unmodifiableSet(
-      new HashSet<>(asList("DisallowedProperty")));
+  final static Set<String> propertiesKeyDisAllowed =
+      Collections.unmodifiableSet(new HashSet<>(asList("DisallowedProperty")));
 
   @Override public void evaluate(Properties properties) throws PropertyNotAllowedException
{
     final Properties offendingProperties = new Properties();
 
-    for(Object k:properties.keySet()){
-      if (propertiesKeyDisAllowed.contains(k)) offendingProperties.put((String)k,properties.getProperty((String)k));
+    for (Object k : properties.keySet()) {
+      if (propertiesKeyDisAllowed.contains(k))
+        offendingProperties.put((String) k, properties.getProperty((String) k));
     }
 
-    if (offendingProperties.size()>0) throw new PropertyNotAllowedException(offendingProperties);
+    if (offendingProperties.size() > 0) throw new PropertyNotAllowedException(offendingProperties);
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2ad5d4b4/phoenix-core/src/test/resources/META-INF/services/org.apache.phoenix.query.PropertyPolicy
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/resources/META-INF/services/org.apache.phoenix.query.PropertyPolicy
b/phoenix-core/src/test/resources/META-INF/services/org.apache.phoenix.query.PropertyPolicy
index 07960b6..9347fd3 100644
--- a/phoenix-core/src/test/resources/META-INF/services/org.apache.phoenix.query.PropertyPolicy
+++ b/phoenix-core/src/test/resources/META-INF/services/org.apache.phoenix.query.PropertyPolicy
@@ -1 +1,16 @@
+# 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.
 org.apache.phoenix.query.TestPropertyPolicy
\ No newline at end of file


Mime
View raw message