You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Bruno P. Kinoshita (Created) (JIRA)" <ji...@apache.org> on 2011/10/24 14:59:32 UTC

[jira] [Created] (FUNCTOR-3) Reduce the use of raw types in the test classes

Reduce the use of raw types in the test classes
-----------------------------------------------

                 Key: FUNCTOR-3
                 URL: https://issues.apache.org/jira/browse/FUNCTOR-3
             Project: Commons Functor
          Issue Type: Task
            Reporter: Bruno P. Kinoshita
            Priority: Minor


The test classes in functor have several raw types, which could lead to runtime errors and make the tests harder to understand. 

It was pointed by sebb in the mailing list during a call for votes to release functor 1.0.

--
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] (FUNCTOR-3) Reduce the use of raw types in the test classes

Posted by "Bruno P. Kinoshita (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FUNCTOR-3?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13418637#comment-13418637 ] 

Bruno P. Kinoshita commented on FUNCTOR-3:
------------------------------------------

The patch attached was applied manually in r1363514, as parts of the code have changed since this issue was initially created.

URL: http://svn.apache.org/viewvc?rev=1363514&view=rev
Log:
[FUNCTOR-3] Reduced the use of raw types in test classes by adding generics
where needed. In some cases, specially when using arrays with generics, the
warnings were suppressed. 

This commit also fixed some warnings in Eclipse. In
TestAbstractLoopProcedure.MockLoopProcedure class, only the serialVersionUID was
included, removing a warning. And in TestLazyMap#testBaseMapOverrides, instead
of using a pair <String, String>, the test was updated to use a <String,
Integer>. Although the data used in the tests is different, the behavior is
still the same. And in TestIsWithinRange, one unused import was removed.

All tests passed locally, no CPD, PMD or CheckStyle problems found.

Modified:
    commons/proper/functor/trunk/src/changes/changes.xml
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/TestAlgorithms.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/collection/TestFilteredIterator.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/collection/TestIsElementOf.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/comparator/TestComparatorFunction.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/comparator/TestIsWithinRange.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestAbstractLoopProcedure.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestBinaryAnd.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestBinaryCompositeBinaryFunction.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestBinaryOr.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestBinarySequence.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryPredicate.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryProcedure.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestSequence.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryAnd.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryOr.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/FlexiMapExample.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/QuicksortExample.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/kata/two/BaseBinaryChop.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/kata/two/BinaryChop.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/kata/two/EiffelStyleLoop.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/kata/two/TestBinaryChop.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/lines/Lines.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/lines/TestLines.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/map/FixedSizeMap.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/map/FunctoredMap.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/map/LazyMap.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/map/PredicatedMap.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/map/TestFixedSizeMap.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/map/TestLazyMap.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/map/TestPredicatedMap.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/TestBaseGenerator.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/TestIteratorToGeneratorAdapter.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/util/TestEachElement.java
                
> Reduce the use of raw types in the test classes
> -----------------------------------------------
>
>                 Key: FUNCTOR-3
>                 URL: https://issues.apache.org/jira/browse/FUNCTOR-3
>             Project: Commons Functor
>          Issue Type: Task
>            Reporter: Bruno P. Kinoshita
>            Priority: Minor
>         Attachments: FUNCTOR-3.patch
>
>
> The test classes in functor have several raw types, which could lead to runtime errors and make the tests harder to understand. 
> It was pointed by sebb in the mailing list during a call for votes to release functor 1.0.

--
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] [Resolved] (FUNCTOR-3) Reduce the use of raw types in the test classes

Posted by "Bruno P. Kinoshita (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FUNCTOR-3?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruno P. Kinoshita resolved FUNCTOR-3.
--------------------------------------

    Resolution: Fixed
      Assignee: Bruno P. Kinoshita

Fixed in r1363514.
                
> Reduce the use of raw types in the test classes
> -----------------------------------------------
>
>                 Key: FUNCTOR-3
>                 URL: https://issues.apache.org/jira/browse/FUNCTOR-3
>             Project: Commons Functor
>          Issue Type: Task
>            Reporter: Bruno P. Kinoshita
>            Assignee: Bruno P. Kinoshita
>            Priority: Minor
>         Attachments: FUNCTOR-3.patch
>
>
> The test classes in functor have several raw types, which could lead to runtime errors and make the tests harder to understand. 
> It was pointed by sebb in the mailing list during a call for votes to release functor 1.0.

--
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] (FUNCTOR-3) Reduce the use of raw types in the test classes

Posted by "Bruno P. Kinoshita (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FUNCTOR-3?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruno P. Kinoshita updated FUNCTOR-3:
-------------------------------------

    Attachment: FUNCTOR-3.patch

Attached you will find a patch for this issue. 

There were "rawtypes" suppression annotations in classes (not test classes) that were removed.

There may have better ways of dealing with generics rather than the way I implemented. Could somebody with karma and more skill than me review it, please? :-) Perhaps it could be used as a base for this issue.

Thank you!
Bruno P. Kinoshita
                
> Reduce the use of raw types in the test classes
> -----------------------------------------------
>
>                 Key: FUNCTOR-3
>                 URL: https://issues.apache.org/jira/browse/FUNCTOR-3
>             Project: Commons Functor
>          Issue Type: Task
>            Reporter: Bruno P. Kinoshita
>            Priority: Minor
>         Attachments: FUNCTOR-3.patch
>
>
> The test classes in functor have several raw types, which could lead to runtime errors and make the tests harder to understand. 
> It was pointed by sebb in the mailing list during a call for votes to release functor 1.0.

--
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