File: prn15.java

package info (click to toggle)
cccc 1:3.1.4-4
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 3,956 kB
  • sloc: ansic: 33,244; cpp: 10,527; java: 622; makefile: 156; sh: 11
file content (76 lines) | stat: -rw-r--r-- 2,339 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// prn15.java

// This test case looks at the effect of large
// numbers of degenerate case labels.

// It is based on a sample submitted by Jordan Zimmerman
// which was apparently causing CCCC to hang.

public class Prn15
{
	public Image get_image(int image_code)
	{
		switch ( image_code )
		{
			case cc_def.IMAGE_BUTTON_SUBMIT:
			case cc_def.IMAGE_BUTTON_SIGN_IN:
			case cc_def.IMAGE_BUTTON_SEARCH:
			case cc_def.IMAGE_BUTTON_SEARCH_CATEGORIES:
			case cc_def.IMAGE_BUTTON_PREVIOUS:
			case cc_def.IMAGE_BUTTON_PREVIOUS_GRAY:
			case cc_def.IMAGE_BUTTON_NEXT:
			case cc_def.IMAGE_BUTTON_NEXT_GRAY:
			case cc_def.IMAGE_BUTTON_GO_NAV:
            case cc_def.IMAGE_BUTTON_SIGN_IN_SECURE:
			case cc_def.IMAGE_BUTTON_GO_CONTENT:
			case cc_def.IMAGE_BUTTON_OK:
			case cc_def.IMAGE_CCMOS_BUTTON_OK:
			case cc_def.IMAGE_CCMOS_BUTTON_CANCEL:
			case cc_def.IMAGE_BUTTON_CANCEL:
			case cc_def.IMAGE_BUTTON_ADD_TO_CART:
			case cc_def.IMAGE_BUTTON_SAVE_TO_REGISTRY:
			case cc_def.IMAGE_BUTTON_ADD_CREDIT_CARD:
			case cc_def.IMAGE_BUTTON_ADD_REMINDER:
			case cc_def.IMAGE_BUTTON_UPDATE_REMINDER:
			case cc_def.IMAGE_BUTTON_CANCEL_REMINDER:
			case cc_def.IMAGE_BUTTON_SUGGEST_GIFTS:
			case cc_def.IMAGE_BUTTON_CONTINUE_SHOPPING_SMALL:
			case cc_def.IMAGE_BUTTON_CREATE_REGISTRY:
			case cc_def.IMAGE_BUTTON_UPDATE_REGISTRY:
			case cc_def.IMAGE_BUTTON_DELETE_REGISTRY:
			case cc_def.IMAGE_BUTTON_CONTINUE_SECURE:
			case cc_def.IMAGE_BUTTON_SEND_EMAIL:
			case cc_def.IMAGE_BUTTON_REDEEM_COUPON:
			case cc_def.IMAGE_BUTTON_REDEEM_CERTIFICATE:
			case cc_def.IMAGE_BUTTON_SHOW_CREDIT_BALANCE:
			case cc_def.IMAGE_BUTTON_HELP:
			case cc_def.IMAGE_BUTTON_CONTINUE:
			case cc_def.IMAGE_BUTTON_BACK:
			case cc_def.IMAGE_BUTTON_SHIP_IT:
			case cc_def.IMAGE_BUTTON_SKIP_TOUR:
			case cc_def.IMAGE_BUTTON_ECARD_PERSONALIZE:
			case cc_def.IMAGE_BUTTON_ECARD_VIEW:
			case cc_def.IMAGE_BUTTON_ECARD_SEND:
			case cc_def.IMAGE_BUTTON_ENTER:
            case cc_def.IMAGE_BUTTON_ADD_ADDRESS:
			{
				try
				{
					return get_dynamic_button(image_code);
				}
				catch ( ServletException the_exception )
				{
					the_exception.printStackTrace();
					return null;
				}
			}
			
            default:
            	return null;
		}

		return null;
	}

}