Export to GitHub

osjava - issue #4

Hash Character Interpreted in .properties File


Posted on Nov 13, 2008 by Massive Wombat

If my password for a datasource has a # character, it will interpret that as a comment and truncate the string.

I tested with java.util.Properties and it does not exhibit this behavior.

Comment #1

Posted on Feb 9, 2009 by Quick Rhino

It seems CustomProperties#load(InputStream) does not follow the java.util.Properties#load(InputStream) contract.

Here is a patch to fix this bug, but i think this method should create a temporary java.util.Properties, call load() on this temporary props, then copy the read data into "this". Thus, the usual contract (about the comments, blank links, encoded characters, etc) will be respected.

Attachments

Comment #2

Posted on Jul 1, 2013 by Helpful Panda

Yes, this fix works with java.util.Properties.load()

Attachments

Status: New

Labels:
Type-Defect Priority-Medium