Return-Path: X-Original-To: apmail-aurora-reviews-archive@minotaur.apache.org Delivered-To: apmail-aurora-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1574117AFE for ; Tue, 17 Mar 2015 19:19:04 +0000 (UTC) Received: (qmail 73296 invoked by uid 500); 17 Mar 2015 19:19:04 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 73244 invoked by uid 500); 17 Mar 2015 19:19:04 -0000 Mailing-List: contact reviews-help@aurora.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.incubator.apache.org Delivered-To: mailing list reviews@aurora.incubator.apache.org Received: (qmail 73193 invoked by uid 99); 17 Mar 2015 19:19:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2015 19:19:03 +0000 X-ASF-Spam-Status: No, hits=-1997.8 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 17 Mar 2015 19:19:02 +0000 Received: (qmail 72821 invoked by uid 99); 17 Mar 2015 19:18:42 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2015 19:18:42 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 625D01D42DF; Tue, 17 Mar 2015 19:18:41 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1412418347422126681==" MIME-Version: 1.0 Subject: Re: Review Request 32141: Introduce AnnotatedAuroraAdmin superclass for annotations. From: "Kevin Sweeney" To: "Joshua Cohen" , "Bill Farner" Cc: "Aurora ReviewBot" , "Aurora" , "Maxim Khutornenko" , "Kevin Sweeney" Date: Tue, 17 Mar 2015 19:18:41 -0000 Message-ID: <20150317191841.391.63781@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Kevin Sweeney" X-ReviewGroup: Aurora X-ReviewRequest-URL: https://reviews.apache.org/r/32141/ X-Sender: "Kevin Sweeney" References: <20150317191644.391.3424@reviews.apache.org> In-Reply-To: <20150317191644.391.3424@reviews.apache.org> Reply-To: "Kevin Sweeney" X-ReviewRequest-Repository: aurora X-Virus-Checked: Checked by ClamAV on apache.org --===============1412418347422126681== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32141/ ----------------------------------------------------------- (Updated March 17, 2015, 12:18 p.m.) Review request for Aurora, Joshua Cohen and Bill Farner. Changes ------- Remove @Inherited, which is only defined to have any meaning for class annotations. Bugs: AURORA-1187 https://issues.apache.org/jira/browse/AURORA-1187 Repository: aurora Description ------- Add an AnnotatedAuroraAdmin subclass for AuroraAdmin.Iface and change code to inherit from it. This gives us a place to put annotations like the AuthorizingParam one introduced in this review without needing to copy-paste them when we override a new method. A future diff will use these annotations to determine which permission a method call needs by inspecting the annotated parameter. I created a new interface to enable DRY - otherwise I'd need to annotate both ForwardingThrift and SchedulerThriftInterface and keep them in sync. Diffs (updated) ----- src/main/java/org/apache/aurora/scheduler/http/api/security/AuthorizingParam.java PRE-CREATION src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java c60d1e78e0f5c474ff0dcf6393e0c305d865bded src/main/java/org/apache/aurora/scheduler/thrift/ThriftModule.java b1d633602f3fb021a026a087b91d41580798eeaf src/main/java/org/apache/aurora/scheduler/thrift/aop/AnnotatedAuroraAdmin.java PRE-CREATION src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java f0e40b646092e96955fddc46c3a1e62a8237b00f src/test/java/org/apache/aurora/scheduler/thrift/aop/AopModuleTest.java df6b53a524b005cd5fabb099fd0c08d83e3b287d src/test/java/org/apache/aurora/scheduler/thrift/aop/FeatureToggleInterceptorTest.java ee98f66de7f671018fa0a0b4894f114c7a283eda src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java 3900c2228038668576cdbb37e87127246a33317c src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java 7b1bf2ef8b413d2c1a08b41722a04af091305304 src/test/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptorTest.java 7e20aaa6836bd205261afe5b1244fb6af8a56356 src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java aae5cd7709abe3896c2ae06c218a0c90ca11c576 Diff: https://reviews.apache.org/r/32141/diff/ Testing ------- ./gradlew build Thanks, Kevin Sweeney --===============1412418347422126681==--