Skip to content

[RSPEC-S1068] Remove unused private fields #2317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,6 @@ public class Os {
*/
private static final String DARWIN = "darwin";

/**
* The path separator.
*/
private static final String PATH_SEP = System.getProperty("path.separator");

static {
// Those two public constants are initialized here, as they need all the private constants
// above to be initialized first, but the code style imposes the public constants to be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,6 @@
*
*/
public final class CLIReportingUtils {
// CHECKSTYLE_OFF: MagicNumber
public static final long MB = 1024 * 1024;

private static final long ONE_SECOND = 1000L;

private static final long ONE_MINUTE = 60 * ONE_SECOND;

private static final long ONE_HOUR = 60 * ONE_MINUTE;
Copy link
Contributor Author

@Pankraz76 Pankraz76 May 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


private static final long ONE_DAY = 24 * ONE_HOUR;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be API but seems unused

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to investigate, what its actually used for.

// CHECKSTYLE_ON: MagicNumber

public static final String BUILD_VERSION_PROPERTY = "version";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ public class DefaultModelBuilder implements ModelBuilder {
private static final String FILE = "file";
private static final String IMPORT = "import";
private static final String PARENT = "parent";
private static final String MODEL = "model";

private final Logger logger = LoggerFactory.getLogger(getClass());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

class MavenITmng6401ProxyPortInterpolationTest extends AbstractMavenIntegrationTestCase {

private Proxy proxy;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These might be used in a weird way by reflection in the integration tests. I'm not sure in this case, but Maven does have a lot of private things that look unused but really are used like that.


private int port;

protected MavenITmng6401ProxyPortInterpolationTest() {
super("(4.0.0-alpha-7,)");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@
package mng;

public class Module5 {
private Module4 m4;
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,12 @@
*/
public class MyMojo extends AbstractMojo {

/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the comment shows why and how this is used here. Please check this sort of thing before sending PRs from automated tools.

* Not used, just an offset to place reactorProjects in the middle.
* @parameter default-value="${project.build.directory}"
*/
private String outputDirectory;

/**
* @parameter expression="${reactorProjects}"
* @required
*/
private List reactorProjects;

/**
* Not used, just an offset to place reactorProjects in the middle.
* @parameter default-value="${project.build.directory}"
*/
private String outputDirectory2;

public void execute() throws MojoExecutionException {
for (Iterator it = reactorProjects.iterator(); it.hasNext(); ) {
MavenProject project = (MavenProject) it.next();
Expand Down
Loading