You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by ma...@apache.org on 2017/10/08 14:48:28 UTC

incubator-netbeans git commit: [NETBEANS-54] Module Review db.core

Repository: incubator-netbeans
Updated Branches:
  refs/heads/master 9aaf12b3b -> 673791e9b


[NETBEANS-54] Module Review db.core

- no external libraries

- checked Rat report; missing license headers added,
  unrecognized license headers manually changed, ignored
  manifest.mf and *.form (see central problems)

- skimmed through the module, did not notice additional
  problems


Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans/commit/673791e9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans/tree/673791e9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans/diff/673791e9

Branch: refs/heads/master
Commit: 673791e9b98b475f6b33a973468d0b7c89bf23bb
Parents: 9aaf12b
Author: Matthias Bläsing <mb...@doppel-helix.eu>
Authored: Sun Sep 24 21:37:02 2017 +0200
Committer: Matthias Bläsing <mb...@doppel-helix.eu>
Committed: Sun Oct 8 16:43:28 2017 +0200

----------------------------------------------------------------------
 .../modules/db/core/resources/SQLTemplate.sql   | 49 ++++++--------------
 .../netbeans/modules/db/sql/history/jaxb.index  | 16 +++++++
 db.core/test/private.properties.template        | 18 +++++++
 db.core/test/unit/data/mysql5.0/dbcreate.sql    | 16 +++++++
 .../test/unit/data/mysql5.0/dbdata.properties   | 27 +++++++++++
 db.core/test/unit/data/mysql5.0/dbdata.txt      | 11 -----
 db.core/test/unit/data/mysql5.0/dbdel.sql       | 16 +++++++
 db.core/test/unit/data/mysql5.0/dbselect.sql    | 16 +++++++
 .../db/sql/execute/ui/util/TestCaseContext.java |  2 +-
 .../execute/ui/util/TestCaseDataFactory.java    |  4 +-
 .../modules/db/sql/history/sql_history.xml      | 20 ++++++++
 11 files changed, 146 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/673791e9/db.core/src/org/netbeans/modules/db/core/resources/SQLTemplate.sql
----------------------------------------------------------------------
diff --git a/db.core/src/org/netbeans/modules/db/core/resources/SQLTemplate.sql b/db.core/src/org/netbeans/modules/db/core/resources/SQLTemplate.sql
index 0ce4410..8d2bfe6 100644
--- a/db.core/src/org/netbeans/modules/db/core/resources/SQLTemplate.sql
+++ b/db.core/src/org/netbeans/modules/db/core/resources/SQLTemplate.sql
@@ -1,41 +1,20 @@
 <#--
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+    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
 
-Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
+      http://www.apache.org/licenses/LICENSE-2.0
 
-Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-Other names may be trademarks of their respective owners.
-
-The contents of this file are subject to the terms of either the GNU
-General Public License Version 2 only ("GPL") or the Common
-Development and Distribution License("CDDL") (collectively, the
-"License"). You may not use this file except in compliance with the
-License. You can obtain a copy of the License at
-http://www.netbeans.org/cddl-gplv2.html
-or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
-specific language governing permissions and limitations under the
-License.  When distributing the software, include this License Header
-Notice in each file and include the License file at
-nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the GPL Version 2 section of the License file that
-accompanied this code. If applicable, add the following below the
-License Header, with the fields enclosed by brackets [] replaced by
-your own identifying information:
-"Portions Copyrighted [year] [name of copyright owner]"
-
-If you wish your version of this file to be governed by only the CDDL
-or only the GPL Version 2, indicate your decision by adding
-"[Contributor] elects to include this software in this distribution
-under the [CDDL or GPL Version 2] license." If you do not indicate a
-single choice of license, a recipient has the option to distribute
-your version of this file under either the CDDL, the GPL Version 2 or
-to extend the choice of license to its licensees as provided above.
-However, if you add GPL Version 2 code and therefore, elected the GPL
-Version 2 license, then the option applies only if the new code is
-made subject to such option by the copyright holder.
-
-Contributor(s):
+    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.
 -->
 <#assign licenseFirst = "/* ">
 <#assign licensePrefix = " * ">

