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

Revise usage of `encoding` in more CompilationUnitResolver methods

Open
#2,641 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

Quoting @jukzi on https://github.com/eclipse-jdt/eclipse.jdt.core/pull/2560#discussion_r1654179571
> Making the encoding part of the API seems wrong as currently the encoding is not used consistently: Only Batch Compiler uses it in org.eclipse.jdt.internal.compiler.batch.CompilationUnit.getContents() while the IDE uses org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(IFile) which disrespect the given classpath encoding but uses the encoding configured in workspace and the utf bom.

We should revise usage of `encoding` here to either actually use it, or get rid of it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.