You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by td...@apache.org on 2017/09/08 22:45:23 UTC

phoenix git commit: PHOENIX-4150 nit: adding license and reformating comments

Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 16daebb7e -> cc36a9a47


PHOENIX-4150 nit: adding license and reformating comments

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


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

Branch: refs/heads/4.x-HBase-1.2
Commit: cc36a9a476e4d7bcd23ddda84ae1e5adbf47ddf1
Parents: 16daebb
Author: aertoria <ca...@gmail.com>
Authored: Fri Sep 8 13:25:28 2017 -0700
Committer: Thomas D'Silva <td...@apache.org>
Committed: Fri Sep 8 15:38:25 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/cc36a9a4/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/cc36a9a4/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/cc36a9a4/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/cc36a9a4/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