apache / apache/maven-shared-jar

TextFileExposer only reads first line of version text files

Open Beginner friendly
#141 0 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
4
Forks
9
Avg merge
2h 46m
Merged PRs (30d)
3

Description

In `TextFileExposer.java:55`:

```java
String line = br.readLine();
if (line != null && !line.isEmpty()) {
textVersions.add(line);
}
```

Only the first line of any version text file is used. Version files with multi-line content (e.g., `key=value` pairs, multi-line version headers) lose all data beyond line 1.

**Fix**: Read all lines in a loop:
```java
String line;
while ((line = br.readLine()) != null) {
if (!line.isEmpty()) {
textVersions.add(line);
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Open TextFileExposer.java at line 55 and inspect how version text files are read. Verify the change with a version file containing multiple non-empty lines, ensuring every such line is preserved rather than only the first.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.