You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "Martin Heidegger (Created) (JIRA)" <ji...@apache.org> on 2012/02/25 08:23:46 UTC

[jira] [Created] (FLEX-19) Code style improvements in framework

Code style improvements in framework
------------------------------------

                 Key: FLEX-19
                 URL: https://issues.apache.org/jira/browse/FLEX-19
             Project: Apache Flex
          Issue Type: Improvement
            Reporter: Martin Heidegger
            Assignee: Bertrand Delacretaz
            Priority: Trivial
         Attachments: A-semicolon.patch, B-nullboolean.patch, C-unusedimports.patch, D-unusedlocalvariables.patch, E-returntovoid.patch, F-dynamicKeyInVariable.patch, G-unusedprivatemethods.patch

After skimming the "framework" sub-project I created a set of patches to the source code of various categories.

  A) Missing semicolons in the code
  B) Changed implict casting from object to boolean to a explicit != null
  C) Removed unused imports
  D) Removed local variables that are unused and arguments of private functions that are unused
  E) Removed return statement in functions with : void signature
  F) Changed variables named "dynamic" to a name that is not same as a keyword
  G) Removed unused private methods

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-19) Code style improvements in framework

Posted by "Martin Heidegger (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216680#comment-13216680 ] 

Martin Heidegger commented on FLEX-19:
--------------------------------------

I know its an FDT bug: That occasionally happens with two parsers and no language specification. Anyways: I did a test [1] and please ignore this particular change.

[1] http://wonderfl.net/c/hPxg
                
> Code style improvements in framework
> ------------------------------------
>
>                 Key: FLEX-19
>                 URL: https://issues.apache.org/jira/browse/FLEX-19
>             Project: Apache Flex
>          Issue Type: Improvement
>            Reporter: Martin Heidegger
>            Assignee: Bertrand Delacretaz
>            Priority: Trivial
>         Attachments: A-semicolon.patch, B-nullboolean.patch, C-unusedimports.patch, D-unusedlocalvariables.patch, E-returntovoid.patch, F-dynamicKeyInVariable.patch, G-unusedprivatemethods.patch
>
>
> After skimming the "framework" sub-project I created a set of patches to the source code of various categories.
>   A) Missing semicolons in the code
>   B) Changed implict casting from object to boolean to a explicit != null
>   C) Removed unused imports
>   D) Removed local variables that are unused and arguments of private functions that are unused
>   E) Removed return statement in functions with : void signature
>   F) Changed variables named "dynamic" to a name that is not same as a keyword
>   G) Removed unused private methods

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-19) Code style improvements in framework

Posted by "Alex Harui (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216499#comment-13216499 ] 

Alex Harui commented on FLEX-19:
--------------------------------

Regarding D: That's a pretty strict definition of backward compatibility.  I probably would've just clipped those lines out.  In theory, the order in which properties are read shouldn't really matter, and in this constrained environment, if you're going to bother to clean up unused locals, you could save these bytes as well, but I could go either way.
                
> Code style improvements in framework
> ------------------------------------
>
>                 Key: FLEX-19
>                 URL: https://issues.apache.org/jira/browse/FLEX-19
>             Project: Apache Flex
>          Issue Type: Improvement
>            Reporter: Martin Heidegger
>            Assignee: Bertrand Delacretaz
>            Priority: Trivial
>         Attachments: A-semicolon.patch, B-nullboolean.patch, C-unusedimports.patch, D-unusedlocalvariables.patch, E-returntovoid.patch, F-dynamicKeyInVariable.patch, G-unusedprivatemethods.patch
>
>
> After skimming the "framework" sub-project I created a set of patches to the source code of various categories.
>   A) Missing semicolons in the code
>   B) Changed implict casting from object to boolean to a explicit != null
>   C) Removed unused imports
>   D) Removed local variables that are unused and arguments of private functions that are unused
>   E) Removed return statement in functions with : void signature
>   F) Changed variables named "dynamic" to a name that is not same as a keyword
>   G) Removed unused private methods

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-19) Code style improvements in framework

Posted by "Alex Harui (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216500#comment-13216500 ] 

Alex Harui commented on FLEX-19:
--------------------------------

Regarding empty spaces:  I'm actually surprised that was the only extra whitespace you found.
                
