Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Appending Property Values

 
leo mari
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry for this, five stars, stupid question, but my brain is overstressed, so also
the simplest thing seems to be the hardest.... :roll:
I would like to add in suncertify.properties file, the logs of ... portNumbers.
So, between runs of the program, I would like to have the previous portNumber values.
This is the method used to add a value to a single hardcoded property.

This is the method caller


But, in this way, the new value OVERRIDE the oldest one.
I don't want only the newest value, I need also the previous values!
May you please gimme an hint?
Thanks
leo
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Leo,
I can't imagine why you would want to do this, but...

Hope this helps,
George
[ February 09, 2004: Message edited by: George Marinkovich ]
 
leo mari
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you George,
I need this, in order to satisfy this statement:
"All configuration information must be stored in a file called suncertify.properties" and "must be persistent between runs of the program".
Thank you again
leo
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Leo,
Originally posted by leo marinangeli:
I need this, in order to satisfy this statement:
"All configuration information must be stored in a file called suncertify.properties" and "must be persistent between runs of the program".

I see the need for persisting the port number between runs of the program. I just don't see the need for persisting the history of port number changes. It seems to me that the only port number change of any significance is the latest one.
For example,

suncertify.properties file: clientPortNumber=1099
User changes the port number to 1098
suncertify.properties file: clientPortNumber=1098
User changes the port number to 1097
suncertify.properties file: clientPortNumber=1097

It seems to me that this would be sufficient to persist the port number between runs of the program.
I'm not sure what extra benefit you get by doing the following:

suncertify.properties file: clientPortNumber=1099
User changes the port number to 1098
suncertify.properties file: clientPortNumber=1098,1099
User changes the port number to 1097
suncertify.properties file: clientPortNumber=1097,1098,1099

Maybe I'm missing something.
Hope this helps,
George
 
leo mari
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes,
The latest one (and not the full history) could be enough.
Always better don't introduce more complexity than the minum required
Thank you very much!
leo
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic