Skip to content

[GR-68578] Apply rewrite support for errorprone.refasterrules #11933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .idea/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 21 additions & 21 deletions visualizer/IdealGraphVisualizer/Bytecodes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,9 @@
</parent>
<artifactId>Bytecodes</artifactId>
<packaging>nbm</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -72,7 +57,22 @@
<version>${netbeans.version}</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ public void stateChanged(ChangeEvent e) {
InputGraphProvider p = viewer.getActiveViewer();
SwingUtilities.invokeLater(new Runnable() {

@Override
public void run() {
InputGraph g;
if (p != null) {
Expand All @@ -194,7 +195,7 @@ public void run() {
});
}

final static class ResolvableHelper implements Serializable {
static final class ResolvableHelper implements Serializable {

private static final long serialVersionUID = 1L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void setMethod(InputMethod method, InputGraph graph) {
* Creates a new instance of MethodNode
*/
public MethodNode(InputMethod method, InputGraph graph, String bciString) {
super((method != null && method.getBytecodes().isEmpty()) ? Children.LEAF : new MethodNodeChildren(method, graph, bciString));
super(method != null && method.getBytecodes().isEmpty() ? Children.LEAF : new MethodNodeChildren(method, graph, bciString));
if (method != null) {
this.setDisplayName(method.getName());
}
Expand Down
42 changes: 21 additions & 21 deletions visualizer/IdealGraphVisualizer/ControlFlow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,9 @@
</parent>
<artifactId>ControlFlow</artifactId>
<packaging>nbm</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -82,7 +67,22 @@
<version>${netbeans.version}</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ public InputBlockEdge getEdge() {
return edge;
}

@Override
public Port getTo() {
return inputSlot;
}

@Override
public Port getFrom() {
return outputSlot;
}
Expand Down Expand Up @@ -96,6 +98,7 @@ private void updateStroke() {
setStroke(stroke);
}

@Override
public void setControlPoints(List<Point> p) {
this.points = p;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public ControlFlowAction() {
super(NbBundle.getMessage(ControlFlowAction.class, "CTL_ControlFlowAction"));
}

@Override
public void actionPerformed(ActionEvent evt) {
TopComponent win = ControlFlowTopComponent.findInstance();
win.open();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void requestActive() {
scene.getView().requestFocus();
}

final static class ResolvableHelper implements Serializable {
static final class ResolvableHelper implements Serializable {

private static final long serialVersionUID = 1L;

Expand Down
42 changes: 21 additions & 21 deletions visualizer/IdealGraphVisualizer/Coordinator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,9 @@
</parent>
<artifactId>Coordinator</artifactId>
<packaging>nbm</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -142,7 +127,22 @@
<version>${netbeans.version}</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private InputGraph getCurrentGraph() {

public boolean isPossible() {
InputGraph cg = getCurrentGraph();
if (cg == null || cg == graph || !(Objects.equals(cg.getGraphType(), graph.getGraphType()))) {
if (cg == null || cg == graph || !Objects.equals(cg.getGraphType(), graph.getGraphType())) {
return false;
}
Group p1 = graph.getGroup();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import java.io.File;
import java.io.IOException;
import java.util.Locale;
import java.util.logging.Logger;

@ActionID(category = "File", id = "org.graalvm.visualizer.coordinator.actions.ImportAction")
@ActionRegistration(iconBase = "org/graalvm/visualizer/coordinator/images/import.png", displayName = "#CTL_ImportAction")
Expand All @@ -51,7 +50,6 @@
, @ActionReference(path = "Shortcuts", name = "C-O")
})
public final class ImportAction extends SystemAction {
private static final Logger LOG = Logger.getLogger(ImportAction.class.getName());

@NbBundle.Messages("MSG_BIGV_Description_ZIP=Compressed dumps (*.zip)")
public static FileFilter getZipFilter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ private synchronized void doPrepare() {
} else {
nonSessionsSelected = true;
}
sessionData.computeIfAbsent(gd, (d) -> new ArrayList<>()).add(f);
sessionData.computeIfAbsent(gd, d -> new ArrayList<>()).add(f);
}
for (List<Folder> v : sessionData.values()) {
retainJustParents(v);
Expand Down Expand Up @@ -466,7 +466,6 @@ private void createFlatDocument() {
for (GraphDocument doc : documentOrder) {
for (Folder g : sessionData.get(doc)) {
if (g instanceof GraphDocument) {
GraphDocument gd = (GraphDocument) g;
g.getElements().forEach(item -> {
if (item instanceof Folder) {
nd.addElement(item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ private void initComponents() {
saveStyle.add(optMultipleFiles);
org.openide.awt.Mnemonics.setLocalizedText(optMultipleFiles, org.openide.util.NbBundle.getMessage(SaveOptions.class, "SaveOptions.optMultipleFiles.text")); // NOI18N
optMultipleFiles.addItemListener(new java.awt.event.ItemListener() {
@Override
public void itemStateChanged(java.awt.event.ItemEvent evt) {
optMultipleFilesItemStateChanged(evt);
}
});

org.openide.awt.Mnemonics.setLocalizedText(cbPromptNames, org.openide.util.NbBundle.getMessage(SaveOptions.class, "SaveOptions.cbPromptNames.text")); // NOI18N
cbPromptNames.addItemListener(new java.awt.event.ItemListener() {
@Override
public void itemStateChanged(java.awt.event.ItemEvent evt) {
cbPromptNamesItemStateChanged(evt);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected String getUserName() {

@Override
public boolean canRename() {
return (item instanceof Properties.MutableOwner);
return item instanceof Properties.MutableOwner;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

import java.io.File;
import java.io.IOException;
import java.util.logging.Logger;

/**
* DataObject that represents a .BGV file. This object is NOT designed for presentation
Expand Down Expand Up @@ -66,7 +65,6 @@
position = 400
)
public class BinaryGraphDataObject extends MultiDataObject {
private static final Logger LOG = Logger.getLogger(BinaryGraphDataObject.class.getName());
/**
* MIME type for BGV dumps
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ protected Sheet createSheet() {
versions.setName("versions"); // NOI18N
versions.setDisplayName(Bundle.TITLE_Versions());
List<jdk.graal.compiler.graphio.parsing.model.Property<?>> versionProps = new ArrayList<>();
pen.getProperties().forEach((p) -> {
pen.getProperties().forEach(p -> {
if (p.getName().startsWith("igv.")) { // NOI18N
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import org.openide.util.lookup.AbstractLookup;
import org.openide.util.lookup.InstanceContent;

import jdk.graal.compiler.graphio.parsing.model.ChangedListener;
import jdk.graal.compiler.graphio.parsing.model.InputGraph;
import jdk.graal.compiler.graphio.parsing.model.Properties;

Expand All @@ -47,13 +46,6 @@ public class GraphNode extends AbstractNode {
private boolean error;
private Image baseIcon;

private final ChangedListener l = new ChangedListener() {
@Override
public void changed(Object source) {
SwingUtilities.invokeLater(GraphNode.this::refreshError);
}
};

/**
* Creates a new instance of GraphNode
*/
Expand Down Expand Up @@ -153,7 +145,7 @@ public boolean equals(Object obj) {
return true;
}
if (obj instanceof GraphNode) {
return (graph == ((GraphNode) obj).graph);
return graph == ((GraphNode) obj).graph;
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class ManagedSessionImpl extends GraphDocument implements Lookup.Provider

public ManagedSessionImpl(Object id, Properties initialValues) {
this(id, (FileObject) null);
initialValues.iterator().forEachRemaining((p) -> {
initialValues.iterator().forEachRemaining(p -> {
if (!KnownPropertyNames.PROPNAME_NAME.equals(p.getName())) {
getProperties().setProperty(p.getName(), p.getValue());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ public void run() {
}
}

@Override
public void run() {
binaryServer = new SImpl(this, new ParseMonitor() {
@Override
Expand Down Expand Up @@ -248,9 +249,7 @@ public static SessionManagerImpl getInstance() {
}

public GraphDocument getCurrentDocument() {
boolean a = true;
boolean b = false;
a = !b;
return singleDocument;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ public class SessionNode extends FolderNode implements ChangedListener<GraphDocu
private static final String ICON_PREFIX = "org/graalvm/visualizer/coordinator/images/"; // NOI18N
private Lookup.Result<FileObject> storageResult;

private FileObject file;

public SessionNode(Folder folder) {
super(folder);

Expand Down Expand Up @@ -76,12 +74,10 @@ public void changed(GraphDocument source) {
})
private void updateUI() {
boolean hasFile;
FileObject f;

synchronized (this) {
Collection<? extends FileObject> col = storageResult.allInstances();
hasFile = !col.isEmpty();
f = file = hasFile ? col.iterator().next() : null;
}
setIconBaseWithExtension(ICON_PREFIX + (hasFile ? "file.png" : "graal.png"));

Expand Down
Loading