Skip to content

Commit

Permalink
Issue #561: Fixed compilation errors.
Browse files Browse the repository at this point in the history
Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
  • Loading branch information
Juergen Fickel authored and Juergen Fickel committed Jan 31, 2020
1 parent 12ff5a7 commit c959b3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Expand Up @@ -158,7 +158,7 @@ private DittoRuntimeException mapToExternalException(final Throwable error) {
* @param enforcer the enforcer.
* @return the extended signal.
*/
protected static <T extends Signal<T>> T addEffectedReadSubjectsToThingSignal(final Signal<T> signal,
protected static <T extends Signal> T addEffectedReadSubjectsToThingSignal(final Signal<T> signal,
final Enforcer enforcer) {

final ResourceKey resourceKey = ResourceKey.newInstance(ThingCommand.RESOURCE_TYPE, signal.getResourcePath());
Expand Down
Expand Up @@ -309,8 +309,9 @@ private CompletionStage<WithDittoHeaders> retrieveThingAclAndMigrateToPolicy(fin
* @param enforcer the policy enforcer.
* @return the completionStage of the contextual including message and receiver
*/
private CompletionStage<Contextual<WithDittoHeaders>> enforceThingCommandByPolicyEnforcer(final ThingCommand<?> thingCommand,
final PolicyId policyId, final Enforcer enforcer) {
private CompletionStage<Contextual<WithDittoHeaders>> enforceThingCommandByPolicyEnforcer(
final ThingCommand<?> thingCommand, final PolicyId policyId, final Enforcer enforcer) {

return authorizeByPolicy(enforcer, thingCommand)
.map(commandWithReadSubjects -> {
if (commandWithReadSubjects instanceof ThingQueryCommand) {
Expand Down Expand Up @@ -885,7 +886,7 @@ private static ThingCommand transformModifyThingToCreateThing(final ThingCommand
* @param command the command to authorize.
* @return optionally the authorized command extended by read subjects.
*/
static <T extends ThingCommand<T>> Optional<T> authorizeByPolicy(final Enforcer policyEnforcer,
static <T extends ThingCommand> Optional<T> authorizeByPolicy(final Enforcer policyEnforcer,
final ThingCommand<T> command) {

final ResourceKey thingResourceKey = PoliciesResourceType.thingResource(command.getResourcePath());
Expand Down

0 comments on commit c959b3c

Please sign in to comment.