title: Are there dangers in making an existing Java interface functional?
body: <p>As a rule, in the context of a large project, is it considered safe to take make an existing, ubiquitously used interface into a functional interface?</p>
  
  <p>E.g., given an existing interface and class:</p>
  
  <pre><code>public interface Interface {
      public double calculateSomething(double x);
      public void doSomething();
  }
  </code></pre>
  
  <p>which is implemented by</p>
  
  <pre><code>class InterfaceImplementer implements Interface {
  
       public double calculateSomething(double x) {
            return 2 * x;
       }
  
       public void doSomething() {
           // insert specific behavior here
       } 
  }
  </code></pre>
  
  <p>can I safely change the interface by defining all but one method as default:</p>
  
  <pre><code>public interface Interface {
      public double calculateSomething(double x);
  
      default void doSomething() {
           // insert some default behavior here
      }
  }
  </code></pre>
  
  <p>So that I can go from defining an object as</p>
  
  <pre><code>Interface object = new InterfaceImplementer() {
  
      @Override
      public double calculateSomething(double x) {
          return 2 * x;
      }
  };
  </code></pre>
  
  <p>to</p>
  
  <pre><code>Interface object = (x) -&gt; 2 * x;
  </code></pre>
  
  <p>while still being able to define objects in the old, tedious way.</p>
  
  <p>From what I can tell, this runs no risk of upsetting any existing code, and I've made such a change to a large project and had no runtime or compile errors.  But I want some confirmation whether this matches up with common knowledge and best practices.</p>