[JBoss JIRA] (ROASTER-43) Class rename error when a class has inner classes
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-43?page=com.atlassian.jira.plugin... ]
George Gastaldi reassigned ROASTER-43:
--------------------------------------
Assignee: George Gastaldi
> Class rename error when a class has inner classes
> -------------------------------------------------
>
> Key: ROASTER-43
> URL: https://issues.jboss.org/browse/ROASTER-43
> Project: Roaster
> Issue Type: Bug
> Affects Versions: 2.7.1.Final
> Reporter: Walter Medvedeo
> Assignee: George Gastaldi
> Fix For: 2.x Future
>
>
> We have some processing that needs to change the class name for a java class programatically.
> So what we do is basically to invoke:
> JavaClassSource javaClassSource = "we have an instance readed with the parser"
> and then we do: javaClassSource.setName( "TheNewName" ); to change the class name.
> And this works fine for simple clases.
> But when we have a class, that have inner clases the class rename is not working well.
> The problem is that when the Outer class is renamed, the constructors for the Inner class are also renamed.
> Example, we have a class like this.
> {code:java}
> public class Outer
> {
> public class Inner
> {
> String innerField1;
> public Inner()
> {
> }
> public Inner(String innerField1) {
> this.innerField1 = innerField1;
> }
> }
> public Outer()
> {
> }
> }
> {code}
> And when we try to rename the Outer class to "RenamedOuter", we get a code like this. The constructors for the Inner class were also renamed.
> {code:java}
> public class RenamedOuter
> {
> public class Inner
> {
> String innerField1;
> public RenamedOuter()
> {
> }
> public RenamedOuter(String innerField1) {
> this.innerField1 = innerField1;
> }
> }
> public RenamedOuter()
> {
> }
> }
> {code}
> Doing some debuging we could find some pointer to the problem.
> If you go to the JavaClassImpl, you will see that the following method is invoked when a class is about to be renamed.
> And we found that the loop is processing all methods, outer class methods an inner class metods. I means that inner class
> constructors are procesed, and that's why they are also renamed to "RenamedOuter".
> {code:java}
> @Override
> protected JavaClassSource updateTypeNames(final String newName)
> {
> for (MethodSource<JavaClassSource> m : getMethods())
> {
> if (m.isConstructor())
> {
> m.setConstructor(false);
> m.setConstructor(true);
> }
> }
> return this;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month
[JBoss JIRA] (FORGEPLUGINS-182) Create a Dockerfile parser
by Vineet Reynolds (JIRA)
Vineet Reynolds created FORGEPLUGINS-182:
--------------------------------------------
Summary: Create a Dockerfile parser
Key: FORGEPLUGINS-182
URL: https://issues.jboss.org/browse/FORGEPLUGINS-182
Project: Forge Plugins/Addons
Issue Type: Sub-task
Reporter: Vineet Reynolds
This would allow Forge to parse and/or edit Dockerfiles. The parser would be capable of understanding the Dockerfile syntax. Ideally, the parser would expose a fluent API for clients to interact with Dockerfiles.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month
[JBoss JIRA] (FORGEPLUGINS-181) Create a Docker addon
by Vineet Reynolds (JIRA)
Vineet Reynolds created FORGEPLUGINS-181:
--------------------------------------------
Summary: Create a Docker addon
Key: FORGEPLUGINS-181
URL: https://issues.jboss.org/browse/FORGEPLUGINS-181
Project: Forge Plugins/Addons
Issue Type: Feature Request
Reporter: Vineet Reynolds
This addon would allow Forge to support Docker. Features are undecided as yet, and will be logged as subtasks.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month
[JBoss JIRA] (ROASTER-43) Class rename error when a class has inner classes
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-43?page=com.atlassian.jira.plugin... ]
George Gastaldi updated ROASTER-43:
-----------------------------------
Fix Version/s: 2.x Future
> Class rename error when a class has inner classes
> -------------------------------------------------
>
> Key: ROASTER-43
> URL: https://issues.jboss.org/browse/ROASTER-43
> Project: Roaster
> Issue Type: Bug
> Affects Versions: 2.7.1.Final
> Reporter: Walter Medvedeo
> Fix For: 2.x Future
>
>
> We have some processing that needs to change the class name for a java class programatically.
> So what we do is basically to invoke:
> JavaClassSource javaClassSource = "we have an instance readed with the parser"
> and then we do: javaClassSource.setName( "TheNewName" ); to change the class name.
> And this works fine for simple clases.
> But when we have a class, that have inner clases the class rename is not working well.
> The problem is that when the Outer class is renamed, the constructors for the Inner class are also renamed.
> Example, we have a class like this.
> {code:java}
> public class Outer
> {
> public class Inner
> {
> String innerField1;
> public Inner()
> {
> }
> public Inner(String innerField1) {
> this.innerField1 = innerField1;
> }
> }
> public Outer()
> {
> }
> }
> {code}
> And when we try to rename the Outer class to "RenamedOuter", we get a code like this. The constructors for the Inner class were also renamed.
> {code:java}
> public class RenamedOuter
> {
> public class Inner
> {
> String innerField1;
> public RenamedOuter()
> {
> }
> public RenamedOuter(String innerField1) {
> this.innerField1 = innerField1;
> }
> }
> public RenamedOuter()
> {
> }
> }
> {code}
> Doing some debuging we could find some pointer to the problem.
> If you go to the JavaClassImpl, you will see that the following method is invoked when a class is about to be renamed.
> And we found that the loop is processing all methods, outer class methods an inner class metods. I means that inner class
> constructors are procesed, and that's why they are also renamed to "RenamedOuter".
> {code:java}
> @Override
> protected JavaClassSource updateTypeNames(final String newName)
> {
> for (MethodSource<JavaClassSource> m : getMethods())
> {
> if (m.isConstructor())
> {
> m.setConstructor(false);
> m.setConstructor(true);
> }
> }
> return this;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month
[JBoss JIRA] (ROASTER-43) Class rename error when a class has inner classes
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-43?page=com.atlassian.jira.plugin... ]
George Gastaldi updated ROASTER-43:
-----------------------------------
Description:
We have some processing that needs to change the class name for a java class programatically.
So what we do is basically to invoke:
JavaClassSource javaClassSource = "we have an instance readed with the parser"
and then we do: javaClassSource.setName( "TheNewName" ); to change the class name.
And this works fine for simple clases.
But when we have a class, that have inner clases the class rename is not working well.
The problem is that when the Outer class is renamed, the constructors for the Inner class are also renamed.
Example, we have a class like this.
{code:java}
public class Outer
{
public class Inner
{
String innerField1;
public Inner()
{
}
public Inner(String innerField1) {
this.innerField1 = innerField1;
}
}
public Outer()
{
}
}
{code}
And when we try to rename the Outer class to "RenamedOuter", we get a code like this. The constructors for the Inner class were also renamed.
{code:java}
public class RenamedOuter
{
public class Inner
{
String innerField1;
public RenamedOuter()
{
}
public RenamedOuter(String innerField1) {
this.innerField1 = innerField1;
}
}
public RenamedOuter()
{
}
}
{code}
Doing some debuging we could find some pointer to the problem.
If you go to the JavaClassImpl, you will see that the following method is invoked when a class is about to be renamed.
And we found that the loop is processing all methods, outer class methods an inner class metods. I means that inner class
constructors are procesed, and that's why they are also renamed to "RenamedOuter".
{code:java}
@Override
protected JavaClassSource updateTypeNames(final String newName)
{
for (MethodSource<JavaClassSource> m : getMethods())
{
if (m.isConstructor())
{
m.setConstructor(false);
m.setConstructor(true);
}
}
return this;
}
{code}
was:
We have some processing that needs to change the class name for a java class programatically.
So what we do is basically to invoke:
JavaClassSource javaClassSource = "we have an instance readed with the parser"
and then we do: javaClassSource.setName( "TheNewName" ); to change the class name.
And this works fine for simple clases.
But when we have a class, that have inner clases the class rename is not working well.
The problem is that when the Outer class is renamed, the constructors for the Inner class are also renamed.
Example, we have a class like this.
{code:java}
public class Outer
{
public class Inner
{
String innerField1;
public Inner()
{
}
public Inner(String innerField1) {
this.innerField1 = innerField1;
}
}
public Outer()
{
}
}
{code}
And when we try to rename the Outer class to "RenamedOuter", we get a code like this. The constructors for the Inner class were also renamed.
{code:java}
public class RenamedOuter
{
public class Inner
{
String innerField1;
public RenamedOuter()
{
}
public RenamedOuter(String innerField1) {
this.innerField1 = innerField1;
}
}
public RenamedOuter()
{
}
}
{code}
Doing some debuging we could find some pointer to the problem.
If you go to the JavaClassImpl, you will see that the following method is invoked when a class is about to be renamed.
And we found that the loop is processing all methods, outer class methods an inner class metods. I means that inner class
constructors are procesed, and that's why they are also renamed to "RenamedOuter".
{code:java}
@Override
protected JavaClassSource updateTypeNames(final String newName)
{
for (MethodSource<JavaClassSource> m : getMethods())
{
if (m.isConstructor())
{
m.setConstructor(false);
m.setConstructor(true);
}
}
return this;
}
> Class rename error when a class has inner classes
> -------------------------------------------------
>
> Key: ROASTER-43
> URL: https://issues.jboss.org/browse/ROASTER-43
> Project: Roaster
> Issue Type: Bug
> Affects Versions: 2.7.1.Final
> Reporter: Walter Medvedeo
>
> We have some processing that needs to change the class name for a java class programatically.
> So what we do is basically to invoke:
> JavaClassSource javaClassSource = "we have an instance readed with the parser"
> and then we do: javaClassSource.setName( "TheNewName" ); to change the class name.
> And this works fine for simple clases.
> But when we have a class, that have inner clases the class rename is not working well.
> The problem is that when the Outer class is renamed, the constructors for the Inner class are also renamed.
> Example, we have a class like this.
> {code:java}
> public class Outer
> {
> public class Inner
> {
> String innerField1;
> public Inner()
> {
> }
> public Inner(String innerField1) {
> this.innerField1 = innerField1;
> }
> }
> public Outer()
> {
> }
> }
> {code}
> And when we try to rename the Outer class to "RenamedOuter", we get a code like this. The constructors for the Inner class were also renamed.
> {code:java}
> public class RenamedOuter
> {
> public class Inner
> {
> String innerField1;
> public RenamedOuter()
> {
> }
> public RenamedOuter(String innerField1) {
> this.innerField1 = innerField1;
> }
> }
> public RenamedOuter()
> {
> }
> }
> {code}
> Doing some debuging we could find some pointer to the problem.
> If you go to the JavaClassImpl, you will see that the following method is invoked when a class is about to be renamed.
> And we found that the loop is processing all methods, outer class methods an inner class metods. I means that inner class
> constructors are procesed, and that's why they are also renamed to "RenamedOuter".
> {code:java}
> @Override
> protected JavaClassSource updateTypeNames(final String newName)
> {
> for (MethodSource<JavaClassSource> m : getMethods())
> {
> if (m.isConstructor())
> {
> m.setConstructor(false);
> m.setConstructor(true);
> }
> }
> return this;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month
[JBoss JIRA] (ROASTER-43) Class rename error when a class has inner classes
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-43?page=com.atlassian.jira.plugin... ]
George Gastaldi updated ROASTER-43:
-----------------------------------
Description:
We have some processing that needs to change the class name for a java class programatically.
So what we do is basically to invoke:
JavaClassSource javaClassSource = "we have an instance readed with the parser"
and then we do: javaClassSource.setName( "TheNewName" ); to change the class name.
And this works fine for simple clases.
But when we have a class, that have inner clases the class rename is not working well.
The problem is that when the Outer class is renamed, the constructors for the Inner class are also renamed.
Example, we have a class like this.
{code:java}
public class Outer
{
public class Inner
{
String innerField1;
public Inner()
{
}
public Inner(String innerField1) {
this.innerField1 = innerField1;
}
}
public Outer()
{
}
}
{code}
And when we try to rename the Outer class to "RenamedOuter", we get a code like this. The constructors for the Inner class were also renamed.
{code:java}
public class RenamedOuter
{
public class Inner
{
String innerField1;
public RenamedOuter()
{
}
public RenamedOuter(String innerField1) {
this.innerField1 = innerField1;
}
}
public RenamedOuter()
{
}
}
{code}
Doing some debuging we could find some pointer to the problem.
If you go to the JavaClassImpl, you will see that the following method is invoked when a class is about to be renamed.
And we found that the loop is processing all methods, outer class methods an inner class metods. I means that inner class
constructors are procesed, and that's why they are also renamed to "RenamedOuter".
{code:java}
@Override
protected JavaClassSource updateTypeNames(final String newName)
{
for (MethodSource<JavaClassSource> m : getMethods())
{
if (m.isConstructor())
{
m.setConstructor(false);
m.setConstructor(true);
}
}
return this;
}
was:
We have some processing that needs to change the class name for a java class programatically.
So what we do is basically to invoke:
JavaClassSource javaClassSource = "we have an instance readed with the parser"
and then we do: javaClassSource.setName( "TheNewName" ); to change the class name.
And this works fine for simple clases.
But when we have a class, that have inner clases the class rename is not working well.
The problem is that when the Outer class is renamed, the constructors for the Inner class are also renamed.
Example, we have a class like this.
public class Outer
{
public class Inner
{
String innerField1;
public Inner()
{
}
public Inner(String innerField1) {
this.innerField1 = innerField1;
}
}
public Outer()
{
}
}
And when we try to rename the Outer class to "RenamedOuter", we get a code like this. The constructors for the Inner class were also renamed.
public class RenamedOuter
{
public class Inner
{
String innerField1;
public RenamedOuter()
{
}
public RenamedOuter(String innerField1) {
this.innerField1 = innerField1;
}
}
public RenamedOuter()
{
}
}
Doing some debuging we could find some pointer to the problem.
If you go to the JavaClassImpl, you will see that the following method is invoked when a class is about to be renamed.
And we found that the loop is processing all methods, outer class methods an inner class metods. I means that inner class
constructors are procesed, and that's why they are also renamed to "RenamedOuter".
@Override
protected JavaClassSource updateTypeNames(final String newName)
{
for (MethodSource<JavaClassSource> m : getMethods())
{
if (m.isConstructor())
{
m.setConstructor(false);
m.setConstructor(true);
}
}
return this;
}
> Class rename error when a class has inner classes
> -------------------------------------------------
>
> Key: ROASTER-43
> URL: https://issues.jboss.org/browse/ROASTER-43
> Project: Roaster
> Issue Type: Bug
> Affects Versions: 2.7.1.Final
> Reporter: Walter Medvedeo
>
> We have some processing that needs to change the class name for a java class programatically.
> So what we do is basically to invoke:
> JavaClassSource javaClassSource = "we have an instance readed with the parser"
> and then we do: javaClassSource.setName( "TheNewName" ); to change the class name.
> And this works fine for simple clases.
> But when we have a class, that have inner clases the class rename is not working well.
> The problem is that when the Outer class is renamed, the constructors for the Inner class are also renamed.
> Example, we have a class like this.
> {code:java}
> public class Outer
> {
> public class Inner
> {
> String innerField1;
> public Inner()
> {
> }
> public Inner(String innerField1) {
> this.innerField1 = innerField1;
> }
> }
> public Outer()
> {
> }
> }
> {code}
> And when we try to rename the Outer class to "RenamedOuter", we get a code like this. The constructors for the Inner class were also renamed.
> {code:java}
> public class RenamedOuter
> {
> public class Inner
> {
> String innerField1;
> public RenamedOuter()
> {
> }
> public RenamedOuter(String innerField1) {
> this.innerField1 = innerField1;
> }
> }
> public RenamedOuter()
> {
> }
> }
> {code}
> Doing some debuging we could find some pointer to the problem.
> If you go to the JavaClassImpl, you will see that the following method is invoked when a class is about to be renamed.
> And we found that the loop is processing all methods, outer class methods an inner class metods. I means that inner class
> constructors are procesed, and that's why they are also renamed to "RenamedOuter".
> {code:java}
> @Override
> protected JavaClassSource updateTypeNames(final String newName)
> {
> for (MethodSource<JavaClassSource> m : getMethods())
> {
> if (m.isConstructor())
> {
> m.setConstructor(false);
> m.setConstructor(true);
> }
> }
> return this;
> }
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month
[JBoss JIRA] (FORGE-2170) Forge addon-build-and-install doesn't work with wildcards "." "~"
by Daniel Cunha (JIRA)
[ https://issues.jboss.org/browse/FORGE-2170?page=com.atlassian.jira.plugin... ]
Daniel Cunha updated FORGE-2170:
--------------------------------
Issue Type: Bug (was: Feature Request)
> Forge addon-build-and-install doesn't work with wildcards "." "~"
> ------------------------------------------------------------------
>
> Key: FORGE-2170
> URL: https://issues.jboss.org/browse/FORGE-2170
> Project: Forge
> Issue Type: Bug
> Components: Addon Manager
> Affects Versions: 2.13.1.Final
> Reporter: Daniel Cunha
>
> [addon-arquillian]$ pwd
> /home/soro/Tools/workspace/addon-arquillian
> [addon-arquillian]$ addon-build-and-install --projectRoot .
> ***ERROR*** No project found in root /home/soro/.m2/repository/org/jboss/forge/forge-distribution/2.13.1-SNAPSHOT/.
> [addon-arquillian]$ addon-build-and-install --projectRoot ~/Tools/workspace/addon-arquillian
> ***ERROR*** No project found in root /home/soro/.m2/repository/org/jboss/forge/forge-distribution/2.13.1-SNAPSHOT/.
> [addon-arquillian]$
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month