• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Appending Property Values

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Paper beats rock. Scissors beats tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic