Fix runtime builder string duplication
[mdsal.git] / binding / mdsal-binding-generator-util / src / main / java / org / opendaylight / mdsal / binding / model / util / generated / type / builder / RuntimeGeneratedTOBuilder.java
index 8701014b7c901ef013103892bfeb44c98cba9c97..82792c847a2ed2dd4292c878396472c03cd684a0 100644 (file)
@@ -67,32 +67,36 @@ public final class RuntimeGeneratedTOBuilder extends AbstractGeneratedTOBuilder
 
         @Override
         public Restrictions getRestrictions() {
-            throw new UnsupportedOperationException("Not available at runtime");
+            throw unsupported();
         }
 
         @Override
         public GeneratedProperty getSUID() {
-            throw new UnsupportedOperationException("Not available at runtime");
+            throw unsupported();
         }
 
         @Override
         public String getDescription() {
-            throw new UnsupportedOperationException("Not available at runtime");
+            throw unsupported();
         }
 
         @Override
         public String getReference() {
-            throw new UnsupportedOperationException("Not available at runtime");
+            throw unsupported();
         }
 
         @Override
         public Iterable<QName> getSchemaPath() {
-            throw new UnsupportedOperationException("Not available at runtime");
+            throw unsupported();
         }
 
         @Override
         public String getModuleName() {
-            throw new UnsupportedOperationException("Not available at runtime");
+            throw unsupported();
+        }
+
+        private static UnsupportedOperationException unsupported() {
+            return new UnsupportedOperationException("Not available at runtime");
         }
     }
 }