eclipse-jdt / eclipse-jdt/eclipse.jdt.core

ECJ batch compiler logs INFO different then WARNING

Open
#1,717 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
236
Forks
196
Avg merge
1d 10h
Merged PRs (30d)
49

Description

from https://ci.eclipse.org/jdt/job/eclipse.jdt.ui-github/job/PR-997/1/consoleFull
```
23:22:02 [INFO] --- tycho-compiler:4.0.5-SNAPSHOT:compile (default-compile) @ org.eclipse.jdt.ui ---
23:22:02 [INFO] Compiling 1783 source files to /home/jenkins/agent/workspace/eclipse.jdt.ui-github_PR-997/org.eclipse.jdt.ui/target/classes using Eclipse Compiler for Java(TM) 3.36.0.v20231114-0937
23:22:23 [WARNING] /home/jenkins/agent/workspace/eclipse.jdt.ui-github_PR-997/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SuppressWarningsSubProcessor.java:[65]
23:22:23 static final String ADD_SUPPRESSWARNINGS_ID= SuppressWarningsSubProcessorCore.ADD_SUPPRESSWARNINGS_ID;
23:22:23 ^^^^^^^^^^^^^^^^^^^^^^^
23:22:23 The field SuppressWarningsSubProcessor.ADD_SUPPRESSWARNINGS_ID is hiding a field from type SuppressWarningsSubProcessorCore
23:22:23 3. INFO in /home/jenkins/agent/workspace/eclipse.jdt.ui-github_PR-997/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/correction/ChangeCorrectionProposal.java (at line 195)
23:22:23 ITextOperationTarget textOperationTarget= activeEditor.getAdapter(ITextOperationTarget.class);
23:22:23 ^^^^^^^^^^^^
23:22:23 Potential null pointer access: The variable activeEditor may be null at this location
23:22:23 [WARNING] /home/jenkins/agent/workspace/eclipse.jdt.ui-github_PR-997/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/RefactoringActions.java:[53]
23:22:23 private static IType convertToEnclosingOrPrimaryType(IJavaElement element) throws JavaModelException {
23:22:23 ^^^^^^^^^^^^^^^^^^
23:22:23 The declared exception JavaModelException is not actually thrown by the method convertToEnclosingOrPrimaryType(IJavaElement) from type RefactoringActions
```
![image](https://github.com/eclipse-jdt/eclipse.jdt.core/assets/51790620/8fb014d1-1cb5-415b-8340-a48ebf98034a)

As a consequence jenkins seems to be confused
![image](https://github.com/eclipse-jdt/eclipse.jdt.core/assets/51790620/4ad99545-2578-4680-9ecb-83de5b5bc180)

![image](https://github.com/eclipse-jdt/eclipse.jdt.core/assets/51790620/364e3f7a-e20a-401b-b238-e710ab73ddf9)

Also note, that problem number 1 or 2 was not logged at all, somehow the INFO got number 3 after only 1 warning

source was added with https://bugs.eclipse.org/bugs/show_bug.cgi?id=496137 [compiler][batch] support INFO problem severity

Contributor guide

Open the contributing guide

Research direction

Start with the ECJ batch compiler logging behavior shown in the report, then review the related source history from Bug 496137, which introduced INFO problem severity. Trace how INFO and WARNING problems are numbered and formatted. Done means the compiler reports each problem with consistent severity labels and sequential numbering without confusing Jenkins.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.