Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing PR - java.lsp.server #24

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open

Testing PR - java.lsp.server #24

wants to merge 56 commits into from

Conversation

jlahoda
Copy link
Owner

@jlahoda jlahoda commented Mar 10, 2019

No description provided.

List<FileObject> projectCandidates = new ArrayList<>();
List<WorkspaceFolder> folders = init.getWorkspaceFolders();
if (folders != null) {
for (WorkspaceFolder w : folders) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jackpot:
warning: Can use functional operations

}
}
List<Project> projects = new ArrayList<>();
for (FileObject candidate : projectCandidates) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jackpot:
warning: Can use functional operations

import java.io.InputStream;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jackpot:
warning: Unused Import

import org.openide.filesystems.FileUtil;
import org.openide.modules.ModuleInfo;
import org.openide.modules.Places;
import org.openide.util.Exceptions;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jackpot:
warning: Unused Import

import org.netbeans.api.project.ui.OpenProjects;
import org.netbeans.modules.java.lsp.server.text.TextDocumentServiceImpl;
import org.netbeans.modules.java.lsp.server.workspace.WorkspaceServiceImpl;
import org.netbeans.modules.parsing.impl.indexing.DefaultCacheFolderProvider;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jackpot:
warning: Unused Import

import org.netbeans.modules.parsing.impl.indexing.DefaultCacheFolderProvider;
import org.netbeans.modules.parsing.impl.indexing.implspi.CacheFolderProvider;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileUtil;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jackpot:
warning: Unused Import

//XXX: ensure project opened:
try {
Class.forName("org.netbeans.modules.project.ui.OpenProjectList", false, Lookup.getDefault().lookup(ClassLoader.class)).getDeclaredMethod("waitProjectsFullyOpen").invoke(null);
} catch (Exception ex) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jackpot:
warning: Can be replaced with multicatch or several catch clauses catching specific exceptions


while (true) {
try {
Thread.sleep(100000);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jackpot:
warning: Thread.sleep called in loop

case RETURN: returnTags.add(tag); break;
case THROWS: throwsTags.add(tag); break;
case PARAM: paramTags.add(tag); break;
default: otherTags.add(tag);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jackpot:
warning: Can use functional operations

import com.sun.javadoc.MethodDoc;
import com.sun.javadoc.ParamTag;
import com.sun.javadoc.ThrowsTag;
import com.sun.javadoc.Type;
import com.sun.source.doctree.AttributeTree;
import com.sun.source.doctree.AuthorTree;
import com.sun.source.doctree.CommentTree;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jackpot:
warning: Unused Import

import com.sun.source.tree.Tree;
import com.sun.source.util.DocSourcePositions;
import com.sun.source.util.DocTreePath;
import com.sun.source.util.DocTreePathScanner;
import com.sun.source.util.TreePath;
import com.sun.tools.doclint.HtmlTag;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jackpot:
warning: Unused Import

jlahoda pushed a commit that referenced this pull request Aug 7, 2022
The relevant stacktraces for the affected threads are saved below.

As there is also a warning logged with a clear indication:

  WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: ParserManager.parse called in AWT event thread by:
  org.netbeans.modules.micronaut.hyperlink.MicronautJavaHyperlinkProvider.getPropertyName(MicronautJavaHyperlinkProvider.java:151)

Stacktraces:

"AWT-EventQueue-0" #24 prio=6 os_prio=0 cpu=69156.33ms elapsed=76496.39s tid=0x00007feca4122b90 nid=0x106e2a waiting on condition  [0x00007fec9756e000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
	- parking to wait for  <0x00000006d7905fd0> (a java.util.concurrent.locks.ReentrantLock$FairSync)
	at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:211)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire([email protected]/AbstractQueuedSynchronizer.java:715)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire([email protected]/AbstractQueuedSynchronizer.java:938)
	at java.util.concurrent.locks.ReentrantLock$Sync.lock([email protected]/ReentrantLock.java:153)
	at java.util.concurrent.locks.ReentrantLock.lock([email protected]/ReentrantLock.java:322)
	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:170)
	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:83)
	at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:454)
	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:425)
	at org.netbeans.modules.micronaut.hyperlink.MicronautJavaHyperlinkProvider.getPropertyName(MicronautJavaHyperlinkProvider.java:151)
	at org.netbeans.modules.micronaut.hyperlink.MicronautJavaHyperlinkProvider.resolve(MicronautJavaHyperlinkProvider.java:122)
	at org.netbeans.modules.micronaut.hyperlink.MicronautJavaHyperlinkProvider.getHyperlinkSpan(MicronautJavaHyperlinkProvider.java:85)


"Editor Parsing Loop (14-c4f2d87113e1a2d2d4e21e8952e1f99612d5b3fd)" #28 daemon prio=1 os_prio=0 cpu=65769.71ms elapsed=76494.46s tid=0x00007feca4401250 nid=0x106e35 in Object.wait()  [0x00007fec957fe000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait([email protected]/Native Method)
	- waiting on <no object reference available>
	at java.lang.Object.wait([email protected]/Object.java:338)
	at org.netbeans.modules.parsing.impl.TaskProcessor$CurrentRequestReference.setCurrentTask(TaskProcessor.java:1128)
	- locked <0x00000006d75591d8> (a org.netbeans.modules.parsing.impl.TaskProcessor$CurrentRequestReference$CRRLock)
	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:842)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
	at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)

"Module-Actions" apache#163 daemon prio=1 os_prio=0 cpu=2546.95ms elapsed=253.00s tid=0x00007fec806c9c90 nid=0x1abee2 in Object.wait()  [0x00007fec951fa000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait([email protected]/Native Method)
	- waiting on <no object reference available>
	at java.lang.Object.wait([email protected]/Object.java:338)
	at javax.swing.text.AbstractDocument.writeLock([email protected]/AbstractDocument.java:1378)
	- locked <0x0000000718f28200> (a org.netbeans.modules.editor.NbEditorDocument)
	at org.netbeans.editor.BaseDocument.extWriteLock(BaseDocument.java:1696)
	at org.netbeans.editor.BaseDocument.atomicLockImpl(BaseDocument.java:1744)
	- locked <0x0000000718f28200> (a org.netbeans.modules.editor.NbEditorDocument)
	- locked <0x0000000718f28200> (a org.netbeans.modules.editor.NbEditorDocument)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:329)
	at org.netbeans.modules.editor.lib.BeforeSaveTasks$TaskRunnable.run(BeforeSaveTasks.java:131)
	at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove.runLocked(TrailingWhitespaceRemove.java:77)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants