Modify

Opened 9 years ago

Closed 9 years ago

#12112 closed enhancement (fixed)

[Patch] Use java.util.Properties to read REVISION file in the Version-class

Reported by: floscher Owned by: floscher
Priority: normal Milestone: 15.11
Component: Core Version: latest
Keywords: Cc:

Description

Previously the REVISION file was read from the resources using two custom methods in the Version-class: loadResourceFile(URL) and parseManifestStyleFormattedString(String)

I replaced those two with java.util.Properties.load(InputStream), which reduces the code in the Version-class.

As the method loadResourceFile(URL) was also used in the class AboutAction, I transferred it to that class, adapted it to better fit the needs of that class (don't produce an error when a resource file can't be read, but instead display a warning in the text area where normally the contents of that file would be displayed), renamed it to setTextFromResourceFile(JTextArea, String) and made it private.

Attachments (1)

patch0.patch (10.7 KB ) - added by floscher 9 years ago.

Download all attachments as: .zip

Change History (3)

by floscher, 9 years ago

Attachment: patch0.patch added

comment:1 by Don-vip, 9 years ago

Milestone: 15.11

comment:2 by Don-vip, 9 years ago

Resolution: fixed
Status: newclosed

In 9019/josm:

fix #12112 - Use java.util.Properties to read REVISION file in the Version-class (patch by floscher) + checkstyle

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain floscher.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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