code: public Priority[] getPriorities() {
          List<Priority> actualPriorities = new ArrayList<Priority>();
          for (String priority : getAvailablePriorities()) {
              if (provider.getNumberOfAnnotations(priority) > 0) {
                  actualPriorities.add(Priority.fromString(priority));
              }
          }
          return actualPriorities.toArray(new Priority[actualPriorities.size()]);
      }
docs: Returns the actually used priorities.
  
  @return the actually used priorities.