ComplexityOverflow.java :  » Code-Analyzer » checkstyle-5.1 » com » puppycrawl » tools » checkstyle » Java Open Source

Java Open Source » Code Analyzer » checkstyle 5.1 
checkstyle 5.1 » com » puppycrawl » tools » checkstyle » ComplexityOverflow.java
package com.puppycrawl.tools.checkstyle;

/**
 * This class has methods that have an NPath complexity larger than MAXINT.
 * Test case for bug 1654769.  
 */
public class ComplexityOverflow {

    public void provokeNpathIntegerOverflow()
    {
        if (true) {
            if (true) {
                if (true) {
                    if (true) {
                        if (true) {
                            if (true) {
                                if (true) {
                                    if (true) {
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        if (true) {
            if (true) {
                if (true) {
                    if (true) {
                        if (true) {
                            if (true) {
                                if (true) {
                                    if (true) {
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        if (true) {
            if (true) {
                if (true) {
                    if (true) {
                        if (true) {
                            if (true) {
                                if (true) {
                                    if (true) {
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        if (true) {
            if (true) {
                if (true) {
                    if (true) {
                        if (true) {
                            if (true) {
                                if (true) {
                                    if (true) {
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        if (true) {
            if (true) {
                if (true) {
                    if (true) {
                        if (true) {
                            if (true) {
                                if (true) {
                                    if (true) {
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        if (true) {
            if (true) {
                if (true) {
                    if (true) {
                        if (true) {
                            if (true) {
                                if (true) {
                                    if (true) {
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        if (true) {
            if (true) {
                if (true) {
                    if (true) {
                        if (true) {
                            if (true) {
                                if (true) {
                                    if (true) {
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        if (true) {
            if (true) {
                if (true) {
                    if (true) {
                        if (true) {
                            if (true) {
                                if (true) {
                                    if (true) {
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        if (true) {
            if (true) {
                if (true) {
                    if (true) {
                        if (true) {
                            if (true) {
                                if (true) {
                                    if (true) {
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        if (true) {
            if (true) {
                if (true) {
                    if (true) {
                        if (true) {
                            if (true) {
                                if (true) {
                                    if (true) {
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.