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

question on criteriaFind() and others

 
Rit Faisal
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1. Do I need to make this method synchronized? I believe so, because I am using StringTokenizer which I believe is not thread safe. Please share thoughts.
2. The Data class contains deprecated methods from String class. Can I use the methods that use 'default' encoding.
 
Aleksey Matiychenko
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. So what that StringTokenizer is not synchronized? As long at is not a shared resource you are fine. Synchronization greately reduces performance and should only be used if absolutely required. Synchronizing StringTokenizer is not necessary/
2. I believe that default encoding is fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic