1. Список говнокодов пользователя vraptor

    Всего: 1

  2. Java / Говнокод #6089

    +78

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    public Boolean isEqual(RepJoinCondition targetJoin )
    	{
    		if (targetJoin == null) return false;
    
    		Boolean isLeftSideEqual ;
    		Boolean isRightSideEqual ;
    					
    		isLeftSideEqual = ((this.leftJoinFiled.fieldTableName.toUpperCase() == targetJoin.leftJoinFiled.fieldTableName.toUpperCase()) &&
    							(this.leftJoinFiled.fieldName.toUpperCase() == targetJoin.leftJoinFiled.fieldName.toUpperCase()));
    							
    		isRightSideEqual = 	((this.rightJoinFiled.fieldTableName.toUpperCase() == targetJoin.rightJoinFiled.fieldTableName.toUpperCase()) &&
    							(this.rightJoinFiled.fieldName.toUpperCase() == targetJoin.rightJoinFiled.fieldName.toUpperCase()));
    							
    		if (isLeftSideEqual && isRightSideEqual) return true;
    		
    		isLeftSideEqual = ((this.leftJoinFiled.fieldTableName.toUpperCase() == targetJoin.rightJoinFiled.fieldTableName.toUpperCase()) &&
    							(this.leftJoinFiled.fieldName.toUpperCase() == targetJoin.rightJoinFiled.fieldName.toUpperCase()));
    							
    		isRightSideEqual = 	((this.rightJoinFiled.fieldTableName.toUpperCase() == targetJoin.leftJoinFiled.fieldTableName.toUpperCase()) &&
    							(this.rightJoinFiled.fieldName.toUpperCase() == targetJoin.leftJoinFiled.fieldName.toUpperCase())); 					
    		
    		if (isLeftSideEqual && isRightSideEqual) return true;					
    		
    		return false;
    	}

    Весьма сложнная проверка равенства, изпользуется некорректно ==

    vraptor, 25 Марта 2011

    Комментарии (3)