[JBoss JIRA] (ROASTER-117) Cannot set supertype with nested generics
by Kai Müller (Jira)
[ https://issues.jboss.org/browse/ROASTER-117?page=com.atlassian.jira.plugi... ]
Kai Müller updated ROASTER-117:
-------------------------------
Comment: was deleted
(was: Hi,
it seems this is an issue with your test program. You executing the split on the first generic part, which is "java.util.Map<String,SomeOtherClass>". If you then execute a split on this and try to convert it to a simple type, which is "java.util.Map<String" --> that's no valid java.
Your program can be …
[View More]fixed, by adding another getGenericsTypeParameter and using the new value in the for loop:
{code:java}
String type = "SomeClass<java.util.Map<String,SomeOtherClass>>";
String typeD = Types.stripGenerics(type);
String simpleTypeDName = Types.toSimpleName(typeD);
String typesGeneric = Types.getGenericsTypeParameter(type);
String typesGenericMap = Types.getGenericsTypeParameter(typesGeneric);
for (String typeP : typesGenericMap.split(","))
{
System.out.println(typeP);
Types.toSimpleName(typeP.trim());
}
{code}
Best regards,
Kai
)
> Cannot set supertype with nested generics
> -----------------------------------------
>
> Key: ROASTER-117
> URL: https://issues.jboss.org/browse/ROASTER-117
> Project: Roaster
> Issue Type: Bug
> Components: JDT
> Affects Versions: 2.19.4.Final
> Reporter: Stefan Brötz
> Priority: Major
>
> Calling javaClassSource.setSuperType("SomeClass<java.util.Map<String,SomeOtherClass>>") throws a java.lang.StringIndexOutOfBoundsException:
> java.lang.StringIndexOutOfBoundsException: String index out of range: -15
> at java.lang.String.substring(String.java:1967)
> at org.jboss.forge.roaster.model.util.Types.isGeneric(Types.java:317)
> at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:192)
> at myTest(...)
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
[View Less]
6 years, 2 months
[JBoss JIRA] (ROASTER-117) Cannot set supertype with nested generics
by Kai Müller (Jira)
[ https://issues.jboss.org/browse/ROASTER-117?page=com.atlassian.jira.plugi... ]
Kai Müller commented on ROASTER-117:
------------------------------------
Hi,
it seems this is an issue with your test program. You executing the split on the first generic part, which is "java.util.Map<String,SomeOtherClass>". If you then execute a split on this and try to convert it to a simple type, which is "java.util.Map<String" --> that's no valid java.
Your program can be fixed, by adding …
[View More]another getGenericsTypeParameter and using the new value in the for loop:
{code:java}
String type = "SomeClass<java.util.Map<String,SomeOtherClass>>";
String typeD = Types.stripGenerics(type);
String simpleTypeDName = Types.toSimpleName(typeD);
String typesGeneric = Types.getGenericsTypeParameter(type);
String typesGenericMap = Types.getGenericsTypeParameter(typesGeneric);
for (String typeP : typesGenericMap.split(","))
{
System.out.println(typeP);
Types.toSimpleName(typeP.trim());
}
{code}
Best regards,
Kai
> Cannot set supertype with nested generics
> -----------------------------------------
>
> Key: ROASTER-117
> URL: https://issues.jboss.org/browse/ROASTER-117
> Project: Roaster
> Issue Type: Bug
> Components: JDT
> Affects Versions: 2.19.4.Final
> Reporter: Stefan Brötz
> Priority: Major
>
> Calling javaClassSource.setSuperType("SomeClass<java.util.Map<String,SomeOtherClass>>") throws a java.lang.StringIndexOutOfBoundsException:
> java.lang.StringIndexOutOfBoundsException: String index out of range: -15
> at java.lang.String.substring(String.java:1967)
> at org.jboss.forge.roaster.model.util.Types.isGeneric(Types.java:317)
> at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:192)
> at myTest(...)
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
[View Less]
6 years, 2 months
[JBoss JIRA] (ROASTER-119) Performance issue
by Kai Müller (Jira)
[ https://issues.jboss.org/browse/ROASTER-119?page=com.atlassian.jira.plugi... ]
Kai Müller commented on ROASTER-119:
------------------------------------
Hi,
I tried to track this issue down and it seems to be related to the eclipse add child logic. There are some loops used, which can lead to a longer runtime as more elements are added. I would say that this is a expected behaviour.
Please note, that the runtime significant improves with the roaster version 2.20.6.FINAL.
Best regards,
Kai
…
[View More]
> Performance issue
> -----------------
>
> Key: ROASTER-119
> URL: https://issues.jboss.org/browse/ROASTER-119
> Project: Roaster
> Issue Type: Bug
> Affects Versions: 2.19.4.Final
> Reporter: ben Picot
> Priority: Major
> Attachments: Test.zip
>
>
> The issue I have is that the more fields I add, the slower the add or get operation become. Generated classes are java Bean type. Time adding first properties is fine but it's getting really slow for java classes having many properties.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
[View Less]
6 years, 2 months
[JBoss JIRA] (ROASTER-131) Config file not applied when using CLI
by Gunnar Morling (Jira)
[ https://issues.jboss.org/browse/ROASTER-131?page=com.atlassian.jira.plugi... ]
Gunnar Morling edited comment on ROASTER-131 at 1/19/19 11:04 AM:
------------------------------------------------------------------
Hey [~gastaldi], I've pushed an example here: https://github.com/gunnarmorling/deptective/tree/roaster
This is using Roaster 2.20.6 on Java 8 source files. Run {{./.roaster/bin/roaster -c etc/eclipse-formatter.xml -r javac-plugin}} and observe how many files will be re-formatted, …
[View More]indenting with tabs. In contrast, the expected formatting is shown when running {{mvn spotless:apply}} (this also applies the same config file but will just re-format a single source file which hasn't the right formatting yet).
was (Author: gunnar.morling):
Hey [~gastaldi], I've pushed an exmaple here: https://github.com/gunnarmorling/deptective/tree/roaster
This is using Roaster 2.20.6 on Java 8 source files. Run {{./.roaster/bin/roaster -c etc/eclipse-formatter.xml -r javac-plugin}} and observe how many files will be re-formatted, indenting with tabs. In contrast, the expected formatting is shown when running {{mvn spotless:apply}} (this also applies the same config file but will just re-format a single source file which hasn't the right formatting yet).
> Config file not applied when using CLI
> --------------------------------------
>
> Key: ROASTER-131
> URL: https://issues.jboss.org/browse/ROASTER-131
> Project: Roaster
> Issue Type: Enhancement
> Reporter: Gunnar Morling
> Priority: Major
>
> I'm using the CLI (roaster.sh) to format some source files, but it doesn't apply the given Eclipse formatter file (passed via -c). As per roaster's output it should have worked, but clearly it's using a different configuration, e.g. in my XML config file I'm mandating to only use spaces for indentation, whereas the file is indented with tabs after roaster ran. Note the config itself can't be the problem, as it's applied as expected when ran through Spotless.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
[View Less]
6 years, 2 months
[JBoss JIRA] (ROASTER-131) Config file not applied when using CLI
by Gunnar Morling (Jira)
[ https://issues.jboss.org/browse/ROASTER-131?page=com.atlassian.jira.plugi... ]
Gunnar Morling edited comment on ROASTER-131 at 1/19/19 11:01 AM:
------------------------------------------------------------------
Hey [~gastaldi], I've pushed an exmaple here: https://github.com/gunnarmorling/deptective/tree/roaster
This is using Roaster 2.20.6 on Java 8 source files. Run {{./.roaster/bin/roaster -c etc/eclipse-formatter.xml -r javac-plugin}} and observe how many files will be re-formatted, …
[View More]indenting with tabs. In contrast, the expected formatting is shown when running {{mvn spotless:apply}} (this also applies the same config file but will just re-format a single source file which hasn't the right formatting yet).
was (Author: gunnar.morling):
Hey [~gastaldi], I've pushed an exmaple here: https://github.com/gunnarmorling/deptective/tree/roaster
This is using Roaster 2.20.6 on Java 8 source files. Run {{./.roaster/bin/roaster -c etc/eclipse-formatter.xml -r javac-plugin}} and observe how many files will be re-formatted, indenting with tabs. In contrast, the expected formatting is shown when running {{mvn spotless:apply}} (this will just re-format a single file which hasn't the right formatting yet).
> Config file not applied when using CLI
> --------------------------------------
>
> Key: ROASTER-131
> URL: https://issues.jboss.org/browse/ROASTER-131
> Project: Roaster
> Issue Type: Enhancement
> Reporter: Gunnar Morling
> Priority: Major
>
> I'm using the CLI (roaster.sh) to format some source files, but it doesn't apply the given Eclipse formatter file (passed via -c). As per roaster's output it should have worked, but clearly it's using a different configuration, e.g. in my XML config file I'm mandating to only use spaces for indentation, whereas the file is indented with tabs after roaster ran. Note the config itself can't be the problem, as it's applied as expected when ran through Spotless.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
[View Less]
6 years, 2 months
[JBoss JIRA] (ROASTER-131) Config file not applied when using CLI
by Gunnar Morling (Jira)
[ https://issues.jboss.org/browse/ROASTER-131?page=com.atlassian.jira.plugi... ]
Gunnar Morling commented on ROASTER-131:
----------------------------------------
Hey [~gastaldi], I've pushed an exmaple here: https://github.com/gunnarmorling/deptective/tree/roaster
This is using Roaster 2.20.6 on Java 8 source files. Run {{./.roaster/bin/roaster -c etc/eclipse-formatter.xml -r javac-plugin}} and observe how many files will be re-formatted, indenting with tabs. In contrast, the expected …
[View More]formatting is shown when running {{mvn spotless:apply}} (this will just re-format a single file which hasn't the right formatting yet).
> Config file not applied when using CLI
> --------------------------------------
>
> Key: ROASTER-131
> URL: https://issues.jboss.org/browse/ROASTER-131
> Project: Roaster
> Issue Type: Enhancement
> Reporter: Gunnar Morling
> Priority: Major
>
> I'm using the CLI (roaster.sh) to format some source files, but it doesn't apply the given Eclipse formatter file (passed via -c). As per roaster's output it should have worked, but clearly it's using a different configuration, e.g. in my XML config file I'm mandating to only use spaces for indentation, whereas the file is indented with tabs after roaster ran. Note the config itself can't be the problem, as it's applied as expected when ran through Spotless.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
[View Less]
6 years, 2 months
[JBoss JIRA] (ROASTER-131) Config file not applied when using CLI
by George Gastaldi (Jira)
[ https://issues.jboss.org/browse/ROASTER-131?page=com.atlassian.jira.plugi... ]
George Gastaldi commented on ROASTER-131:
-----------------------------------------
Hi Gunnar,
Can you provide some sample files (a test case would be even better)
reproducing this behavior?
Em Sáb, 19 de jan de 2019 12:44, Gunnar Morling (Jira) <issues(a)jboss.org
> Config file not applied when using CLI
> --------------------------------------
>
> Key: ROASTER-131
> …
[View More] URL: https://issues.jboss.org/browse/ROASTER-131
> Project: Roaster
> Issue Type: Enhancement
> Reporter: Gunnar Morling
> Priority: Major
>
> I'm using the CLI (roaster.sh) to format some source files, but it doesn't apply the given Eclipse formatter file (passed via -c). As per roaster's output it should have worked, but clearly it's using a different configuration, e.g. in my XML config file I'm mandating to only use spaces for indentation, whereas the file is indented with tabs after roaster ran. Note the config itself can't be the problem, as it's applied as expected when ran through Spotless.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
[View Less]
6 years, 2 months