You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jt...@apache.org on 2021/11/03 04:35:41 UTC
[netbeans-html4j] 01/02: Enabling Jackpot checks to prevent
accidental usage of ArrayList & co.
This is an automated email from the ASF dual-hosted git repository.
jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-html4j.git
commit 6b414cd22b8b3daaf268bacf5564ad609f00b85b
Author: Jaroslav Tulach <ja...@apidesign.org>
AuthorDate: Thu Jul 15 09:02:58 2021 +0200
Enabling Jackpot checks to prevent accidental usage of ArrayList & co.
---
json-tck/pom.xml | 5 +++
.../java/META-INF/upgrade/AvoidCollections.hint | 42 ++++++++++++++++++++++
2 files changed, 47 insertions(+)
diff --git a/json-tck/pom.xml b/json-tck/pom.xml
index b73c619..f3cecd9 100644
--- a/json-tck/pom.xml
+++ b/json-tck/pom.xml
@@ -55,6 +55,11 @@
<includeDependencySources>true</includeDependencySources>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.netbeans.modules.jackpot30</groupId>
+ <artifactId>jackpot30-maven-plugin</artifactId>
+ <version>12.3</version>
+ </plugin>
</plugins>
</build>
<dependencies>
diff --git a/json-tck/src/main/java/META-INF/upgrade/AvoidCollections.hint b/json-tck/src/main/java/META-INF/upgrade/AvoidCollections.hint
new file mode 100644
index 0000000..92d236e
--- /dev/null
+++ b/json-tck/src/main/java/META-INF/upgrade/AvoidCollections.hint
@@ -0,0 +1,42 @@
+/**
+ * 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.
+ */
+
+new java.util.ArrayList<>()
+=> 'Models.asList() is more lightweight':
+net.java.html.json.Models.asList()
+;;
+
+new java.util.ArrayList()
+=> 'Models.asList() is more lightweight':
+net.java.html.json.Models.asList()
+;;
+
+new java.util.ArrayList<$T>()
+=> 'Models.asList() is more lightweight':
+net.java.html.json.Models.<$T>asList()
+;;
+
+
+java.util.HashSet
+=> 'Avoid HashSet': SimpleMap.create()
+;;
+
+java.util.HashMap
+=> 'Avoid HashMap': SimpleMap.create()
+;;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists