title: How to handle a static final field initializer that throws checked exception
body: <p>I am facing a use case where I would like to declare a <code>static final</code>field with an initializer statement that is declared to throw a checked exception. Typically, it'd look like this:</p>
  <pre class="lang-java prettyprint-override"><code>public static final ObjectName OBJECT_NAME = new ObjectName(&quot;foo:type=bar&quot;);
  </code></pre>
  <p>The issue I have here is that the <code>ObjectName</code> constructor may throw various checked exceptions, which I don't care about (because I'd know my name is valid, and it's allright if it miserably crashes in case it's not). The java compiler won't let me just ignore this (as it's a checked exception), and I would prefer not to resort to:</p>
  <pre class="lang-java prettyprint-override"><code>public static final ObjectName OBJECT_NAME;
  static {
      try {
          OBJECT_NAME = new ObjectName(&quot;foo:type=bar&quot;);
      } catch (final Exception ex) {
          throw new RuntimeException(&quot;Failed to create ObjectName instance in static block.&quot;, ex);
      }
  }
  </code></pre>
  <p>Because static blocks are really, really difficult to read. Does anyone have a suggestion on how to handle this case in a nice, clean way?</p>