Removing certain items from list I have to co-operate with third party APIs from where I get a list and I have to remove certain elements before passing it toward.
I have a working solution but I am opened for every suggestion to make it better or more reliable (assuming the third party API maybe will change a bit in the future):

public List&lt;Column&gt; remove(List&lt;Column&gt; columns){
    for(Iterator&lt;Column&gt; iterator = columns.listIterator(); iterator.hasNext();     ){ 
     Column column = iterator.next();
     try{
      switch(column.getValue()){
        case "FIRST":
        case "SECOND":
        case "THIRD":
          iterator.remove();
      }
     }catch(NullPointerException e){}
    }
    return columns;
}


Edit

Yes, it is not my production code. My production code is something like this:

private static final String FIRST = "first to remove";

private static final String SECOND = "second to remove";

private static final String THIRD = "third to remove";

...lots of code here

List&lt;Column&gt; columns = ThirdPartyLibrary.getColumns();
for(Iterator&lt;Column&gt; iterator = columns.listIterator(); iterator.hasNext();     ){ 
     Column column = iterator.next();
     try{
      switch(column.getValue()){
        case FIRST:
        case SECOND:
        case THIRD:
          iterator.remove();
      }
     }catch(NullPointerException e){}
}
working with columns


I made the try and catch methods for the case if I get a column from the third party which getValue() returns null.
What's the point of catching a NullPointerException? When do you expect it to happen?
I don't really like that this method mutates the list passed in as a parameter - and then also returns it, even though the returned value is actually redundant as the calling code already has a hold of the now modified list. You're kind of sharing the result of the operation in two ways at once, which feels redundant.

And I know it's often done that way, but I think it's bad practice nevertheless, and can lead to confusion. 

Personally I'd prefer to be more explicit about what's going on, and either a) make a deep copy of the original list, and return an independent version of it (with entries removed), without affecting the original one - or b) make this method void, like Collections.sort(). 

See command-query separation principle. Making a method look like a query can lead me to believe it's a pure function, with no side effects, whereas it actually does cause side effects, mutating the input data.
The name is very vague - "remove", remove what?
Is the blacklisted data ("FIRST", "SECOND", "THIRD") likely to ever change? In the spirit of making this code more modular I would consider extracting that list to a separate parameter. 

Single responsibility principle indicates that a method should have one clear responsibility, and one could argue that filtering out certain entries and knowing the blacklist are two responsibilities. Your mileage may vary though, depending on the cnotext - which I don't know.
Not a biggie, but whitespace is out of control (iterator.hasNext();     ), catch(NUllPointerException e){}), not to mention it's NullPointer..., not NUllPointer.
Depending on how Column class is implemented, which I can't see - if it's a light-weight object and if its equals() method would compare Column instances by their value (getValue())... then we could leverage Collections.removeAll and save ourselves writing the iterative removal by hand. 


Eg. assuming

class Column {
    private final String value;

    public Column(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    @Override
    public boolean equals(Object o) {
        // if a Column instance, compare it by value
    }

    // don't forget hashCode
}


we could just do that:

/* could be a Set actually since order doesn't matter,
 * only Set hasn't got such a convenient initializer in standard Java API */
private static final Collection&lt;Column&gt; BLACKLISTED_COLUMNS = Arrays.asList(
    new Column("FIRST"), 
    new Column("SECOND"), 
    new Column("THIRD"));


be it a constant, or a collection computed in run-time, doesn't really matter. And then it gets as simple as that:

List&lt;Column&gt; columns = // ... getting the data from wherever
columns.removeAll(BLACKLISTED_COLUMNS);


And that's it, job done. As I said, this solution may not be applicable in your case - I have no way of knowing.