[netbeans] branch master updated: Fixed detection of duplicate types
This is an automated email from the ASF dual-hosted git repository. junichi11 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new 064e9e3b84 Fixed detection of duplicate types new c12e495692 Merge pull request #5534 from KacerCZ/fix-duplicate-type-hint 064e9e3b84 is described below commit 064e9e3b84667fe7faae8c0ee5b68abbabd3dc5c Author: Tomas Prochazka AuthorDate: Sun Feb 19 15:21:38 2023 +0100 Fixed detection of duplicate types Goes through all types and does not return on first error. Partial fix for #5072 --- .../verification/UnusableTypesHintError.java | 3 - .../testDuplicateTypes_01.php | 99 ++ ...plicateTypes_01.php.testDuplicateTypes_01.hints | 114 + .../verification/UnusableTypesHintErrorTest.java | 4 + 4 files changed, 217 insertions(+), 3 deletions(-) diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/verification/UnusableTypesHintError.java b/php/php.editor/src/org/netbeans/modules/php/editor/verification/UnusableTypesHintError.java index b777a168d6..227b7efe82 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/verification/UnusableTypesHintError.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/verification/UnusableTypesHintError.java @@ -430,18 +430,15 @@ public class UnusableTypesHintError extends HintErrorRule { } if (checkedTypes.contains(name)) { createDuplicateTypeError(type, typeName); -return; } else if (checkedTypes.contains(Type.BOOL)) { // bool|false bool|true if (Type.FALSE.equals(name) || Type.TRUE.equals(name)) { createDuplicateTypeError(type, typeName); -return; } } else if (checkedTypes.contains(Type.FALSE) || checkedTypes.contains(Type.TRUE)) { // false|bool true|bool if (Type.BOOL.equals(name)) { createDuplicateTypeError(type, typeName); -return; } } checkedTypes.add(name); diff --git a/php/php.editor/test/unit/data/testfiles/verification/UnusableTypesHintError/testDuplicateTypes_01.php b/php/php.editor/test/unit/data/testfiles/verification/UnusableTypesHintError/testDuplicateTypes_01.php new file mode 100644 index 00..74eb42c6b6 --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/verification/UnusableTypesHintError/testDuplicateTypes_01.php @@ -0,0 +1,99 @@ +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. + */ + +class DuplicateTypes { + +private First|First $union; +private First $intersection; +private First|Second|First|Second $twoUnions; +private First $twoIntersections; + +private bool|true|bool $unionBoolAndTrue; +private bool|false|bool $unionBoolAndFalse; + +private bool|true|First|First $unionAfterBoolAndTrue; +private bool|false|First|First $unionAfterBoolAndFalse; +private true|bool|First|First $unionAfterTrueAndBool; +private false|bool|First|First $unionAfterFalseAndBool; + +public function returnUnion(): First|First { +} + +public function returnIntersection(): First { +} + +public function returnTwoUnions(): First|Second|First|Second { +} + +public function returnTwoIntersections(): First { +} + +public function returnUnionBoolAndTrue(): bool|true|bool { +} + +public function returnUnionBoolAndFalse(): bool|false|bool { +} + +public function returnUnionAfterBoolAndTrue(): bool|true|First|First { +} + +public function returnUnionAfterBoolAndFalse(): bool|false|First|First { +} + +public function returnUnionAfterTrueAndBool(): true|bool|First|First { +} + +public function returnUnionAfterFalseAndBool(): false|bool|First|First { +} + +public function parameterUnion(First|First $union) { +} + +public function parameterIntersection(First $intersection) { +} + +public function parameterTwoUnions(First|Second|First|Second $twoUnions) { +} + +public function parameterTwoIntersections(First $twoIntersections) { +} + +public function parameterUnionBoolAndTrue(bool|true|bool $union) { +} + +public function parameterUnionBoolAndFalse(bool|false|bool $union) { +} + +public function
[netbeans] branch master updated: Audits should not automatically change persistent project settings.
This is an automated email from the ASF dual-hosted git repository. sdedic pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new 1d228b7827 Audits should not automatically change persistent project settings. new f538159e88 Merge pull request #5521 from sdedic/oci/temporary-knowledgebase 1d228b7827 is described below commit 1d228b78270a746a1d1080e62d0bd214f2484276 Author: Svata Dedic AuthorDate: Fri Feb 17 11:59:34 2023 +0100 Audits should not automatically change persistent project settings. --- .../org/netbeans/modules/cloud/oracle/adm/ProjectVulnerability.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/ProjectVulnerability.java b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/ProjectVulnerability.java index be2401c0d2..4a66d0e725 100644 --- a/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/ProjectVulnerability.java +++ b/enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/adm/ProjectVulnerability.java @@ -129,7 +129,8 @@ public final class ProjectVulnerability { }) public CompletableFuture runProjectAudit(KnowledgeBaseItem item, AuditOptions options) { if (item != null) { -setProjectKnowledgeBase(item); +// make transient setting, so that change handler may work against the same knowledgebase. +setProjectKnowledgeBase0(item); } CompletableFuture result = new CompletableFuture<>(); AUDIT_PROCESSOR.post(() -> { @@ -215,7 +216,7 @@ public final class ProjectVulnerability { return item; } -public KnowledgeBaseItem setProjectKnowledgeBase0(KnowledgeBaseItem item) { +private KnowledgeBaseItem setProjectKnowledgeBase0(KnowledgeBaseItem item) { synchronized (this) { lastProfile = OCIManager.getDefault().getActiveProfile(); return knowledgeBaseItem = item; - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[netbeans] branch master updated: Update JSPPARSER to the Jakarta family (covers up to Jakarta EE 8) (#5495)
This is an automated email from the ASF dual-hosted git repository. pepness pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new a9a21dc907 Update JSPPARSER to the Jakarta family (covers up to Jakarta EE 8) (#5495) a9a21dc907 is described below commit a9a21dc9076055324b76a7c7651834f96efea7e3 Author: José Contreras AuthorDate: Mon Feb 20 12:53:02 2023 -0600 Update JSPPARSER to the Jakarta family (covers up to Jakarta EE 8) (#5495) - Change license type to EPL v2.0 - Use one license file for the external jars and the generated jar - Use jakarta family jars - Update jsp impl to 2.3.6 - Update el impl to 3.0.4 - Update glassfish jars to 5.1.0 - Change glassfish version from 4.0 to 5.1.0 in the name of the generated jar and all references to it - Override new getCompilerClassName method --- .../web.core.syntax/nbproject/project.properties | 2 +- .../web/core/resources/jsp-compilation-syscp.xml | 2 +- .../modules/web/core/resources/jsp-compilation.xml | 2 +- enterprise/web.jspparser/build.xml | 16 +- enterprise/web.jspparser/external/binaries-list| 8 +- .../external/common-util-5.0-license.txt | 405 .../generated-glassfish-jspparser-4.0-license.txt | 406 - ...generated-glassfish-jspparser-5.1.0-license.txt | 94 + .../external/glassfish-ee-api-4.1-license.txt | 405 .../external/javax.el-2.2.6-license.txt| 405 .../external/javax.servlet.jsp-2.3.2-license.txt | 405 .../modules/web/jspparser_ext/OptionsImpl.java | 5 + .../web.jspparser/nbproject/project.properties | 8 +- .../modules/web/jspparser/JspParserImpl.java | 2 +- .../web.project/nbproject/project.properties | 2 +- 15 files changed, 120 insertions(+), 2047 deletions(-) diff --git a/enterprise/web.core.syntax/nbproject/project.properties b/enterprise/web.core.syntax/nbproject/project.properties index 9aba393425..7286a24338 100644 --- a/enterprise/web.core.syntax/nbproject/project.properties +++ b/enterprise/web.core.syntax/nbproject/project.properties @@ -65,7 +65,7 @@ test.timeout=600 test-unit-sys-prop.jsp.parser.jars=\ ${o.apache.tools.ant.module.dir}/ant/lib/ant.jar:\ -${web.jspparser.dir}/modules/ext/glassfish-jspparser-4.0.jar:\ +${web.jspparser.dir}/modules/ext/glassfish-jspparser-5.1.0.jar:\ ${servletjspapi.dir}/modules/ext/jsp-parser-ext.jar:\ ${servletjspapi.dir}/modules/ext/servlet4.0-jsp2.3-api.jar:\ ${o.apache.tools.ant.module.dir}/ant/lib/ant-launcher.jar diff --git a/enterprise/web.core/src/org/netbeans/modules/web/core/resources/jsp-compilation-syscp.xml b/enterprise/web.core/src/org/netbeans/modules/web/core/resources/jsp-compilation-syscp.xml index edef988081..3eb2d3ce2c 100644 --- a/enterprise/web.core/src/org/netbeans/modules/web/core/resources/jsp-compilation-syscp.xml +++ b/enterprise/web.core/src/org/netbeans/modules/web/core/resources/jsp-compilation-syscp.xml @@ -29,7 +29,7 @@ classpath jar:nbinst://org.apache.tools.ant.module/ant/lib/ant.jar!/ jar:nbinst://org.netbeans.modules.servletjspapi/modules/ext/servlet4.0-jsp2.3-api.jar!/ - jar:nbinst://org.netbeans.modules.web.jspparser/modules/ext/glassfish-jspparser-4.0.jar!/ + jar:nbinst://org.netbeans.modules.web.jspparser/modules/ext/glassfish-jspparser-5.1.0.jar!/ jar:nbinst://org.netbeans.libs.jstl/modules/ext/jstl-impl.jar!/ jar:nbinst://org.netbeans.modules.web.jsf20/modules/ext/jsf-2_2/javax.faces.jar!/ diff --git a/enterprise/web.core/src/org/netbeans/modules/web/core/resources/jsp-compilation.xml b/enterprise/web.core/src/org/netbeans/modules/web/core/resources/jsp-compilation.xml index c6f1f52340..af58036453 100644 --- a/enterprise/web.core/src/org/netbeans/modules/web/core/resources/jsp-compilation.xml +++ b/enterprise/web.core/src/org/netbeans/modules/web/core/resources/jsp-compilation.xml @@ -29,7 +29,7 @@ classpath jar:nbinst://org.apache.tools.ant.module/ant/lib/ant.jar!/ jar:nbinst://org.netbeans.modules.servletjspapi/modules/ext/servlet4.0-jsp2.3-api.jar!/ - jar:nbinst://org.netbeans.modules.web.jspparser/modules/ext/glassfish-jspparser-4.0.jar!/ + jar:nbinst://org.netbeans.modules.web.jspparser/modules/ext/glassfish-jspparser-5.1.0.jar!/ jar:nbinst://org.netbeans.modules.web.jsf20/modules/ext/jsf-2_2/javax.faces.jar!/ jar:nbinst://org.netbeans.libs.jstl/modules/ext/jstl-api.jar!/ diff --git a/enterprise/web.jspparser/build.xml b/enterprise/web.jspparser/build.xml index ceaeb33476..fb343475a4 100644 --- a/enterprise/web.jspparser/build.xml +++ b/enterprise/web.jspparser/build.xml @@ -26,7 +26,7 @@
[netbeans] branch master updated (41d9b1aeb6 -> 47daafc4a6)
This is an automated email from the ASF dual-hosted git repository. mbien pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git from 41d9b1aeb6 Merge pull request #5507 from sdedic/lsp/project-actions-order new 3debc4b27e Fix spurious messages printed to the console. new e8e56eca4b Fix micronaut tests. new 47daafc4a6 Merge pull request #5538 from sdedic/sdedic/fix-console-logs The 8130 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../micronaut/test/unit/data/gradle/artifacts/multi/gradle.properties | 2 +- .../src/org/netbeans/modules/jshell/editor/ConsoleEditor.java | 4 .../src/org/netbeans/modules/maven/modelcache/MavenProjectCache.java | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[netbeans] branch master updated: Group and define order for project actions.
This is an automated email from the ASF dual-hosted git repository. sdedic pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new 10cf8f57e5 Group and define order for project actions. new 41d9b1aeb6 Merge pull request #5507 from sdedic/lsp/project-actions-order 10cf8f57e5 is described below commit 10cf8f57e58de9cd31a238b956890b2ad61eb86a Author: Svata Dedic AuthorDate: Wed Feb 15 22:26:03 2023 +0100 Group and define order for project actions. --- java/java.lsp.server/vscode/package.json | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/java/java.lsp.server/vscode/package.json b/java/java.lsp.server/vscode/package.json index bbbe553713..d578b8648d 100644 --- a/java/java.lsp.server/vscode/package.json +++ b/java/java.lsp.server/vscode/package.json @@ -584,7 +584,7 @@ "command": "nbls:Tools:org.netbeans.modules.cloud.oracle.actions.DownloadWalletAction", "title": "Add DB Connection" }, -{ + { "command": "nbls:Tools:org.netbeans.modules.cloud.oracle.actions.AddADBAction", "title": "Add Oracle Autonomous Database" }, @@ -789,15 +789,18 @@ }, { "command": "java.project.test", - "when": "view == foundProjects && viewItem =~ /is:project/ && viewItem =~ /^(?!.*is:projectRoot)/ && config.netbeans.javaSupport.enabled" + "when": "view == foundProjects && viewItem =~ /is:project/ && viewItem =~ /^(?!.*is:projectRoot)/ && config.netbeans.javaSupport.enabled", + "group": "F@30" }, { "command": "java.project.compile", - "when": "view == foundProjects && viewItem =~ /is:project/ && config.netbeans.javaSupport.enabled" + "when": "view == foundProjects && viewItem =~ /is:project/ && config.netbeans.javaSupport.enabled", + "group": "F@10" }, { "command": "java.project.clean", - "when": "view == foundProjects && viewItem =~ /is:project/ && config.netbeans.javaSupport.enabled" + "when": "view == foundProjects && viewItem =~ /is:project/ && config.netbeans.javaSupport.enabled", + "group": "F@20" }, { "command": "java.local.db.set.preferred.connection", - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists