Skip to content

Commit

Permalink
remove use of reflection based toString generator
Browse files Browse the repository at this point in the history
The reflection based toString generator fails on some modern jvms as apache commons tries
to parse out the version of Java, but fails due to outdated assumptions.

Not clear why it's inmportant to have a toString method here, but replacing with an autogenerated one
should solve #1358. Implementation excludes logger and sink form toString as it's unclear how they would be useful.
  • Loading branch information
hcoles committed Nov 1, 2024
1 parent e66f179 commit 9c9bba8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pitest-entry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.10.0</version>
<version>1.12.0</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import java.util.List;
import java.util.Locale;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.plugin.logging.Log;

Expand Down Expand Up @@ -97,8 +95,11 @@ public void setSourceDataFormats(List<String> sourceDataFormats) {

@Override
public String toString() {
return ToStringBuilder.reflectionToString(this,
ToStringStyle.MULTI_LINE_STYLE);
return "ReportGenerationContext{"
+ "locale=" + locale
+ ", reportsDataDirectory=" + reportsDataDirectory
+ ", siteDirectory=" + siteDirectory
+ ", sourceDataFormats=" + sourceDataFormats
+ '}';
}

}

0 comments on commit 9c9bba8

Please sign in to comment.