Modify ↓

#24970 new task

[patch] Fix Sonar issues in ApiUrlTestTask

Reported by: DanProgs <Abenteurer.2901@…> Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description

The deprecated URL constructor in ApiUrlTestTask has been updated, and the exception handling has been adjusted (changing MalformedURLException to IllegalArgumentException | MalformedURLException). The recurring string "Connection to API failed" has been defined as a constant, and the responseCode has been stored in a variable. Furthermore, curly braces have been added to control structures, and fields and variables have been declared as final.

see: https://josm.openstreetmap.de/sonar/project/issues?files=src%2Forg%2Fopenstreetmap%2Fjosm%2Fgui%2Fpreferences%2Fserver%2FApiUrlTestTask.java&issueStatuses=CONFIRMED%2COPEN&open=AYtXfRgJQ0Q6PFw6n23f&id=josm
see: https://josm.openstreetmap.de/sonar/project/issues?files=src%2Forg%2Fopenstreetmap%2Fjosm%2Fgui%2Fpreferences%2Fserver%2FApiUrlTestTask.java&issueStatuses=CONFIRMED%2COPEN&open=3a548e29-540e-47f2-bffe-c156ab7ef302&id=josm
see: https://josm.openstreetmap.de/sonar/project/issues?files=src%2Forg%2Fopenstreetmap%2Fjosm%2Fgui%2Fpreferences%2Fserver%2FApiUrlTestTask.java&issueStatuses=CONFIRMED%2COPEN&open=7142450a-1760-4b2b-89cd-10abce9fdb63&id=josm

Attachments (1)

patch-Fix-Sonar-issues-in-ApiUrlTestTask.patch​ (3.6 KB ) - added by DanProgs <Abenteurer.2901@…> 50 minutes ago.

Download all attachments as: .zip

Change History (1)

by DanProgs <Abenteurer.2901@…>, 50 minutes ago

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 DanProgs <Abenteurer.2901@…>.
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.