Oomph Fortuity
Oomph Fortuity

Reputation: 6178

Is there any length limit for value kept in properties file?

I have configAllowedUsers.properties.

It has single in Entry like the following:

users = abc, pew, rt, me1, me3, ku3,........

I have some doubts about length of value stored in it. I will read it using java.util.Properties. Thousands of usernames would be stored in it and I could not store them in database.

Upvotes: 6

Views: 8251

Answers (1)

Hexaholic
Hexaholic

Reputation: 3373

I had the same question in mind today, so I started researching. I did not find any limitations originating from java.util.Properties, so it is probably safe to assume that the rules are the same as for String:

Whichever is reached first in your environment.


Of course, not finding any official statements on this topic does not prove that these assumptions are correct, but let's consider the Properties class innocent unless proven guilty.

Upvotes: 13

Related Questions