[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:
-----------------------------------------
There is {{getSimpleName}} or {{getQualifiedName}} from the returned {{Import}} object. Feel free to submit another PR with improvements to this Javadoc
> 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
> Assignee: Kai Müller
> Priority: Major
> Fix For: 2.20.5.Final
>
>
> 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)
[ https://issues.jboss.org/browse/ROASTER-128?page=com.atlassian.jira.plugi... ]
Kai Müller reopened ROASTER-128:
--------------------------------
Hi, can you please comment on the second part: 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.
> 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
> Assignee: Kai Müller
> Priority: Major
> Fix For: 2.20.5.Final
>
>
> 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 closed ROASTER-128.
-----------------------------------
Resolution: Done
> 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
> Assignee: Kai Müller
> Priority: Major
> Fix For: 2.20.5.Final
>
>
> 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 closed ROASTER-128.
-----------------------------------
Fix Version/s: 2.20.3.Final
Resolution: Done
> 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
> Assignee: Kai Müller
> Priority: Major
> Fix For: 2.20.3.Final
>
>
> 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 reopened ROASTER-128:
-------------------------------------
> 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
> Assignee: Kai Müller
> Priority: Major
> Fix For: 2.20.5.Final
>
>
> 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 updated ROASTER-128:
------------------------------------
Fix Version/s: 2.20.5.Final
(was: 2.20.3.Final)
> 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
> Assignee: Kai Müller
> Priority: Major
> Fix For: 2.20.5.Final
>
>
> 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)
[ https://issues.jboss.org/browse/ROASTER-128?page=com.atlassian.jira.plugi... ]
Kai Müller reassigned ROASTER-128:
----------------------------------
Assignee: Kai Müller
> 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
> Assignee: 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 Anonymous (Jira)
[ https://issues.jboss.org/browse/ROASTER-128?page=com.atlassian.jira.plugi... ]
Issue was automatically transitioned when Kai Müller created pull request #82 in GitHub
---------------------------------------------------------------------------------------
Status: Pull Request Sent (was: Open)
> 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)
[ https://issues.jboss.org/browse/ROASTER-128?page=com.atlassian.jira.plugi... ]
Kai Müller commented on ROASTER-128:
------------------------------------
Hi,
I created https://github.com/forge/roaster/pull/82. The addImport method will still return a Import object, because a null object is not expected at this point. So I just suppress the creation of the import statement and returning a valid Import object.
Best regards,
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:
-----------------------------------------
Fantastic! Looking forward to reviewing your PR.
Have a great weekend you too.
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