Hi Henry,
Just a hint: Instead of parameterized singleton ProxyClassDumper with
static method getInstance(path) which suggests that different
ProxyClassDumper instances are returned for different path parameters
(which are not), you could create for example:
class DumpProxyClassAction
Ah, I see, you want it that way to track that a warning about invalid
directory is logged only once. That could be solved with an:
private static final ConcurrentMapPath, Path invalidDirs = new
ConcurrentHashMap();
...and then in validateDumpDir:
if (invalidDirs.putIfAbsent(path,
On 10/02/2013 07:42 AM, Henry Jen wrote:
Remi,
Thanks for the review and comments, you have some good points.
I am thinking perhaps the dumper class could be used somewhere else given a
different path, which is why the directory is used as key to get an instance
and injected from caller. As
On 10/02/2013 04:12 PM, Peter Levart wrote:
On 10/02/2013 12:19 PM, Remi Forax wrote:
final class ProxyClassesDumper {
...
private final Path dumpDir; // null if invalid
public static ProxyClassesDumper create(String dir) {
dir = dir.trim();
Path path =
On 10/02/2013 12:19 PM, Remi Forax wrote:
final class ProxyClassesDumper {
...
private final Path dumpDir; // null if invalid
public static ProxyClassesDumper create(String dir) {
dir = dir.trim();
Path path = *Paths.get*(dir.isEmpty() ? . : dir);
path =
On Oct 2, 2013, at 7:21 AM, Remi Forax fo...@univ-mlv.fr wrote:
On 10/02/2013 04:12 PM, Peter Levart wrote:
On 10/02/2013 12:19 PM, Remi Forax wrote:
final class ProxyClassesDumper {
...
private final Path dumpDir; // null if invalid
public static ProxyClassesDumper create(String
On 10/02/2013 05:17 PM, Henry Jen wrote:
One thing to watch though is that Paths.get(String) can throw
InvalidPathException. This will render InnerClassLambdaMetafactory non-functional
since its static initialization will throw exception. Each lambda capture will than
throw Error. I think the
Hi,
Please review the updated webrev at
http://cr.openjdk.java.net/~henryjen/ccc/8023524/3/webrev/
This update addressed comments from Mandy with following,
- call doPrivileged with specific file permission, ALL FILES, write.
- Use nio package to write deal with FS, also create directory