apache / apache/netbeans

Exception when adding jar/folder to library

Open
#5,141 0 comments 0 reactions 0 assignees View on GitHub
kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 16

### What happened

When I click on the button to add the jar files in the library that I just created, the window to choose the files does not open, only an exception is shown in the netbeans status bar.

IllegalArgumentException: Comparison method violates its general contract!

[messages.log](https://github.com/apache/netbeans/files/10296422/messages.log)

### How to reproduce

Tools > Library
New Library, Add Jar/Folder

### Did this work correctly in an earlier version?

Apache NetBeans 12.6 or earlier

### Operating System

Windows 10

### JDK

OpenJDK 64-Bit Server VM 13+33; Oracle Corporation

### Apache NetBeans packaging

Apache NetBeans binary zip

### Anything else

_No response_

### Are you willing to submit a pull request?

Yes

### Code of Conduct

Yes

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure through Tools > Library > New Library > Add Jar/Folder on Windows 10 with Apache NetBeans 16, then inspect the linked messages.log for the comparison exception. Trace the library file-selection entry point and verify that adding a JAR or folder opens the chooser without the exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.