/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4241573
* @summary SourceFile attribute includes full path
*/
public class T4241573 {
}
// Selection of files to be compiled
File absTestFile = writeFile(new File("AbsTest.java").getAbsoluteFile(), "class AbsTest { class Inner { } }");
File relTest2File = writeFile(new File("p/RelTest2.java"), "package p; class RelTest2 { class Inner { } }");
// This next class references other classes that will be found on the source path
// and which will therefore need to be compiled as well.
"class Main { j.A ja; j.R jr; d.A da; d.R dr; }" +
"");
"-sourcepath", sourcePath,
};
if (rc != 0) {
}
"AbsTest.class", "AbsTest$Inner.class",
"RelTest.class", "RelTest$Inner.class",
"p/RelTest2.class", "p/RelTest2$Inner.class",
"Main.class" );
}
if (errors > 0)
}
/** Check the SourceFileAttribute is the simple name of the original source file. */
try {
}
} catch (Exception e) {
}
}
/** Create a directory containing one or more files. */
}
return dir;
}
/** Create a jar file containing one or more entries. */
try {
}
} finally {
}
return jar;
}
/** Return the path for an entry given to createDir */
}
/** Return the path for an entry given to createJar. */
}
/** Return the body text for an entry given to createDir or createJar. */
}
/** Write a file containing the given string. Parent directories are
* created as needed. */
if (f.getParentFile() != null)
f.getParentFile().mkdirs();
try {
} finally {
}
return f;
}
/** Create a path value from a list of directories and jar files. */
}
}
/** Create a set of files from a base directory and a set of relative paths. */
return files;
}
/** Find all the files in a directory and its subdirectories. */
return files;
}
// where
if (f.isDirectory())
else
}
}
/** Return the difference of two sets, a - b. */
if (b.isEmpty())
return a;
return result;
}
/** Report an error. */
errors++;
}
int errors;
}