Props question

18 views
Skip to first unread message

Adam Koch

unread,
Jun 26, 2013, 10:12:56 AM6/26/13
to jod...@googlegroups.com
I created a bare Maven project with one class and one .props file.

In the main method I have:
Props p = new Props();
p
.load(ClassLoader.getSystemResourceAsStream("example.props"));
System.out.println(p.getValue("key1"));
System.out.println(p.getValue("key1", "one"));
System.out.println(p.getActiveProfiles()[0]);

example.props:
key1=hello
key1
<one>=Hi!
 
@profiles=one

When I run it, I expect to get:
Hi!
Hi!
one

but instead I get 
hello
Hi!
one

Is this a bug or am I doing something wrong?

Thanks,
Adam

jodder

unread,
Jun 26, 2013, 3:46:36 PM6/26/13
to jod...@googlegroups.com
Hey Adam!

thanks for playing with Jodd Props!

Hah, believe or not, that is a bug that appears in very special case, with specific orderding of getValue calls :) Don't worry, you are doing everything fine; and we gonna push our fix in 30 minutes; and we gonna publish the snapshot in couple of hours, so you can keep enjoying the Jodd props...

Feel free to contact us for any reason!
Reply all
Reply to author
Forward
0 new messages