> Code style improvements in framework
> ------------------------------------
>
>                 Key: FLEX-19
>                 URL: https://issues.apache.org/jira/browse/FLEX-19
>             Project: Apache Flex
>          Issue Type: Improvement
>            Reporter: Martin Heidegger
>            Assignee: Bertrand Delacretaz
>            Priority: Trivial
>         Attachments: A-semicolon.patch, B-nullboolean.patch, C-unusedimports.patch, D-unusedlocalvariables.patch, E-returntovoid.patch, F-dynamicKeyInVariable.patch, G-unusedprivatemethods.patch
>
>
> After skimming the "framework" sub-project I created a set of patches to the source code of various categories.
>   A) Missing semicolons in the code
>   B) Changed implict casting from object to boolean to a explicit != null
>   C) Removed unused imports
>   D) Removed local variables that are unused and arguments of private functions that are unused
>   E) Removed return statement in functions with : void signature
>   F) Changed variables named "dynamic" to a name that is not same as a keyword
>   G) Removed unused private methods

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-19) Code style improvements in framework

Posted by "Alex Harui (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216375#comment-13216375 ] 

Alex Harui commented on FLEX-19:
--------------------------------

Why is AsyncListView in the semicolon patch?  I don't see a change from a quick look at the patch file.
                
> Code style improvements in framework
> ------------------------------------
>
>                 Key: FLEX-19
>                 URL: https://issues.apache.org/jira/browse/FLEX-19
>             Project: Apache Flex
>          Issue Type: Improvement
>            Reporter: Martin Heidegger
>            Assignee: Bertrand Delacretaz
>            Priority: Trivial
>         Attachments: A-semicolon.patch, B-nullboolean.patch, C-unusedimports.patch, D-unusedlocalvariables.patch, E-returntovoid.patch, F-dynamicKeyInVariable.patch, G-unusedprivatemethods.patch
>
>
> After skimming the "framework" sub-project I created a set of patches to the source code of various categories.
>   A) Missing semicolons in the code
>   B) Changed implict casting from object to boolean to a explicit != null
>   C) Removed unused imports
>   D) Removed local variables that are unused and arguments of private functions that are unused
>   E) Removed return statement in functions with : void signature
>   F) Changed variables named "dynamic" to a name that is not same as a keyword
>   G) Removed unused private methods

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-19) Code style improvements in framework

Posted by "Martin Heidegger (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216376#comment-13216376 ] 

Martin Heidegger commented on FLEX-19:
--------------------------------------

There were empty spaces after the ";".
                
> Code style improvements in framework
> ------------------------------------
>
>                 Key: FLEX-19
>                 URL: https://issues.apache.org/jira/browse/FLEX-19
>             Project: Apache Flex
>          Issue Type: Improvement
>            Reporter: Martin Heidegger
>            Assignee: Bertrand Delacretaz
>            Priority: Trivial
>         Attachments: A-semicolon.patch, B-nullboolean.patch, C-unusedimports.patch, D-unusedlocalvariables.patch, E-returntovoid.patch, F-dynamicKeyInVariable.patch, G-unusedprivatemethods.patch
>
>
> After skimming the "framework" sub-project I created a set of patches to the source code of various categories.
>   A) Missing semicolons in the code
>   B) Changed implict casting from object to boolean to a explicit != null
>   C) Removed unused imports
>   D) Removed local variables that are unused and arguments of private functions that are unused
>   E) Removed return statement in functions with : void signature
>   F) Changed variables named "dynamic" to a name that is not same as a keyword
>   G) Removed unused private methods

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-19) Code style improvements in framework

Posted by "Martin Heidegger (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216502#comment-13216502 ] 

Martin Heidegger commented on FLEX-19:
--------------------------------------

I was gunning for non-destructive improvements that keep the backwards compatibility 100% given as there is no Mustella I could test against. Also I have no idea what the policy to backwards compatibility policy is.

Those empty spaces slipped in - I didn't search for them :) I bet there are more missing. I think the tabs/spaces cleanup should be done right after the final contribution from adobe. The longer we wait the more branches will have troubles with that (merging in files where the tabs were corrected is terrifying).
                
> Code style improvements in framework
> ------------------------------------
>
>                 Key: FLEX-19
>                 URL: https://issues.apache.org/jira/browse/FLEX-19
>             Project: Apache Flex
>          Issue Type: Improvement
>            Reporter: Martin Heidegger
>            Assignee: Bertrand Delacretaz
>            Priority: Trivial
>         Attachments: A-semicolon.patch, B-nullboolean.patch, C-unusedimports.patch, D-unusedlocalvariables.patch, E-returntovoid.patch, F-dynamicKeyInVariable.patch, G-unusedprivatemethods.patch
>
>
> After skimming the "framework" sub-project I created a set of patches to the source code of various categories.
>   A) Missing semicolons in the code
>   B) Changed implict casting from object to boolean to a explicit != null
>   C) Removed unused imports
>   D) Removed local variables that are unused and arguments of private functions that are unused
>   E) Removed return statement in functions with : void signature
>   F) Changed variables named "dynamic" to a name that is not same as a keyword
>   G) Removed unused private methods

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FLEX-19) Code style improvements in framework

