https://bz.apache.org/bugzilla/show_bug.cgi?id=62286

            Bug ID: 62286
           Summary: Illegalargument exception occurrs while  parsing
                    properties from a file that contains \u in its
                    property key,value
           Product: Ant
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 35858
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35858&action=edit
two files with description given in problem description

Introduction
=========================
Consider the following code snippet in ant's build.xml file

<exec dir="${basedir}"
  executable="svn"
  output="${basedir}/svn.properties"
  failonerror="true">
  <arg value="info"/>
</exec>
<property prefix="svn" file="${basedir}/svn.properties"/>

Bascially the above snippet is trying to
1. Run "svn info" command and put the output into the file "svn.properties"
2. Read the properties from the file "svn.properties" and prefix it with SVN

Problem
===========================
We get the illegalargument exception while reading the properties from the file
"svn.propeties"

Cause
=====================
The property file contains "\universal..." as part of the string.
Java's "java.util.Properties.loadconvert" api reads the '\u' character and
assumes that the character is represented as Unicode character.
But the character after '\u' is 'n' and NOT one of the hex digits.
Thus the exception is raised.

Reproduction
===================
Two files have been attached to easily reproduce and see the issue.
svn.properties - contains the properties which can generate the mentioned
issue.
TestSvnProp.java - a main file which tries to load the svn.properties

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to