This repository was archived by the owner on Dec 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
core_native/java/com/google/census
core/java/com/google/census Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1313
1414package com .google .census ;
1515
16+ import java .lang .reflect .InvocationTargetException ;
17+
1618/**
1719 * Census-specific service provider mechanism.
1820 *
@@ -40,14 +42,20 @@ class Provider<T> {
4042 T newInstance () {
4143 try {
4244 if (provider != null ) {
43- return (T ) provider .newInstance ();
45+ return (T ) provider .getConstructor (). newInstance ();
4446 }
4547 } catch (InstantiationException e ) {
4648 // TODO(dpo): decide what to do here - log, crash, or both.
4749 System .err .println (e );
4850 } catch (IllegalAccessException e ) {
4951 // TODO(dpo): decide what to do here - log, crash, or both.
5052 System .err .println (e );
53+ } catch (NoSuchMethodException e ) {
54+ // TODO(dpo): decide what to do here - log, crash, or both.
55+ System .err .println (e );
56+ } catch (InvocationTargetException e ) {
57+ // TODO(dpo): decide what to do here - log, crash, or both.
58+ System .err .println (e );
5159 }
5260 return null ;
5361 }
Original file line number Diff line number Diff line change 2121final class CensusContextFactoryImpl extends CensusContextFactory {
2222 static final CensusContextImpl DEFAULT = new CensusContextImpl (new HashMap <String , String >(0 ));
2323
24+ public CensusContextFactoryImpl () {}
25+
2426 /**
2527 * Deserializes a {@link CensusContextImpl} from a serialized {@code CensusContextProto}.
2628 *
You can’t perform that action at this time.
0 commit comments