Modify

Opened 17 hours ago

Last modified 11 hours ago

#24635 new task

Fix new PMD warnings

Reported by: stoecker Owned by: team
Priority: normal Milestone: 26.03
Component: Core Version:
Keywords: Cc: gaben, GerdP

Description

After PMD upgrade a bunch of new warnings cam up.

Anyone time to help fixing them?

Attachments (0)

Change History (12)

comment:1 by gaben, 16 hours ago

Anyone time..?

I don't have any at the moment, but hopefully I will have some in the following weeks.

comment:2 by GerdP, 16 hours ago

Sorry, the recent changes caused another build failure in my Eclipse installation, so atm I try to fix that.

comment:3 by stoecker, 16 hours ago

I found that an "svn cleanup --remove-ignored" helped. I had to do this for the CI to work.

comment:4 by stoecker, 15 hours ago

Also note, that while I tried to keep downwards compatibility intact I may have created some places where Java >= 21 is required. I don't plan to actively search such issues as long as the JOSM server stuff for the needed builds does still work with Java 11.

comment:5 by GerdP, 15 hours ago

My problems with Eclipse are fixed. No idea what exactly was wrong, it used an older version of the compression library.

comment:6 by GerdP, 15 hours ago

Where do I see the bunch of PMD warnings?

comment:7 by GerdP, 15 hours ago

Ah, didn't use svn update today. Now I see when running ant pmd

in reply to:  5 comment:8 by stoecker, 15 hours ago

Replying to GerdP:

My problems with Eclipse are fixed. No idea what exactly was wrong

That's the reason why I don't use eclipse. That "No idea why" happened too often to me...

comment:9 by GerdP, 14 hours ago

I can take care about the "Public member ... declared in a non-public type" messages. My understanding is that I just have to remove the public key word.

in reply to:  9 comment:10 by stoecker, 13 hours ago

Replying to GerdP:

I can take care about the "Public member ... declared in a non-public type" messages. My understanding is that I just have to remove the public key word.

Or change to "protected"? I'm not totally sure. Had only a short look at the PMD description.

comment:11 by GerdP, 12 hours ago

In https://github.com/pmd/pmd/pull/6231 I see that either public should be removed or private should be added.
Anyhow there seem to be more to this because when I change the flagged places in src\org\openstreetmap\josm\data\coor\Coordinate.java I can no longer compile. Not yet sure if this is a PMD error or if I have to change more code.

comment:12 by stoecker, 11 hours ago

In 19520/josm:

ignore rule PublicMemberInNonPublicType, see #24635

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to stoecker.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.