http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/673791e9/db.core/src/org/netbeans/modules/db/sql/history/jaxb.index
----------------------------------------------------------------------
diff --git a/db.core/src/org/netbeans/modules/db/sql/history/jaxb.index b/db.core/src/org/netbeans/modules/db/sql/history/jaxb.index
index 85ca9df..9e4b7bf 100644
--- a/db.core/src/org/netbeans/modules/db/sql/history/jaxb.index
+++ b/db.core/src/org/netbeans/modules/db/sql/history/jaxb.index
@@ -1,2 +1,18 @@
+# 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.
 SQLHistory
 SQLHistoryEntry
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/673791e9/db.core/test/private.properties.template
----------------------------------------------------------------------
diff --git a/db.core/test/private.properties.template b/db.core/test/private.properties.template
index 89bb805..55cad71 100644
--- a/db.core/test/private.properties.template
+++ b/db.core/test/private.properties.template
@@ -1,3 +1,21 @@
+# 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.
+#
+#
 # This is a template for how you might set up your private.properties
 # file for running unit tests using Java DB network server.  Make sure
 # you start the server before running tests.

http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/673791e9/db.core/test/unit/data/mysql5.0/dbcreate.sql
----------------------------------------------------------------------
diff --git a/db.core/test/unit/data/mysql5.0/dbcreate.sql b/db.core/test/unit/data/mysql5.0/dbcreate.sql
index d6e713a..ab05a2a 100644
--- a/db.core/test/unit/data/mysql5.0/dbcreate.sql
+++ b/db.core/test/unit/data/mysql5.0/dbcreate.sql
@@ -1,2 +1,18 @@
+--  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.
 create table simpletable (tinyintc TINYINT,smallintc SMALLINT,varcharc VARCHAR(20),intc INT,bigintc BIGINT,datec DATE,charc CHAR,datetime DATETIME,floatc FLOAT,doublec DOUBLE,doubleprecisionc DOUBLE PRECISION);
 INSERT INTO simpletable (tinyintc,smallintc,varcharc,intc,bigintc,datec,charc,datetime,floatc,doublec,doubleprecisionc) VALUES (-80,-32766,'ala',123456,123,'2005-10-10','c','2005-04-01 22:12:32',2.65,-217.5,4.32);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/673791e9/db.core/test/unit/data/mysql5.0/dbdata.properties
----------------------------------------------------------------------
diff --git a/db.core/test/unit/data/mysql5.0/dbdata.properties b/db.core/test/unit/data/mysql5.0/dbdata.properties
new file mode 100644
index 0000000..ce24cc2
--- /dev/null
+++ b/db.core/test/unit/data/mysql5.0/dbdata.properties
@@ -0,0 +1,27 @@
+# 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.
+tinyintc=-80
+smallintc=-32766
+varcharc=ala
+intc=123456
+bigintc=123
+datec=Oct 10, 2005
+charc=c
+datetime=Apr 1, 2005 10:12:32 PM
+floatc=2.65
+doublec=-217.5
+doubleprecisionc=4.32

http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/673791e9/db.core/test/unit/data/mysql5.0/dbdata.txt
----------------------------------------------------------------------
diff --git a/db.core/test/unit/data/mysql5.0/dbdata.txt b/db.core/test/unit/data/mysql5.0/dbdata.txt
deleted file mode 100644
index 83d4501..0000000
--- a/db.core/test/unit/data/mysql5.0/dbdata.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-tinyintc=-80
-smallintc=-32766
-varcharc=ala
-intc=123456
-bigintc=123
-datec=Oct 10, 2005
-charc=c
-datetime=Apr 1, 2005 10:12:32 PM
-floatc=2.65
-doublec=-217.5
-doubleprecisionc=4.32

http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/673791e9/db.core/test/unit/data/mysql5.0/dbdel.sql
----------------------------------------------------------------------
diff --git a/db.core/test/unit/data/mysql5.0/dbdel.sql b/db.core/test/unit/data/mysql5.0/dbdel.sql
index 9492d24..98b0e19 100644
--- a/db.core/test/unit/data/mysql5.0/dbdel.sql
+++ b/db.core/test/unit/data/mysql5.0/dbdel.sql
@@ -1 +1,17 @@
+--  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.
 drop table simpletable;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/673791e9/db.core/test/unit/data/mysql5.0/dbselect.sql
