db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6299) Improve the code coverage of Org.apache.derby.iapi.services.sanity package
Date Sat, 17 Aug 2013 00:25:48 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13742751#comment-13742751

ASF subversion and git services commented on DERBY-6299:

Commit 1514927 from [~bryanpendleton] in branch 'code/trunk'
[ https://svn.apache.org/r1514927 ]

DERBY-6299: Improve code coverage of org.apache.derby.iapi.services.sanity

This patch was contributed by Ahsan Shamsudeen (ahsan dot competition at gmail dot com)

This patch removes the classes SanityManager and AssertFailure from the
org.apache.derby.iapi.services.sanity package, replacing all uses of those
classes with references to the same-named classes in the
org.apache.derby.shared.common.sanity package.

This change is a follow-on to DERBY-1115, which moved the body of these
classes to the new location, but left the old classes around as wrappers.

Removing the wrapper classes simplifies the code, but is not intended to have
any other effect. There are no known bugs fixed by these changes, although
as pointed out during review, there may be behavior changes as a result of
this change. For example, code which specifies

	if (re instanceof AssertFailure)

may have different behavior now, since it is testing for an instance of the
underlying type, not an instance of the wrapper type.

This change affects a large set of files, but the change itself is quite simple.

Each of the files has a diff roughly like:

-import org.apache.derby.iapi.services.sanity.SanityManager;
+import org.apache.derby.shared.common.sanity.SanityManager;
In addition to modifying the import statement in all such .java files, we are
also deleting the two files

D       java\engine\org\apache\derby\iapi\services\sanity\AssertFailure.java
D       java\engine\org\apache\derby\iapi\services\sanity\SanityManager.java

These two files, left over from DERBY-1115, are trivial wrappers around the
same-named classes in o.a.d.shared.common.sanity package.

So all we're doing, then, is following up on DERBY-1115 by fixing the import
statements and removing the two wrapper classes.

So it's a big change, but conceptually quite simple.
> Improve the code coverage of  Org.apache.derby.iapi.services.sanity  package
> ----------------------------------------------------------------------------
>                 Key: DERBY-6299
>                 URL: https://issues.apache.org/jira/browse/DERBY-6299
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: ahsan shamsudeen
>            Assignee: ahsan shamsudeen
>            Priority: Minor
>         Attachments: bryan.patch, commit-2.patch, commit.patch, commit.stat, DERBY-6299.patch,
DERBY-6299.patch, DERBY-6299.patch
> According to the coverage reports, All classes in  Org.apache.derby.iapi.services.sanity
 have completely zero coverage.
> So this sub-task is to improve code coverage by doing the  following.
> 1)Change all the import statements in the code to reference the new location of SanityManager
>    AssertFailure
> 2) Delete the wrapper classes org.apache.derby.iapi.services.sanity.SanityManager
>    org.apache.derby.iapi.services.sanity.AssertFailure

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

View raw message