polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [01/50] [abbrv] polygene-java git commit: :libraries:rest-* refine
Date Tue, 16 May 2017 18:50:53 GMT
Repository: polygene-java
Updated Branches:
  refs/heads/master a789141d5 -> 7db51ad00


:libraries:rest-* refine


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/65f0713b
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/65f0713b
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/65f0713b

Branch: refs/heads/master
Commit: 65f0713ba6bfea85c8383ce79ed67c61eb9730da
Parents: 69fa614
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Mon May 15 10:35:52 2017 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Mon May 15 10:35:52 2017 +0200

----------------------------------------------------------------------
 .../rest/client/RequestWriterDelegator.java     |  2 +-
 .../rest/client/ResponseReaderDelegator.java    |  2 +-
 .../rest/client/api/ContextResourceClient.java  |  6 ++---
 .../api/ContextResourceClientFactory.java       |  8 +++----
 .../library/rest/client/api/ErrorHandler.java   | 21 ++++-------------
 .../library/rest/client/api/HandlerCommand.java | 10 +++-----
 .../responsereader/JSONResponseReader.java      |  6 ++---
 .../library/rest/client/spi/RequestWriter.java  |  2 +-
 .../library/rest/common/table/Table.java        | 12 +++++-----
 .../library/rest/common/table/TableBuilder.java |  3 +--
 .../library/rest/common/table/TableQuery.java   | 24 ++++++++++----------
 .../library/rest/server/api/ResourceIndex.java  |  2 +-
 .../server/api/constraint/ServiceAvailable.java |  2 +-
 .../server/restlet/InteractionConstraints.java  |  4 ++--
 .../restlet/InteractionConstraintsService.java  |  4 ++--
 .../server/restlet/RequestReaderDelegator.java  |  2 +-
 .../server/restlet/ResponseWriterDelegator.java |  2 +-
 .../ResourceTemplateResponseWriter.java         |  4 ++--
 .../responsewriter/TableResponseWriter.java     |  2 +-
 .../library/rest/server/spi/CommandResult.java  |  2 +-
 20 files changed, 50 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/RequestWriterDelegator.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/RequestWriterDelegator.java
