Examples of InvalidSyntaxException


Examples of org.osgi.framework.InvalidSyntaxException

    protected void parse_not(FilterImpl parent) throws InvalidSyntaxException {
      skipWhiteSpace();

      if (filter[pos] != '(') {
        throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_MISSING_LEFTPAREN, String.valueOf(pos)), filterstring);
      }

      FilterImpl child = new FilterImpl();
      parse_filter(child);
View Full Code Here

Examples of org.osgi.framework.InvalidSyntaxException

            return;
          }
      }

      throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_INVALID_OPERATOR, String.valueOf(pos)), filterstring);
    }
View Full Code Here

Examples of org.osgi.framework.InvalidSyntaxException

      }

      int length = end - begin;

      if (length == 0) {
        throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_MISSING_ATTR, String.valueOf(pos)), filterstring);
      }

      return new String(filter, begin, length);
    }
View Full Code Here

Examples of org.osgi.framework.InvalidSyntaxException

              break parseloop;
            }

          case '(' :
            {
              throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_INVALID_VALUE, String.valueOf(pos)), filterstring);
            }

          case '\\' :
            {
              pos++;
              c = filter[pos];
              /* fall through into default */
            }

          default :
            {
              sb.append(c);
              pos++;
              break;
            }
        }
      }

      if (sb.length() == 0) {
        throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_MISSING_VALUE, String.valueOf(pos)), filterstring);
      }

      return sb.toString();
    }
View Full Code Here

Examples of org.osgi.framework.InvalidSyntaxException

              break parseloop;
            }

          case '(' :
            {
              throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_INVALID_VALUE, String.valueOf(pos)), filterstring);
            }

          case '*' :
            {
              if (sb.length() > 0) {
                operands.add(sb.toString());
              }

              sb.setLength(0);

              operands.add(null);
              pos++;

              break;
            }

          case '\\' :
            {
              pos++;
              c = filter[pos];
              /* fall through into default */
            }

          default :
            {
              sb.append(c);
              pos++;
              break;
            }
        }
      }

      int size = operands.size();

      if (size == 0) {
        throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_MISSING_VALUE, String.valueOf(pos)), filterstring);
      }

      if (size == 1) {
        Object single = operands.get(0);

View Full Code Here

Examples of org.osgi.framework.InvalidSyntaxException

    String filterString = content.getAttribute(FILTER);
    if (filterString != null) {
      try {
        this.filter = FrameworkUtil.createFilter(filterString);
      } catch (InvalidSyntaxException ise) {       
        throw new InvalidSyntaxException("Failed to create filter for " + service, ise.getFilter(), ise.getCause());
      }
    }
  }
View Full Code Here

Examples of org.osgi.framework.InvalidSyntaxException

                }
            }
        }
        catch (StringIndexOutOfBoundsException e)
        {
            throw new InvalidSyntaxException("Invalid escaping of value", expression);
        }

        values.add(builder.toString());

        if (values.size() == 1)
View Full Code Here

Examples of org.osgi.framework.InvalidSyntaxException

        {
            return parseFilter(new State(expression));
        }
        catch (StringIndexOutOfBoundsException e)
        {
            throw new InvalidSyntaxException("Rolled off the end of the string while parsing the expression", expression);
        }
    }
View Full Code Here

Examples of org.osgi.framework.InvalidSyntaxException

            if (state.peek() == ')') break;

            expression = parseFilter(state);
        }

        if (result.isEmpty()) throw new InvalidSyntaxException("Empty & expression", state.getExpression());

        return new And(result.toArray(new Expr[result.size()]));
    }
View Full Code Here

Examples of org.osgi.framework.InvalidSyntaxException

            if (state.peek() == ')') break;

            expression = parseFilter(state);
        }

        if (result.isEmpty()) throw new InvalidSyntaxException("Empty | expression", state.getExpression());

        return new Or(result.toArray(new Expr[result.size()]));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.