Posted by "Martin Heidegger (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FLEX-19?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Heidegger updated FLEX-19:
---------------------------------

    Attachment: G-unusedprivatemethods.patch
                F-dynamicKeyInVariable.patch
                E-returntovoid.patch
                D-unusedlocalvariables.patch
                C-unusedimports.patch
                B-nullboolean.patch
                A-semicolon.patch

Patch files
                
> Code style improvements in framework
> ------------------------------------
>
>                 Key: FLEX-19
>                 URL: https://issues.apache.org/jira/browse/FLEX-19
>             Project: Apache Flex
>          Issue Type: Improvement
>            Reporter: Martin Heidegger
>            Assignee: Bertrand Delacretaz
>            Priority: Trivial
>         Attachments: A-semicolon.patch, B-nullboolean.patch, C-unusedimports.patch, D-unusedlocalvariables.patch, E-returntovoid.patch, F-dynamicKeyInVariable.patch, G-unusedprivatemethods.patch
>
>
> After skimming the "framework" sub-project I created a set of patches to the source code of various categories.
>   A) Missing semicolons in the code
>   B) Changed implict casting from object to boolean to a explicit != null
>   C) Removed unused imports
>   D) Removed local variables that are unused and arguments of private functions that are unused
>   E) Removed return statement in functions with : void signature
>   F) Changed variables named "dynamic" to a name that is not same as a keyword
>   G) Removed unused private methods

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (FLEX-19) Code style improvements in framework

Posted by "Martin Heidegger (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216376#comment-13216376 ] 

Martin Heidegger edited comment on FLEX-19 at 2/25/12 8:41 AM:
---------------------------------------------------------------

There were empty spaces after the ";". Slipped into the patch. I apologize. Is that a problem?
                
      was (Author: martin.heidegger):
    There were empty spaces after the ";".
                  
> Code style improvements in framework
> ------------------------------------
>
>                 Key: FLEX-19
>                 URL: https://issues.apache.org/jira/browse/FLEX-19
>             Project: Apache Flex
>          Issue Type: Improvement
>            Reporter: Martin Heidegger
>            Assignee: Bertrand Delacretaz
>            Priority: Trivial
>         Attachments: A-semicolon.patch, B-nullboolean.patch, C-unusedimports.patch, D-unusedlocalvariables.patch, E-returntovoid.patch, F-dynamicKeyInVariable.patch, G-unusedprivatemethods.patch
>
>
> After skimming the "framework" sub-project I created a set of patches to the source code of various categories.
>   A) Missing semicolons in the code
>   B) Changed implict casting from object to boolean to a explicit != null
>   C) Removed unused imports
>   D) Removed local variables that are unused and arguments of private functions that are unused
>   E) Removed return statement in functions with : void signature
>   F) Changed variables named "dynamic" to a name that is not same as a keyword
>   G) Removed unused private methods

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Commented] (FLEX-19) Code style improvements in framework

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

So isn't that a FDT bug? :-) Do you know if there's any performance implications to that change being in binding utils it might have an effect. (I'm unaware of anything but we do need to take care with changes like that).

Thanks,
Justin

[jira] [Commented] (FLEX-19) Code style improvements in framework

Posted by "Martin Heidegger (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216664#comment-13216664 ] 

Martin Heidegger commented on FLEX-19:
--------------------------------------

FDT has a bug: it breaks if you write @dynamic like that. Makes it hard to edit code like this.
                
> Code style improvements in framework
> ------------------------------------
>
>                 Key: FLEX-19
>                 URL: https://issues.apache.org/jira/browse/FLEX-19
>             Project: Apache Flex
>          Issue Type: Improvement
>            Reporter: Martin Heidegger
>            Assignee: Bertrand Delacretaz
>            Priority: Trivial
>         Attachments: A-semicolon.patch, B-nullboolean.patch, C-unusedimports.patch, D-unusedlocalvariables.patch, E-returntovoid.patch, F-dynamicKeyInVariable.patch, G-unusedprivatemethods.patch
>
>
> After skimming the "framework" sub-project I created a set of patches to the source code of various categories.
>   A) Missing semicolons in the code
>   B) Changed implict casting from object to boolean to a explicit != null
>   C) Removed unused imports
>   D) Removed local variables that are unused and arguments of private functions that are unused
>   E) Removed return statement in functions with : void signature
>   F) Changed variables named "dynamic" to a name that is not same as a keyword
>   G) Removed unused private methods

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-19) Code style improvements in framework

