You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2008/07/25 12:07:28 UTC

DO NOT REPLY [Bug 45482] New: Source contains unused variables

https://issues.apache.org/bugzilla/show_bug.cgi?id=45482

           Summary: Source contains unused variables
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Other
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: thorbjoern@gmail.com


There are several places where there are unused variables flagged by the
eclipse compiler.

The attached patch removes these with their assignments (except where I was
unable to determine if there was subtle side effects).


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 45482] Source contains unused variables

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45482


Curt Arnold <ca...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEEDINFO




--- Comment #5 from Curt Arnold <ca...@apache.org>  2008-08-05 10:57:03 PST ---
Comment #1 was intended for bug 45481.  I was traveling and confused the two
similarly titled bugs. 

I'm marking this as NEEDINFO since there is no patch attached and the unused
variables are not identified.  Even if a variable is unused, it can not be
removed unless it is either a private member variable or within a method.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 45482] Source contains unused variables

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45482


Curt Arnold <ca...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




--- Comment #1 from Curt Arnold <ca...@apache.org>  2008-07-28 23:44:03 PST ---
The patch touches a lot of files that did not have extra imports.  Quite a few
files only differed in whitespace or import order.  Would prefer that only
files with extra imports were touched by patches for this bug.  Unclear which
files actually did have extra imports.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 45482] Source contains unused variables

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45482





--- Comment #3 from Curt Arnold <ca...@apache.org>  2008-07-29 06:30:14 PST ---
Are the variable method scope or private?  If the unused variables are
protected, package or public they can't be removed with potentially breaking
compatibilty. 


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 45482] Source contains unused variables

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45482


Thorbjørn Ravn Andersen <th...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 45482] Source contains unused variables

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45482





--- Comment #2 from Thorbjørn Ravn Andersen <th...@gmail.com>  2008-07-29 06:01:23 PST ---
(In reply to comment #1)
> The patch touches a lot of files that did not have extra imports.  Quite a few
> files only differed in whitespace or import order.  Would prefer that only
> files with extra imports were touched by patches for this bug.  Unclear which
> files actually did have extra imports.

This bug is about unused variables, not imports.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 45482] Source contains unused variables

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45482





--- Comment #4 from Thorbjørn Ravn Andersen <th...@gmail.com>  2008-07-29 06:45:25 PST ---
(In reply to comment #3)
> Are the variable method scope or private?  If the unused variables are
> protected, package or public they can't be removed with potentially breaking
> compatibilty. 

I have only looked at those that Eclipse 3.4 gave a warning for as being
unused, which usually is only private or locals.  If the value assigned to it,
looked to have side effects I kept those.

(I got the source in Eclipse by checking it out in Eclipse with the subclipse
plugin, close the project, run "mvn eclipse:eclipse", and reopen the project).


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org