[JBoss JIRA] (ROASTER-128) Roaster doesn't check for invalid imports
by Kai Müller (Jira)
[ https://issues.jboss.org/browse/ROASTER-128?page=com.atlassian.jira.plugi... ]
Kai Müller commented on ROASTER-128:
------------------------------------
Hello George,
thank you for that fast response. I already investigated the issue furthermore and I have an idea how to solve it.
I'll prepare a fix, make a PR and let you know when it's done.
Have a nice weekend,
Kai
> Roaster doesn't check for invalid imports
> -----------------------------------------
>
> Key: ROASTER-128
> URL: https://issues.jboss.org/browse/ROASTER-128
> Project: Roaster
> Issue Type: Bug
> Components: JDT
> Affects Versions: 2.20.0.Final
> Environment: Windows 10, Java 8
> Reporter: Kai Müller
> Priority: Major
>
> Hi guys,
> while working with your library I ran into the following problem. The method setType adds an import if possible and needed. But it doesn't check, if e.g. the class to import is equal to the current class or if another import with the same class name but other package exists.
> The provided example leads to the following result:
> package testPackage;
> import package1.Type;
> import package2.Type;
> public class Main {
> Type field1;
> Type field2;
> }
> This class will not compile and there is no workaround, because there is no way to tell this method NOT to add an import.
> In addition, I want to ask you, if you can check the following javadoc of "Importer.Import addImport(Type<?> type)". In this doc it's mentioned that "The method returns the name that can be used inside the code to reference the type". But the returned "Import" object has no such method. I's need to be done via the "resolveType" of the "Importer" object. I would expect, that either the javadoc should be changed or the "Import" get's an additional method.
> Thank you very much,
> Kai
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (ROASTER-128) Roaster doesn't check for invalid imports
by George Gastaldi (Jira)
[ https://issues.jboss.org/browse/ROASTER-128?page=com.atlassian.jira.plugi... ]
George Gastaldi commented on ROASTER-128:
-----------------------------------------
Hi Kai, thanks for your feedback,
Yes, this looks like a bug indeed. In this case, the second field type should be the fully qualified name instead.
Are you interested in providing a PR with the changes you described? I'll be glad to review if you do.
The sources are in https://github.com/forge/roaster
Best Regards,
George Gastaldi
> Roaster doesn't check for invalid imports
> -----------------------------------------
>
> Key: ROASTER-128
> URL: https://issues.jboss.org/browse/ROASTER-128
> Project: Roaster
> Issue Type: Bug
> Components: JDT
> Affects Versions: 2.20.0.Final
> Environment: Windows 10, Java 8
> Reporter: Kai Müller
> Priority: Major
>
> Hi guys,
> while working with your library I ran into the following problem. The method setType adds an import if possible and needed. But it doesn't check, if e.g. the class to import is equal to the current class or if another import with the same class name but other package exists.
> The provided example leads to the following result:
> package testPackage;
> import package1.Type;
> import package2.Type;
> public class Main {
> Type field1;
> Type field2;
> }
> This class will not compile and there is no workaround, because there is no way to tell this method NOT to add an import.
> In addition, I want to ask you, if you can check the following javadoc of "Importer.Import addImport(Type<?> type)". In this doc it's mentioned that "The method returns the name that can be used inside the code to reference the type". But the returned "Import" object has no such method. I's need to be done via the "resolveType" of the "Importer" object. I would expect, that either the javadoc should be changed or the "Import" get's an additional method.
> Thank you very much,
> Kai
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (ROASTER-128) Roaster doesn't check for invalid imports
by Kai Müller (Jira)
Kai Müller created ROASTER-128:
----------------------------------
Summary: Roaster doesn't check for invalid imports
Key: ROASTER-128
URL: https://issues.jboss.org/browse/ROASTER-128
Project: Roaster
Issue Type: Bug
Components: JDT
Affects Versions: 2.20.0.Final
Environment: Windows 10, Java 8
Reporter: Kai Müller
Hi guys,
while working with your library I ran into the following problem. The method setType adds an import if possible and needed. But it doesn't check, if e.g. the class to import is equal to the current class or if another import with the same class name but other package exists.
The provided example leads to the following result:
package testPackage;
import package1.Type;
import package2.Type;
public class Main {
Type field1;
Type field2;
}
This class will not compile and there is no workaround, because there is no way to tell this method NOT to add an import.
In addition, I want to ask you, if you can check the following javadoc of "Importer.Import addImport(Type<?> type)". In this doc it's mentioned that "The method returns the name that can be used inside the code to reference the type". But the returned "Import" object has no such method. I's need to be done via the "resolveType" of the "Importer" object. I would expect, that either the javadoc should be changed or the "Import" get's an additional method.
Thank you very much,
Kai
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (FURNACE-158) Drop support for JavaFX classes
by George Gastaldi (Jira)
George Gastaldi created FURNACE-158:
---------------------------------------
Summary: Drop support for JavaFX classes
Key: FURNACE-158
URL: https://issues.jboss.org/browse/FURNACE-158
Project: Forge: Furnace
Issue Type: Enhancement
Components: Runtime
Affects Versions: 2.28.2.Final
Environment: OpenJDK 1.8.192
Reporter: George Gastaldi
Assignee: George Gastaldi
Fix For: 2.28.3.Final
Furnace builds fail while testing the JavaFX classes because they are not present in the OpenJDK 1.8 distributions
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (FORGE-2787) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found when run using GraalVM
by George Gastaldi (Jira)
George Gastaldi created FORGE-2787:
--------------------------------------
Summary: ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found when run using GraalVM
Key: FORGE-2787
URL: https://issues.jboss.org/browse/FORGE-2787
Project: Forge
Issue Type: Bug
Components: Script, UI - Shell
Affects Versions: 3.9.2.Final
Reporter: George Gastaldi
Fix For: 3.x Future
{code}
Using Forge at /home/ggastald/workspace/core/dist/target/forge-distribution-3.9.3-SNAPSHOT
_____
| ___|__ _ __ __ _ ___
| |_ / _ \| `__/ _` |/ _ \ \\
| _| (_) | | | (_| | __/ //
|_| \___/|_| \__, |\___|
|__/
JBoss Forge, version [ 3.9.3-SNAPSHOT ] - JBoss, by Red Hat, Inc. [ http://forge.jboss.org ]
Hit '<TAB>' for a list of available commands and 'man [cmd]' for help on a specific command.
To quit the shell, type 'exit'.
[bin]$ ls
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory not found
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months