[JBoss JIRA] (FORGE-1005) Consider primitive field types, array types and class hierarchies for generation of equals and hashcode implementations
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1005?page=com.atlassian.jira.plugin... ]
Vineet Reynolds commented on FORGE-1005:
----------------------------------------
I don't seem to find any easy way to detect if a type is nested or not, and obtain it's outer type, before generating an appropriate {{equals()}} and {{hashCode()}} implementation. It might make sense to spin it off as another issue, since it could imply fixing other issues in the parser (ref: FORGE-471).
> Consider primitive field types, array types and class hierarchies for generation of equals and hashcode implementations
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: FORGE-1005
> URL: https://issues.jboss.org/browse/FORGE-1005
> Project: Forge
> Issue Type: Enhancement
> Components: Parsers / File Manipulation
> Affects Versions: 1.3.3.Final
> Reporter: Vineet Reynolds
> Assignee: Vineet Reynolds
>
> The current generated implementations of {{equals}} and {{hashCode}} (in FORGE-995) do not delegate to the super class of the object. This should be done for all types whose immediate super classes are not {{Object}}.
> Additionally, primitive types like {{float}} and {{double}} need to be treated differently for both {{equals}} and {{hashCode}} implementations, while {{boolean}} and {{long}} need to be treated differently for {{hashCode}} implementations.
> Arrays also need to be considered for both {{equals}} and {{hashCode}} implementations.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (FORGE-1005) Consider primitive field types, array types and class hierarchies for generation of equals and hashcode implementations
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1005?page=com.atlassian.jira.plugin... ]
Vineet Reynolds commented on FORGE-1005:
----------------------------------------
Also added support for generating {{equals()}} and {{hashCode()}} methods that consider all primitives and array types. Enhanced the Java Parser API with additional methods (that dont break compatibility) to aid in these.
> Consider primitive field types, array types and class hierarchies for generation of equals and hashcode implementations
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: FORGE-1005
> URL: https://issues.jboss.org/browse/FORGE-1005
> Project: Forge
> Issue Type: Enhancement
> Components: Parsers / File Manipulation
> Affects Versions: 1.3.3.Final
> Reporter: Vineet Reynolds
> Assignee: Vineet Reynolds
>
> The current generated implementations of {{equals}} and {{hashCode}} (in FORGE-995) do not delegate to the super class of the object. This should be done for all types whose immediate super classes are not {{Object}}.
> Additionally, primitive types like {{float}} and {{double}} need to be treated differently for both {{equals}} and {{hashCode}} implementations, while {{boolean}} and {{long}} need to be treated differently for {{hashCode}} implementations.
> Arrays also need to be considered for both {{equals}} and {{hashCode}} implementations.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (FORGE-1005) Consider primitive field types, array types and class hierarchies for generation of equals and hashcode implementations
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1005?page=com.atlassian.jira.plugin... ]
Vineet Reynolds updated FORGE-1005:
-----------------------------------
Description:
The current generated implementations of {{equals}} and {{hashCode}} (in FORGE-995) do not delegate to the super class of the object. This should be done for all types whose immediate super classes are not {{Object}}.
Additionally, primitive types like {{float}} and {{double}} need to be treated differently for both {{equals}} and {{hashCode}} implementations, while {{boolean}} and {{long}} need to be treated differently for {{hashCode}} implementations.
Arrays also need to be considered for both {{equals}} and {{hashCode}} implementations.
was:The current generated implementations of {{equals}} and {{hashCode}} (in FORGE-995) do not delegate to the super class of the object. This should be done for all types whose immediate super classes are not {{Object}}.
> Consider primitive field types, array types and class hierarchies for generation of equals and hashcode implementations
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: FORGE-1005
> URL: https://issues.jboss.org/browse/FORGE-1005
> Project: Forge
> Issue Type: Enhancement
> Components: Parsers / File Manipulation
> Affects Versions: 1.3.3.Final
> Reporter: Vineet Reynolds
> Assignee: Vineet Reynolds
>
> The current generated implementations of {{equals}} and {{hashCode}} (in FORGE-995) do not delegate to the super class of the object. This should be done for all types whose immediate super classes are not {{Object}}.
> Additionally, primitive types like {{float}} and {{double}} need to be treated differently for both {{equals}} and {{hashCode}} implementations, while {{boolean}} and {{long}} need to be treated differently for {{hashCode}} implementations.
> Arrays also need to be considered for both {{equals}} and {{hashCode}} implementations.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (FORGE-1006) The entity plugin should generate equals and hashcode implementations considering all suitable fields in the JPA entity
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1006?page=com.atlassian.jira.plugin... ]
Vineet Reynolds reassigned FORGE-1006:
--------------------------------------
Assignee: Vineet Reynolds
> The entity plugin should generate equals and hashcode implementations considering all suitable fields in the JPA entity
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: FORGE-1006
> URL: https://issues.jboss.org/browse/FORGE-1006
> Project: Forge
> Issue Type: Enhancement
> Components: Builtin Plugins
> Affects Versions: 1.3.3.Final
> Reporter: Vineet Reynolds
> Assignee: Vineet Reynolds
>
> As a result of FORGE-995 and FORGE-1005 the generated {{equals}} and {{hashcode}} implementations for JPA entities would be typically incorrect due to reliance on the auto-generated primary key value.
> Additionally, since the {{equals}} and {{hashCode}} methods are generated only once during creation of the JPA entity class, these methods would be out of date as more fields are added (unlike the {{toString}} method). We should enhance or regenerate the existing methods as new fields are added via the field plugin.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (FORGE-1005) Consider Superclasses other than Object during generation of equals and hashcode implementations
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1005?page=com.atlassian.jira.plugin... ]
Vineet Reynolds updated FORGE-1005:
-----------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/forge/java-parser/pull/5
The generator now includes a delegation to super.hashCode() and super.equals() when a super class not of type Object is detected for the provided class.
Additionally, bugs in the earlier equals generator were fixed. The equals method no longer returns immediately when the first field is equal; all fields need to be equal. Additionally, {{instanceof}} is used to verify that the Class instances are equal to account for subclasses, thereby ensuring that proxied instances are also equal.
> Consider Superclasses other than Object during generation of equals and hashcode implementations
> ------------------------------------------------------------------------------------------------
>
> Key: FORGE-1005
> URL: https://issues.jboss.org/browse/FORGE-1005
> Project: Forge
> Issue Type: Enhancement
> Components: Parsers / File Manipulation
> Affects Versions: 1.3.3.Final
> Reporter: Vineet Reynolds
>
> The current generated implementations of {{equals}} and {{hashCode}} (in FORGE-995) do not delegate to the super class of the object. This should be done for all types whose immediate super classes are not {{Object}}.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (FORGE-1007) Furnace container should support pluggable service providers.
by Lincoln Baxter III (JIRA)
Lincoln Baxter III created FORGE-1007:
-----------------------------------------
Summary: Furnace container should support pluggable service providers.
Key: FORGE-1007
URL: https://issues.jboss.org/browse/FORGE-1007
Project: Forge
Issue Type: Feature Request
Components: Furnace (Container)
Affects Versions: 2.0.0.Alpha6
Reporter: Lincoln Baxter III
Fix For: 2.x Future
{code}11:49:28 AM lincolnthree1: gastaldi: I am considering creating a furnace-cdi addon
11:50:22 AM lincolnthree1: if all addons depended on this, it would make it a lot easier to support pluggable addon containers, instead of assuming CDI based on beans.xml
11:50:32 AM lincolnthree1: they could depend on that instead of furnace-api
11:50:43 AM lincolnthree1: and it would no longer need to be <provided> scope
11:51:21 AM lincolnthree1: i would say that it could wait for Forge 2.1
11:51:23 AM lincolnthree1: but...
11:51:29 AM lincolnthree1: it would likely not be a backwards compatible change.
11:52:16 AM lincolnthree1: it's pretty complicated though
11:52:22 AM lincolnthree1: so i'll probably put it off
11:52:40 AM lincolnthree1: we need to get business value first
11:52:42 AM lincolnthree1: and we don't need that atm
11:53:08 AM lincolnthree1: but… what we could do is use the addon as a marker
11:53:18 AM lincolnthree1: that would be simpler than actually implementing it all
11:53:23 AM lincolnthree1: it would still bring in the APIs
11:53:29 AM lincolnthree1: but wouldn't really change the internals
11:55:24 AM gastaldi: hummm
11:55:31 AM gastaldi: that would be interesting
11:55:32 AM lincolnthree1: actually, that might very well work
11:55:57 AM gastaldi: I think we should do it for 2.0
11:56:00 AM lincolnthree1: in the end, this addon would register a service called "AddonInitializer" that handles the startup/shutdown of the addon (aka, addon Runnable)
11:56:02 AM lincolnthree1: yeah me too
11:56:15 AM lincolnthree1: Furnace could get that instance from the addon itself using ServiceLoader
11:56:32 AM lincolnthree1: then it would call it and the lifecycle comes from the addon itself!!
11:56:41 AM lincolnthree1: brilliant!
11:57:07 AM lincolnthree1: a classloading-only addon just becomes one, then, that doesnt have an AddonInitializer
11:57:10 AM lincolnthree1: I like it
11:57:11 AM lincolnthree1: a lot
11:57:58 AM gastaldi: JIRA that sh*t
11:58:18 AM lincolnthree1: it maybe already
11:58:23 AM lincolnthree1: but i'll add these notes if it is
gegastaldi [~gastaldi@redhat/jboss/gastaldi] entered the room. (11:58:33 AM)
mode (+o gegastaldi) by ChanServ (11:58:33 AM)
12:00:04 PM lincolnthree1: gastaldi: getting lunch and relocating
12:00:06 PM lincolnthree1: back in a bit
12:00:35 PM gegastaldi: K
12:02:17 PM gegastaldi: That would enable CDI extensions
12:02:26 PM gegastaldi: On each addon
12:02:43 PM lincolnthree1: gegastaldi: maybe
12:02:46 PM lincolnthree1: gegastaldi: hopefully{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (FORGE-1006) The entity plugin should generate equals and hashcode implementations considering all suitable fields in the JPA entity
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1006?page=com.atlassian.jira.plugin... ]
Vineet Reynolds updated FORGE-1006:
-----------------------------------
Description:
As a result of FORGE-995 and FORGE-1005 the generated {{equals}} and {{hashcode}} implementations for JPA entities would be typically incorrect due to reliance on the auto-generated primary key value.
Additionally, since the {[equals}} and {{hashCode}} methods are generated only once during creation of the JPA entity class, these methods would be out of date as more fields are added (unlike the {{toString}} method). We should enhance or regenerate the existing methods as new fields are added via the field plugin.
was:
As a result for FORGE-995 and FORGE-1005 the generated {{equals}} and {{hashcode}} implementations for JPA entities would be typically incorrect due to reliance on the auto-generated primary key value.
Additionally, since the {[equals}} and {{hashCode}} methods are generated only once during creation of the JPA entity class, these methods would be out of date as more fields are added (unlike the {{toString}} method). We should enhance or regenerate the existing methods as new fields are added via the field plugin.
> The entity plugin should generate equals and hashcode implementations considering all suitable fields in the JPA entity
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: FORGE-1006
> URL: https://issues.jboss.org/browse/FORGE-1006
> Project: Forge
> Issue Type: Enhancement
> Components: Builtin Plugins
> Affects Versions: 1.3.3.Final
> Reporter: Vineet Reynolds
>
> As a result of FORGE-995 and FORGE-1005 the generated {{equals}} and {{hashcode}} implementations for JPA entities would be typically incorrect due to reliance on the auto-generated primary key value.
> Additionally, since the {[equals}} and {{hashCode}} methods are generated only once during creation of the JPA entity class, these methods would be out of date as more fields are added (unlike the {{toString}} method). We should enhance or regenerate the existing methods as new fields are added via the field plugin.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (FORGE-1006) The entity plugin should generate equals and hashcode implementations considering all suitable fields in the JPA entity
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1006?page=com.atlassian.jira.plugin... ]
Vineet Reynolds updated FORGE-1006:
-----------------------------------
Description:
As a result of FORGE-995 and FORGE-1005 the generated {{equals}} and {{hashcode}} implementations for JPA entities would be typically incorrect due to reliance on the auto-generated primary key value.
Additionally, since the {{equals}} and {{hashCode}} methods are generated only once during creation of the JPA entity class, these methods would be out of date as more fields are added (unlike the {{toString}} method). We should enhance or regenerate the existing methods as new fields are added via the field plugin.
was:
As a result of FORGE-995 and FORGE-1005 the generated {{equals}} and {{hashcode}} implementations for JPA entities would be typically incorrect due to reliance on the auto-generated primary key value.
Additionally, since the {[equals}} and {{hashCode}} methods are generated only once during creation of the JPA entity class, these methods would be out of date as more fields are added (unlike the {{toString}} method). We should enhance or regenerate the existing methods as new fields are added via the field plugin.
> The entity plugin should generate equals and hashcode implementations considering all suitable fields in the JPA entity
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: FORGE-1006
> URL: https://issues.jboss.org/browse/FORGE-1006
> Project: Forge
> Issue Type: Enhancement
> Components: Builtin Plugins
> Affects Versions: 1.3.3.Final
> Reporter: Vineet Reynolds
>
> As a result of FORGE-995 and FORGE-1005 the generated {{equals}} and {{hashcode}} implementations for JPA entities would be typically incorrect due to reliance on the auto-generated primary key value.
> Additionally, since the {{equals}} and {{hashCode}} methods are generated only once during creation of the JPA entity class, these methods would be out of date as more fields are added (unlike the {{toString}} method). We should enhance or regenerate the existing methods as new fields are added via the field plugin.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months