mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-43767 - IAE: IntentionActionMetaData.retrieveURLs
This commit is contained in:
+7
-3
@@ -25,6 +25,8 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.extensions.PluginId;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.fileTypes.FileTypeManager;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.ObjectUtils;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -33,6 +35,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
@@ -154,7 +157,8 @@ public final class IntentionActionMetaData {
|
||||
String[] children;
|
||||
Exception cause = null;
|
||||
try {
|
||||
children = new File(descriptionDirectory.toURI()).list();
|
||||
URI uri = descriptionDirectory.toURI();
|
||||
children = uri.isOpaque()? null : ObjectUtils.notNull(new File(uri).list(), ArrayUtil.EMPTY_STRING_ARRAY);
|
||||
}
|
||||
catch (URISyntaxException e) {
|
||||
cause = e;
|
||||
@@ -164,8 +168,8 @@ public final class IntentionActionMetaData {
|
||||
cause = e;
|
||||
children = null;
|
||||
}
|
||||
LOG.error("URLs not found for prefix: '"+prefix+"', suffix: '"+suffix+"'; in directory: '"+descriptionDirectory+"'; directory contents: "+
|
||||
(children == null ? null : Arrays.asList(children)), cause);
|
||||
LOG.error("URLs not found for available file types and prefix: '"+prefix+"', suffix: '"+suffix+"';" +
|
||||
" in directory: '"+descriptionDirectory+ "'" + (children == null? "" : "; directory contents: "+ Arrays.asList(children)), cause);
|
||||
return new TextDescriptor[0];
|
||||
}
|
||||
return urls.toArray(new TextDescriptor[urls.size()]);
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import java.sql.*;
|
||||
|
||||
public class Test {
|
||||
public void runScript(Statement st) throws SQLException {
|
||||
st.execute("create table some_table (id integer primary key)");
|
||||
st.execute("insert into some_table values(1)");
|
||||
st.execute("select * from some_table");
|
||||
st.execute("drop table some_table");
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
...
|
||||
sqlStatement.execute("<spot>select * from some_table</spot>");
|
||||
...
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import java.sql.*;
|
||||
|
||||
public class Test {
|
||||
public void runScript(Statement st) throws SQLException {
|
||||
st.execute("create table some_table (id integer primary key)");
|
||||
st.execute("insert into some_table values(1)");
|
||||
st.execute("<spot>select * from some_table</spot>");
|
||||
st.execute("drop table some_table");
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
...
|
||||
sqlStatement.execute("<spot>select * from some_table</spot>");
|
||||
...
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import java.sql.*;
|
||||
|
||||
public class Test {
|
||||
public void runScript(Statement st) throws SQLException {
|
||||
st.execute("create table some_table (id integer primary key)");
|
||||
st.execute("insert into some_table values(1)");
|
||||
st.execute("select * from some_table");
|
||||
st.execute("drop table some_table");
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
...
|
||||
sqlStatement.execute("<spot>select * from some_table</spot>");
|
||||
...
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import java.sql.*;
|
||||
|
||||
public class Test {
|
||||
public void runScript(Statement st) throws SQLException {
|
||||
st.execute("create table some_table (id integer primary key)");
|
||||
st.execute("insert into some_table values(1)");
|
||||
st.execute("<spot>select * from some_table</spot>");
|
||||
st.execute("drop table some_table");
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
...
|
||||
sqlStatement.execute("<spot>select * from some_table</spot>");
|
||||
...
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import java.sql.*;
|
||||
|
||||
public class Test {
|
||||
public void runScript(Statement st) throws SQLException {
|
||||
st.execute("create table some_table (id integer primary key)");
|
||||
st.execute("insert into some_table values(1)");
|
||||
st.execute("select * from some_table");
|
||||
st.execute("drop table some_table");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
...
|
||||
sqlStatement.execute("<spot>select * from some_table</spot>");
|
||||
...
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import java.sql.*;
|
||||
|
||||
public class Test {
|
||||
public void runScript(Statement st) throws SQLException {
|
||||
st.execute("create table some_table (id integer primary key)");
|
||||
st.execute("insert into some_table values(1)");
|
||||
st.execute("<spot>select * from some_table</spot>");
|
||||
st.execute("drop table some_table");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
...
|
||||
sqlStatement.execute("<spot>select * from some_table</spot>");
|
||||
...
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import java.sql.*;
|
||||
|
||||
public class Test {
|
||||
public void runScript(Statement st) throws SQLException {
|
||||
st.execute("create table some_table (id integer primary key)");
|
||||
st.execute("insert into some_table values(1)");
|
||||
st.execute("select * from some_table");
|
||||
st.execute("drop table some_table");
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
...
|
||||
sqlStatement.execute("<spot>select * from some_table</spot>");
|
||||
...
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import java.sql.*;
|
||||
|
||||
public class Test {
|
||||
public void runScript(Statement st) throws SQLException {
|
||||
st.execute("create table some_table (id integer primary key)");
|
||||
st.execute("insert into some_table values(1)");
|
||||
st.execute("<spot>select * from some_table</spot>");
|
||||
st.execute("drop table some_table");
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
...
|
||||
sqlStatement.execute("<spot>select * from some_table</spot>");
|
||||
...
|
||||
Reference in New Issue
Block a user