stefanseifert commented on code in PR #31:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/31#discussion_r1357912860


##########
core/src/main/java/org/apache/sling/testing/mock/osgi/config/annotations/UpdateConfig.java:
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.testing.mock.osgi.config.annotations;
+
+import org.osgi.service.component.annotations.Component;
+
+import java.lang.annotation.Repeatable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Define this annotation on a test class or method to use the {@link 
org.osgi.service.cm.ConfigurationAdmin} service
+ * to update the persisted properties for the configuration whose pid matches 
the {@link #pid()} attribute.
+ * Updates should be applied top-down for each test context scope, from with 
the outermost (class-level) to the
+ * innermost (method-level).
+ */
+@Repeatable(UpdateConfigs.class)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface UpdateConfig {
+
+    /**
+     * Specify a configuration pid to update with values specified by {@link 
#property()}. The default value is
+     * {@link Component#NAME}, which is a special string ("$") that can be 
used to specify the name of the
+     * {@link #component()} class as a configuration PID.
+     *
+     * @return a configuration pid
+     */
+    String pid() default Component.NAME;

Review Comment:
   now it's consistent for both annotations. good to get rid of the 
Object.class default value.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to