b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/RequestWriterDelegator.java
index 742628c..f7d1a0a 100644
--- a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/RequestWriterDelegator.java
+++ b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/RequestWriterDelegator.java
@@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
 public class RequestWriterDelegator
    implements RequestWriter, Initializable
 {
-   List<RequestWriter> requestWriters = new ArrayList<RequestWriter>( );
+   List<RequestWriter> requestWriters = new ArrayList<>();
 
    @Structure
    private Module module;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/ResponseReaderDelegator.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/ResponseReaderDelegator.java
b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/ResponseReaderDelegator.java
index 00df5f7..59c0866 100644
--- a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/ResponseReaderDelegator.java
+++ b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/ResponseReaderDelegator.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
 public class ResponseReaderDelegator
    implements ResponseReader, Initializable
 {
-   List<ResponseReader> responseReaders = new ArrayList<ResponseReader>( );
+   List<ResponseReader> responseReaders = new ArrayList<>();
 
    @Structure
    private Module module;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ContextResourceClient.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ContextResourceClient.java
b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ContextResourceClient.java
index ac0958c..ba59930 100644
--- a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ContextResourceClient.java
+++ b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ContextResourceClient.java
@@ -58,9 +58,9 @@ public class ContextResourceClient
     private ResponseHandler errorHandler = NullResponseHandler.INSTANCE;
     private ResponseHandler resourceHandler = NullResponseHandler.INSTANCE;
     private ResponseHandler deleteHandler = NullResponseHandler.INSTANCE;
-    private Map<String, ResponseHandler> queryHandlers = new HashMap<String, ResponseHandler>(
 );
-    private Map<String, ResponseHandler> commandHandlers = new HashMap<String, ResponseHandler>(
 );
-    private Map<String, ResponseHandler> processingErrorHandlers = new HashMap<String,
ResponseHandler>();
+    private Map<String, ResponseHandler> queryHandlers = new HashMap<>();
+    private Map<String, ResponseHandler> commandHandlers = new HashMap<>();
+    private Map<String, ResponseHandler> processingErrorHandlers = new HashMap<>();
 
     // DSL for registering rules
     public ContextResourceClient onError(ResponseHandler handler)

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ContextResourceClientFactory.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ContextResourceClientFactory.java
b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ContextResourceClientFactory.java
index 45d458b..fe6014c 100644
--- a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ContextResourceClientFactory.java
+++ b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ContextResourceClientFactory.java
@@ -87,10 +87,10 @@ public class ContextResourceClientFactory
 
     public void setAcceptedLanguages(Language... acceptedLanguages)
     {
-        List<Preference<Language>> languages = new ArrayList<Preference<Language>>();
+        List<Preference<Language>> languages = new ArrayList<>();
         for( Language acceptedLanguage : acceptedLanguages )
         {
-            languages.add( new Preference<Language>( ));
+            languages.add( new Preference<>());
         }
 
         info.setAcceptedLanguages( languages );
@@ -99,10 +99,10 @@ public class ContextResourceClientFactory
 
     public void setAcceptedMediaTypes(MediaType... acceptedMediaTypes)
     {
-        List<Preference<MediaType>> mediatypes = new ArrayList<Preference<MediaType>>();
+        List<Preference<MediaType>> mediatypes = new ArrayList<>();
         for( MediaType mediaType : acceptedMediaTypes )
         {
-            mediatypes.add( new Preference<MediaType>(mediaType) );
+            mediatypes.add( new Preference<>( mediaType ) );
         }
 
         info.setAcceptedMediaTypes( mediatypes );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ErrorHandler.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ErrorHandler.java
b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ErrorHandler.java
index a99a8f6..a6489c8 100644
--- a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ErrorHandler.java
+++ b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/ErrorHandler.java
@@ -33,25 +33,12 @@ import org.restlet.resource.ResourceException;
 public class ErrorHandler
     implements ResponseHandler
 {
-    public static Predicate<Response> AUTHENTICATION_REQUIRED = new Predicate<Response>()
-    {
-        @Override
-        public boolean test( Response item )
-        {
-            return item.getStatus().equals( Status.CLIENT_ERROR_UNAUTHORIZED );
-        }
-    };
+    public static Predicate<Response> AUTHENTICATION_REQUIRED = item ->
+        item.getStatus().equals( Status.CLIENT_ERROR_UNAUTHORIZED );
 
-    public static Predicate<Response> RECOVERABLE_ERROR = new Predicate<Response>()
-    {
-        @Override
-        public boolean test( Response item )
-        {
-            return item.getStatus().isRecoverableError();
-        }
-    };
+    public static Predicate<Response> RECOVERABLE_ERROR = item -> item.getStatus().isRecoverableError();
 
-    LinkedHashMap<Predicate<Response>, ResponseHandler> handlers = new LinkedHashMap<Predicate<Response>,
ResponseHandler>(  );
+    LinkedHashMap<Predicate<Response>, ResponseHandler> handlers = new LinkedHashMap<>();
 
     public ErrorHandler()
     {

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/HandlerCommand.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/HandlerCommand.java
b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/HandlerCommand.java
index 38d6926..8790fd8 100644
--- a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/HandlerCommand.java
+++ b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/api/HandlerCommand.java
@@ -109,14 +109,10 @@ public abstract class HandlerCommand
     public <T> HandlerCommand onProcessingError(final ResultHandler<T> resultHandler)
     {
         final Class<T> resultType = (Class<T>) Classes.RAW_CLASS.apply(( (ParameterizedType)
resultHandler.getClass().getGenericInterfaces()[ 0 ] ).getActualTypeArguments()[0]);
-        this.processingErrorHandler = new ResponseHandler()
+        this.processingErrorHandler = ( response, client ) ->
         {
-            @Override
-            public HandlerCommand handleResponse( Response response, ContextResourceClient
client )
-            {
-                T result = client.getContextResourceClientFactory().readResponse( response,
resultType );
-                return resultHandler.handleResult( result, client );
-            }
+            T result = client.getContextResourceClientFactory().readResponse( response, resultType
);
+            return resultHandler.handleResult( result, client );
         };
         return this;
     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/responsereader/JSONResponseReader.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/responsereader/JSONResponseReader.java
b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/responsereader/JSONResponseReader.java
index 2090357..71d2c14 100644
--- a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/responsereader/JSONResponseReader.java
+++ b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/responsereader/JSONResponseReader.java
@@ -72,11 +72,9 @@ public class JSONResponseReader
                 {
                     JsonObject jsonObject = reader.readObject();
                     Form form = new Form();
-                    jsonObject.entrySet().forEach(
-                        entry ->
+                    jsonObject.forEach(
+                        ( key, value ) ->
                         {
-                            String key = entry.getKey();
-                            JsonValue value = entry.getValue();
                             String valueString = value.getValueType() == JsonValue.ValueType.STRING
                                                  ? ( (JsonString) value ).getString()
                                                  : value.toString();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/spi/RequestWriter.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/spi/RequestWriter.java
b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/spi/RequestWriter.java
index 671b4f4..3433e98 100644
--- a/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/spi/RequestWriter.java
+++ b/libraries/rest-client/src/main/java/org/apache/polygene/library/rest/client/spi/RequestWriter.java
@@ -36,6 +36,6 @@ public interface RequestWriter
     * @return true if the object was written to the Request instance, false if handler can
not write the object.
     * @throws org.restlet.resource.ResourceException
     */
-   public boolean writeRequest(Object requestObject, Request request)
+   boolean writeRequest(Object requestObject, Request request)
       throws ResourceException;
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/Table.java
----------------------------------------------------------------------
diff --git a/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/Table.java
b/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/Table.java
index ea2c290..54e6137 100644
--- a/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/Table.java
+++ b/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/Table.java
@@ -34,12 +34,12 @@ import org.apache.polygene.api.value.ValueComposite;
 public interface Table
       extends ValueComposite
 {
-   public static final String STRING = "string";
-   public static final String NUMBER = "number";
-   public static final String BOOLEAN = "boolean";
-   public static final String DATE = "date";
-   public static final String DATETIME = "datetime";
-   public static final String TIME_OF_DAY = "timeofday";
+   String STRING = "string";
+   String NUMBER = "number";
+   String BOOLEAN = "boolean";
+   String DATE = "date";
+   String DATETIME = "datetime";
+   String TIME_OF_DAY = "timeofday";
 
    @UseDefaults
    Property<List<Column>> cols();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/TableBuilder.java
----------------------------------------------------------------------
diff --git a/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/TableBuilder.java
b/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/TableBuilder.java
index 9251199..5594e12 100644
--- a/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/TableBuilder.java
+++ b/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/TableBuilder.java
@@ -19,7 +19,6 @@
  */
 package org.apache.polygene.library.rest.common.table;
 
-import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
@@ -237,7 +236,7 @@ public class TableBuilder
                     comparator = reverseOrder( comparator );
                 }
 
-                Collections.sort( tableBuilder.prototype().rows().get(), comparator );
+                tableBuilder.prototype().rows().get().sort( comparator );
             }
         }
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/TableQuery.java
----------------------------------------------------------------------
diff --git a/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/TableQuery.java
b/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/TableQuery.java
index 3e7f131..fbe829b 100644
--- a/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/TableQuery.java
+++ b/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/table/TableQuery.java
@@ -41,25 +41,25 @@ public interface TableQuery
 {
    Property<String> tq();
 
-   public String select();
+   String select();
 
-   public String where();
+   String where();
 
-   public String groupBy();
+   String groupBy();
 
-   public String pivot();
+   String pivot();
 
-   public String orderBy();
+   String orderBy();
 
-   public String limit();
+   String limit();
 
-   public String offset();
+   String offset();
 
-   public String label();
+   String label();
 
-   public String options();
+   String options();
 
-   public Table applyTo(Table table);
+   Table applyTo(Table table);
 
    abstract class Mixin
            implements TableQuery
@@ -126,7 +126,7 @@ public interface TableQuery
       {
          if (parts == null)
          {
-            parts = new HashMap<String, String>();
+            parts = new HashMap<>();
 
             String value = tq().get();
             List<String> values = Arrays.asList(value.split(" "));
@@ -219,7 +219,7 @@ public interface TableQuery
                   }
                };
 
-               Collections.sort(tableBuilder.prototype().rows().get(), comparator);
+               tableBuilder.prototype().rows().get().sort( comparator );
             }
          }
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ResourceIndex.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ResourceIndex.java
b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ResourceIndex.java
index 3eafd4e..852d780 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ResourceIndex.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ResourceIndex.java
@@ -25,5 +25,5 @@ package org.apache.polygene.library.rest.server.api;
  */
 public interface ResourceIndex<T>
 {
-    public T index();
+    T index();
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/constraint/ServiceAvailable.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/constraint/ServiceAvailable.java
b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/constraint/ServiceAvailable.java
index bade00b..1bad104 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/constraint/ServiceAvailable.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/constraint/ServiceAvailable.java
@@ -37,7 +37,7 @@ public @interface ServiceAvailable
 {
     Class value();
 
-    public class ServiceAvailableConstraint
+    class ServiceAvailableConstraint
         implements InteractionConstraint<ServiceAvailable>
     {
         @Structure

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraints.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraints.java
b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraints.java
index a5a169c..7da41ed 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraints.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraints.java
@@ -30,7 +30,7 @@ import org.apache.polygene.library.rest.server.api.ObjectSelection;
  */
 public interface InteractionConstraints
 {
-    public boolean isValid( Method method, ObjectSelection objectSelection, Module module
);
+    boolean isValid( Method method, ObjectSelection objectSelection, Module module );
 
-    public boolean isValid( Class resourceClass, ObjectSelection objectSelection, Module
module );
+    boolean isValid( Class resourceClass, ObjectSelection objectSelection, Module module
);
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraintsService.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraintsService.java
b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraintsService.java
index f9686c9..b04edef 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraintsService.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/InteractionConstraintsService.java
@@ -53,8 +53,8 @@ public class InteractionConstraintsService
 
     Logger logger = LoggerFactory.getLogger( InteractionConstraintsService.class );
 
-    private Map<Method, InteractionConstraintsBinding> methodsConstraints = new ConcurrentHashMap<Method,
InteractionConstraintsBinding>();
-    private Map<Class, InteractionConstraintsBinding> classConstraints = new ConcurrentHashMap<Class,
InteractionConstraintsBinding>();
+    private Map<Method, InteractionConstraintsBinding> methodsConstraints = new ConcurrentHashMap<>();
+    private Map<Class, InteractionConstraintsBinding> classConstraints = new ConcurrentHashMap<>();
 
     @Override
     public boolean isValid( Method method, ObjectSelection objectSelection, Module module
)

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/RequestReaderDelegator.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/RequestReaderDelegator.java
b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/RequestReaderDelegator.java
index aa25bda..db767ff 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/RequestReaderDelegator.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/RequestReaderDelegator.java
@@ -43,7 +43,7 @@ public class RequestReaderDelegator
 {
     private static final Object[] NULL_PARAMS = new Object[ 0 ];
 
-    List<RequestReader> requestReaders = new ArrayList<RequestReader>();
+    List<RequestReader> requestReaders = new ArrayList<>();
 
     @Structure
     Module module;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/ResponseWriterDelegator.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/ResponseWriterDelegator.java
b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/ResponseWriterDelegator.java
index ff353f1..18fd7fa 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/ResponseWriterDelegator.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/ResponseWriterDelegator.java
@@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory;
 public class ResponseWriterDelegator
     implements ResponseWriter
 {
-    List<ResponseWriter> responseWriters = new ArrayList<ResponseWriter>();
+    List<ResponseWriter> responseWriters = new ArrayList<>();
 
     @Structure
     Module module;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ResourceTemplateResponseWriter.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ResourceTemplateResponseWriter.java
b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ResourceTemplateResponseWriter.java
index 43ef030..eec0715 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ResourceTemplateResponseWriter.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ResourceTemplateResponseWriter.java
@@ -53,7 +53,7 @@ public class ResourceTemplateResponseWriter extends AbstractResponseWriter
     @Service
     private MetadataService metadataService;
 
-    Set<String> skip = new HashSet<String>();
+    Set<String> skip = new HashSet<>();
 
     @Override
     public boolean writeResponse( final Object result, final Response response )
@@ -89,7 +89,7 @@ public class ResourceTemplateResponseWriter extends AbstractResponseWriter
                     public void write( Writer writer )
                         throws IOException
                     {
-                        Map<String, Object> context = new HashMap<String, Object>();
+                        Map<String, Object> context = new HashMap<>();
                         context.put( "request", response.getRequest() );
                         context.put( "response", response );
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/TableResponseWriter.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/TableResponseWriter.java
b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/TableResponseWriter.java
index d8d35aa..55ebe77 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/TableResponseWriter.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/TableResponseWriter.java
@@ -185,7 +185,7 @@ public class TableResponseWriter extends AbstractResponseWriter
                     public void write( Writer writer )
                         throws IOException
                     {
-                        Map<String, Object> context = new HashMap<String, Object>();
+                        Map<String, Object> context = new HashMap<>();
                         context.put( "request", response.getRequest() );
                         context.put( "response", response );
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/65f0713b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/spi/CommandResult.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/spi/CommandResult.java
b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/spi/CommandResult.java
index 6ab7efe..a5a6b86 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/spi/CommandResult.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/spi/CommandResult.java
@@ -24,5 +24,5 @@ package org.apache.polygene.library.rest.server.spi;
  */
 public interface CommandResult
 {
-    public Object getResult();
+    Object getResult();
 }


Mime
View raw message