Skip to content

while scanning maven multi project sources: java.nio.charset.CodeMalfuntionError #4762

@wumpz

Description

@wumpz

Apache NetBeans version

Apache NetBeans 15

What happened

Background scanning of maven multi project sources:

After this exception the badges will never corrected until I delete the cache directory. The file mentioned should be UTF-8 encoded but does not include UTF-8 specific characters, meaning can be opened using Cp1252 or even ACSCII.

WARNING [org.netbeans.modules.java.source.tasklist.IncorrectErrorBadges]: Incorrect error badges detected, file=C:\Users\tw\AppData\Local\NetBeans\Cache\15\index\s1777\java\15\gensrc\com\gingko\tools\abw\core\AbwToGMDatabase.java.
WARNING [org.netbeans.modules.java.source.tasklist.IncorrectErrorBadges]: The file is not on its own source classpath, ignoring.
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.search.SearchTask
java.lang.IllegalArgumentException: newPosition > limit: (1 > 0)
	at java.base/java.nio.Buffer.createPositionException(Buffer.java:341)
	at java.base/java.nio.Buffer.position(Buffer.java:316)
	at java.base/java.nio.ByteBuffer.position(ByteBuffer.java:1516)
	at java.base/java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:622)
	at org.netbeans.api.queries.FileEncodingQuery$ProxyCharset$ProxyDecoder.decodeLoop(FileEncodingQuery.java:191)
	at java.base/java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:585)
Caused: java.nio.charset.CoderMalfunctionError
	at java.base/java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:587)
	at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:305)
	at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188)
	at java.base/java.io.InputStreamReader.read(InputStreamReader.java:177)
	at java.base/java.io.BufferedReader.fill(BufferedReader.java:162)
	at java.base/java.io.BufferedReader.read(BufferedReader.java:183)
	at org.netbeans.modules.search.matcher.LineReader.readNext(LineReader.java:70)
	at org.netbeans.modules.search.matcher.SingleLineStreamMatcher.getTextDetailsSL(SingleLineStreamMatcher.java:102)
	at org.netbeans.modules.search.matcher.SingleLineStreamMatcher.checkMeasuredInternal(SingleLineStreamMatcher.java:68)
	at org.netbeans.modules.search.matcher.AbstractMatcher.check(AbstractMatcher.java:53)
	at org.netbeans.modules.search.matcher.DefaultMatcher.checkMeasuredInternal(DefaultMatcher.java:93)
	at org.netbeans.modules.search.matcher.AbstractMatcher.check(AbstractMatcher.java:53)
	at org.netbeans.modules.search.BasicComposition.start(BasicComposition.java:78)
	at org.netbeans.modules.search.SearchTask.run(SearchTask.java:88)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

How to reproduce

No response

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows 11

JDK

JDK 17

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions