equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
42 import com.sun.tools.javac.comp.Infer.GraphSolver.InferenceGraph; |
42 import com.sun.tools.javac.comp.Infer.GraphSolver.InferenceGraph; |
43 import com.sun.tools.javac.comp.Infer.GraphSolver.InferenceGraph.Node; |
43 import com.sun.tools.javac.comp.Infer.GraphSolver.InferenceGraph.Node; |
44 import com.sun.tools.javac.comp.Resolve.InapplicableMethodException; |
44 import com.sun.tools.javac.comp.Resolve.InapplicableMethodException; |
45 import com.sun.tools.javac.comp.Resolve.VerboseResolutionMode; |
45 import com.sun.tools.javac.comp.Resolve.VerboseResolutionMode; |
46 |
46 |
47 import java.io.File; |
|
48 import java.io.FileWriter; |
|
49 import java.io.IOException; |
47 import java.io.IOException; |
|
48 import java.io.Writer; |
|
49 import java.nio.file.Files; |
|
50 import java.nio.file.Path; |
|
51 import java.nio.file.Paths; |
50 import java.util.ArrayList; |
52 import java.util.ArrayList; |
51 import java.util.Collection; |
53 import java.util.Collection; |
52 import java.util.Collections; |
54 import java.util.Collections; |
53 import java.util.EnumMap; |
55 import java.util.EnumMap; |
54 import java.util.EnumSet; |
56 import java.util.EnumSet; |
351 name, |
353 name, |
352 pos.getStartPosition(), |
354 pos.getStartPosition(), |
353 rsContext.attrMode(), |
355 rsContext.attrMode(), |
354 rsContext.step, |
356 rsContext.step, |
355 round); |
357 round); |
356 File dotFile = new File(dependenciesFolder, filename); |
358 Path dotFile = Paths.get(dependenciesFolder, filename); |
357 try (FileWriter fw = new FileWriter(dotFile)) { |
359 try (Writer w = Files.newBufferedWriter(dotFile)) { |
358 fw.append(graph); |
360 w.append(graph); |
359 } |
361 } |
360 round++; |
362 round++; |
361 } |
363 } |
362 } catch (IOException ex) { |
364 } catch (IOException ex) { |
363 Assert.error("Error occurred when dumping inference graph: " + ex.getMessage()); |
365 Assert.error("Error occurred when dumping inference graph: " + ex.getMessage()); |