Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360962

Summary: Update Project Configuration modifies forbiddenReference-Setting in org.eclipse.jdt.core.prefs
Product: z_Archived Reporter: Daniel Ebert <Daniel.Ebert>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: igor
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows All   
Whiteboard:

Description Daniel Ebert CLA 2011-10-14 09:20:49 EDT
Build Identifier: 20110916-0149

Whenever i update the project configuration of a simple maven project, the property 'org.eclipse.jdt.core.compiler.problem.forbiddenReference' gets changed to 'warning',
even if i've set it to 'ignore'.

Reproducible: Always

Steps to Reproduce:
1.
Create a new Maven Project (Simple, skip archetype selection

2. 
set the property org.eclipse.jdt.core.compiler.problem.forbiddenReference to 'ignore'
(.settings/org.eclipse.jdt.core.prefs)

3.
Run "Update Maven Configuration on the new project

Expected:
properties in .settings folder are not modified

Actual:
org.eclipse.jdt.core.compiler.problem.forbiddenReference ist set to 'warning'
(.settings/org.eclipse.jdt.core.prefs)
Comment 1 Igor Fedorenko CLA 2011-10-14 10:16:19 EDT
I am able to reproduce the problem with latest 1.1 from master, but I am fairly certain m2e does not explicitly touch that preference so the problem almost certainly somewhere in jdt. I'll keep this bug open for now, but there are no plans to investigate it any further... and no plans to fix it unless a quality patch is provided.
Comment 2 Daniel Ebert CLA 2011-10-14 11:21:14 EDT
(In reply to comment #1)
> I am able to reproduce the problem with latest 1.1 from master, but I am fairly
> certain m2e does not explicitly touch that preference so the problem almost
> certainly somewhere in jdt. I'll keep this bug open for now, but there are no
> plans to investigate it any further... and no plans to fix it unless a quality
> patch is provided.

thx for your reply

Im not sure if i am lookin in the right corner, but this seems to be suspicious.

http://git.eclipse.org/c/m2e/m2e-core.git/tree/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java

In line 479 i'm finding this line of code
options.put(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE, "warning");
Comment 3 Igor Fedorenko CLA 2011-10-14 12:30:56 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > I am able to reproduce the problem with latest 1.1 from master, but I am fairly
> > certain m2e does not explicitly touch that preference so the problem almost
> > certainly somewhere in jdt. I'll keep this bug open for now, but there are no
> > plans to investigate it any further... and no plans to fix it unless a quality
> > patch is provided.
> 
> thx for your reply
> 
> Im not sure if i am lookin in the right corner, but this seems to be
> suspicious.
> 
> http://git.eclipse.org/c/m2e/m2e-core.git/tree/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
> 
> In line 479 i'm finding this line of code
> options.put(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE, "warning");

True enough. Will try to fix this for juno m3.
Comment 5 Denis Roy CLA 2021-04-19 13:25:06 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/