Posted by "Justin Mclean (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216555#comment-13216555 ] 

Justin Mclean commented on FLEX-19:
-----------------------------------

As typeDescription is XML what's the reason for this change? Just that dynamic is a keyword in AS?
-				if (!typeDescription.@dynamic)
+				if (!typeDescription['@dynamic'])




                
> Code style improvements in framework
> ------------------------------------
>
>                 Key: FLEX-19
>                 URL: https://issues.apache.org/jira/browse/FLEX-19
>             Project: Apache Flex
>          Issue Type: Improvement
>            Reporter: Martin Heidegger
>            Assignee: Bertrand Delacretaz
>            Priority: Trivial
>         Attachments: A-semicolon.patch, B-nullboolean.patch, C-unusedimports.patch, D-unusedlocalvariables.patch, E-returntovoid.patch, F-dynamicKeyInVariable.patch, G-unusedprivatemethods.patch
>
>
> After skimming the "framework" sub-project I created a set of patches to the source code of various categories.
>   A) Missing semicolons in the code
>   B) Changed implict casting from object to boolean to a explicit != null
>   C) Removed unused imports
>   D) Removed local variables that are unused and arguments of private functions that are unused
>   E) Removed return statement in functions with : void signature
>   F) Changed variables named "dynamic" to a name that is not same as a keyword
>   G) Removed unused private methods

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-19) Code style improvements in framework

Posted by "Alex Harui (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216367#comment-13216367 ] 

Alex Harui commented on FLEX-19:
--------------------------------

I took a quick look at D (unused locals).  Most of it looks good, but I don't understand the few places where for backward compatibility there is what looks like a useless statement just to make sure a property gets read.  Won't someone else someday follow up with patch H that removes what seems to be useless code and just take those out anyway?
                
> Code style improvements in framework
> ------------------------------------
>
>                 Key: FLEX-19
>                 URL: https://issues.apache.org/jira/browse/FLEX-19
>             Project: Apache Flex
>          Issue Type: Improvement
>            Reporter: Martin Heidegger
>            Assignee: Bertrand Delacretaz
>            Priority: Trivial
>         Attachments: A-semicolon.patch, B-nullboolean.patch, C-unusedimports.patch, D-unusedlocalvariables.patch, E-returntovoid.patch, F-dynamicKeyInVariable.patch, G-unusedprivatemethods.patch
>
>
> After skimming the "framework" sub-project I created a set of patches to the source code of various categories.
>   A) Missing semicolons in the code
>   B) Changed implict casting from object to boolean to a explicit != null
>   C) Removed unused imports
>   D) Removed local variables that are unused and arguments of private functions that are unused
>   E) Removed return statement in functions with : void signature
>   F) Changed variables named "dynamic" to a name that is not same as a keyword
>   G) Removed unused private methods

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-19) Code style improvements in framework

Posted by "Martin Heidegger (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216374#comment-13216374 ] 

Martin Heidegger commented on FLEX-19:
--------------------------------------

I am not sure how to answer: If someone in the future wants to create incompatibilities by changing code then that is either by accident or by decision. To prevent accident I added a comment, not much else possible to do?!
                
> Code style improvements in framework
> ------------------------------------
>
>                 Key: FLEX-19
>                 URL: https://issues.apache.org/jira/browse/FLEX-19
>             Project: Apache Flex
>          Issue Type: Improvement
>            Reporter: Martin Heidegger
>            Assignee: Bertrand Delacretaz
>            Priority: Trivial
>         Attachments: A-semicolon.patch, B-nullboolean.patch, C-unusedimports.patch, D-unusedlocalvariables.patch, E-returntovoid.patch, F-dynamicKeyInVariable.patch, G-unusedprivatemethods.patch
>
>
> After skimming the "framework" sub-project I created a set of patches to the source code of various categories.
>   A) Missing semicolons in the code
>   B) Changed implict casting from object to boolean to a explicit != null
>   C) Removed unused imports
>   D) Removed local variables that are unused and arguments of private functions that are unused
>   E) Removed return statement in functions with : void signature
>   F) Changed variables named "dynamic" to a name that is not same as a keyword
>   G) Removed unused private methods

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira