Package ca.szc.configparser.exceptions

Examples of ca.szc.configparser.exceptions.InvalidLine


                        {
                            currOptionName = optionMatcher.group("option");
                            String optionValue = optionMatcher.group("value");
                            if (currOptionName == null || currOptionName.length() == 0)
                            {
                                parsingErrors.add(new InvalidLine(lineNo, line));
                            }
                            currOptionName = StringUtil.rstrip(currOptionName).toLowerCase();
                            if (!allowDuplicates && unjoinedSections.get(currSectionName).containsKey(currOptionName))
                            {
                                parsingErrors.add(new DuplicateOptionError(lineNo, currSectionName, currOptionName));
                            }
                            else
                            {
                                LinkedList<String> valueList = new LinkedList<>();
                                if (optionValue != null)
                                {
                                    optionValue = StringUtil.rstrip(optionValue);
                                    valueList.add(optionValue);
                                }
                                currSection.put(currOptionName, valueList);
                            }
                        }
                        else
                        {
                            parsingErrors.add(new InvalidLine(lineNo, line));
                        }
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of ca.szc.configparser.exceptions.InvalidLine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.