src/main/java/com/atlassian/uwc/ui/ConverterEngine_v2.java [890:928]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected int getAsBytes(String maxString) {
    	String maxRegex = "^(\\d+)(\\D)";
    	if (maxString == null || "".equals(maxString)) 
    		return -1;
    	
    	int power, num = 0;
    	String numString, unitString = null;
    	if (Pattern.matches("^\\d+$", maxString)) {
    		unitString = "B";
    		numString = maxString;
    	}
    	else {
	    	numString = maxString.replaceFirst(maxRegex, "$1");
	    	unitString = maxString.replaceFirst(maxRegex, "$2");
    	}
    	try {
    	num = Integer.parseInt(numString);
    	} catch (NumberFormatException e) {
    		String message = PROP_ATTACHMENT_SIZE_MAX + " setting is malformed.\n" +
    				"Setting must be formatted like so: [number][unit], where unit is\n" +
    				"one of the following: B, K, M, G. No max attachment size set.";
    		log.error(message);
    		return -1;
    	}
    	unitString = unitString.toUpperCase();
    	char unit = unitString.toCharArray()[0]; //first char in that string
		
    	switch (unit) {
			case ('B'): power = 0;break;
			case ('K'): power = 1;break;
			case ('M'): power = 2;break;
			case ('G'): power = 3;break;
			default: return -1;
		}
		
		int multiplier = (int) Math.pow(1024, power);
		int value = num * multiplier;
		return value;
	}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/com/atlassian/uwc/ui/ConverterEngine.java [2491:2529]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	protected int getAsBytes(String maxString) {
		String maxRegex = "^(\\d+)(\\D)";
		if (maxString == null || "".equals(maxString)) 
			return -1;

		int power, num = 0;
		String numString, unitString = null;
		if (Pattern.matches("^\\d+$", maxString)) {
			unitString = "B";
			numString = maxString;
		}
		else {
			numString = maxString.replaceFirst(maxRegex, "$1");
			unitString = maxString.replaceFirst(maxRegex, "$2");
		}
		try {
			num = Integer.parseInt(numString);
		} catch (NumberFormatException e) {
			String message = PROP_ATTACHMENT_SIZE_MAX + " setting is malformed.\n" +
					"Setting must be formatted like so: [number][unit], where unit is\n" +
					"one of the following: B, K, M, G. No max attachment size set.";
			log.error(message);
			return -1;
		}
		unitString = unitString.toUpperCase();
		char unit = unitString.toCharArray()[0]; //first char in that string

		switch (unit) {
		case ('B'): power = 0;break;
		case ('K'): power = 1;break;
		case ('M'): power = 2;break;
		case ('G'): power = 3;break;
		default: return -1;
		}

		int multiplier = (int) Math.pow(1024, power);
		int value = num * multiplier;
		return value;
	}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



