FindBugs String concatenation in loop

View: New views
1 Messages — Rating Filter:   Alert me  

FindBugs String concatenation in loop

by lg3d :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I ran a small program on FindBugs. i am doing a string concatenation in  a loop. I thought findbugs might throw a warning but it didnt.
Please help me to analyze it further, why it didn't throw.



Code. is

public class FindBugsTest {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
       
       
        String name="test";
           
            for(int i=0; i < 1000; i++)
                    name = name + name;
    }

}

Thanks
Imran
[Message sent by forum member 'imran84' (imran84)]

http://forums.java.net/jive/thread.jspa?messageID=351324

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...