----------------------------------------------------------------------
diff --git a/db.core/test/unit/data/mysql5.0/dbselect.sql b/db.core/test/unit/data/mysql5.0/dbselect.sql
index d8b3516..0e45d89 100644
--- a/db.core/test/unit/data/mysql5.0/dbselect.sql
+++ b/db.core/test/unit/data/mysql5.0/dbselect.sql
@@ -1 +1,17 @@
+--  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.
 select * from simpletable;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/673791e9/db.core/test/unit/src/org/netbeans/modules/db/sql/execute/ui/util/TestCaseContext.java
----------------------------------------------------------------------
diff --git a/db.core/test/unit/src/org/netbeans/modules/db/sql/execute/ui/util/TestCaseContext.java b/db.core/test/unit/src/org/netbeans/modules/db/sql/execute/ui/util/TestCaseContext.java
index e4108ec..3042bfa 100644
--- a/db.core/test/unit/src/org/netbeans/modules/db/sql/execute/ui/util/TestCaseContext.java
+++ b/db.core/test/unit/src/org/netbeans/modules/db/sql/execute/ui/util/TestCaseContext.java
@@ -49,7 +49,7 @@ public class TestCaseContext {
         setSqlCreate((File)map.get(TestCaseDataFactory.DB_SQLCREATE));
         setSqlDel((File)map.get(TestCaseDataFactory.DB_SQLDEL));
         setSqlSelect((File)map.get(TestCaseDataFactory.DB_SQLSELECT));
-        setData((File)map.get(TestCaseDataFactory.DB_TEXT));
+        setData((File)map.get(TestCaseDataFactory.DB_DATA));
     
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/673791e9/db.core/test/unit/src/org/netbeans/modules/db/sql/execute/ui/util/TestCaseDataFactory.java
----------------------------------------------------------------------
diff --git a/db.core/test/unit/src/org/netbeans/modules/db/sql/execute/ui/util/TestCaseDataFactory.java b/db.core/test/unit/src/org/netbeans/modules/db/sql/execute/ui/util/TestCaseDataFactory.java
index 4d0ad0e..c73fe3a 100644
--- a/db.core/test/unit/src/org/netbeans/modules/db/sql/execute/ui/util/TestCaseDataFactory.java
+++ b/db.core/test/unit/src/org/netbeans/modules/db/sql/execute/ui/util/TestCaseDataFactory.java
@@ -35,11 +35,11 @@ public class TestCaseDataFactory {
    
     public static  String DB_SQLCREATE="dbcreate.sql";
     public static String DB_SQLSELECT="dbselect.sql";
-    public static  String DB_TEXT= "dbdata.txt";
+    public static  String DB_DATA= "dbdata.properties";
     public static  String DB_PROP= "dbprop.properties";
     public static String DB_SQLDEL="dbdel.sql";
     public static String DB_JARS="jar";
-    public static String[] FILES={DB_SQLCREATE,DB_PROP,DB_SQLDEL,DB_SQLSELECT,DB_TEXT};
+    public static String[] FILES={DB_SQLCREATE,DB_PROP,DB_SQLDEL,DB_SQLSELECT,DB_DATA};
     private List list=new ArrayList();
     private static  TestCaseDataFactory factory;
     

http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/673791e9/db.core/test/unit/src/org/netbeans/modules/db/sql/history/sql_history.xml
----------------------------------------------------------------------
diff --git a/db.core/test/unit/src/org/netbeans/modules/db/sql/history/sql_history.xml b/db.core/test/unit/src/org/netbeans/modules/db/sql/history/sql_history.xml
index ea485d9..2744299 100644
--- a/db.core/test/unit/src/org/netbeans/modules/db/sql/history/sql_history.xml
+++ b/db.core/test/unit/src/org/netbeans/modules/db/sql/history/sql_history.xml
@@ -1,4 +1,24 @@
 <?xml version='1.0' encoding='UTF-8' ?>
+<!--
+
+    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.
+
+-->
 <history>
     <sql date='1252931669714' url='jdbc:// mysql'>
         select * from TRAVEL.PERSON