Skip to content

Commit

Permalink
Remove calls to Throwables.propagate (deprecated in Guava-20 and higher)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianhyde committed Feb 23, 2018
1 parent 9ee4eda commit 37a83b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.type.CollectionType;
import com.google.common.base.Preconditions;
import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;

Expand Down Expand Up @@ -345,7 +344,7 @@ private void parseFieldForName(List<String> fieldNames, List<ColumnMetaData.Rep>
synchronized (UTC_TIMESTAMP_FORMAT) {
// synchronized block to avoid race condition
try {
//First try to pars as Timestamp with timezone.
// First try to parse as Timestamp with timezone.
rowBuilder
.set(fieldPos, UTC_TIMESTAMP_FORMAT.parse(parser.getText()).getTime());
} catch (ParseException e) {
Expand All @@ -355,7 +354,7 @@ private void parseFieldForName(List<String> fieldNames, List<ColumnMetaData.Rep>
.set(fieldPos, TIMESTAMP_FORMAT.parse(parser.getText()).getTime());
} catch (ParseException e2) {
// unknown format should not happen
Throwables.propagate(e2);
throw new RuntimeException(e2);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
import com.google.common.base.Strings;
import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;
Expand Down Expand Up @@ -1212,7 +1211,7 @@ private String planAsTimeSeries(List<DimensionSpec> groupByKeyDims, DruidJsonFil
generator.writeEndObject();
generator.close();
} catch (IOException e) {
Throwables.propagate(e);
throw new RuntimeException(e);
}
return sw.toString();
}
Expand Down Expand Up @@ -1259,7 +1258,7 @@ private String planAsTopN(List<DimensionSpec> groupByKeyDims, DruidJsonFilter js
generator.writeEndObject();
generator.close();
} catch (IOException e) {
Throwables.propagate(e);
throw new RuntimeException(e);
}
return sw.toString();
}
Expand Down Expand Up @@ -1291,7 +1290,7 @@ private String planAsGroupBy(List<DimensionSpec> groupByKeyDims, DruidJsonFilter
generator.writeEndObject();
generator.close();
} catch (IOException e) {
Throwables.propagate(e);
throw new RuntimeException(e);
}
return sw.toString();
}
Expand Down Expand Up @@ -1346,7 +1345,7 @@ public String toQuery() {
generator.writeEndObject();
generator.close();
} catch (IOException e) {
Throwables.propagate(e);
throw new RuntimeException(e);
}
return sw.toString();
}
Expand Down

0 comments on commit 37a83b1

Please sign in to comment.