Skip to content

Commit b05447f

Browse files
Flossyclaude
andcommitted
fix: correct @NonNull/@nullable annotation placement for checkstyle
Moves null-safety annotations to separate lines per checkstyle rules. Changes: - ApplicationContext: All @NonNull/@nullable now on own line - ServiceRegistry: All @NonNull/@nullable now on own line Checkstyle requires annotations on separate line from method signature. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent d9541f3 commit b05447f

3 files changed

Lines changed: 9958 additions & 15 deletions

File tree

‎platform-api/src/main/java/org/flossware/platform/api/ApplicationContext.java‎

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,68 +52,77 @@ public interface ApplicationContext {
5252
*
5353
* @return the application ID
5454
*/
55-
@NonNull String getApplicationId();
55+
@NonNull
56+
String getApplicationId();
5657

5758
/**
5859
* Returns the current lifecycle state of this application.
5960
*
6061
* @return the application state
6162
* @see ApplicationState
6263
*/
63-
@NonNull ApplicationState getState();
64+
@NonNull
65+
ApplicationState getState();
6466

6567
/**
6668
* Returns the timestamp when this application was deployed.
6769
*
6870
* @return the deployment timestamp
6971
*/
70-
@NonNull Instant getDeployedAt();
72+
@NonNull
73+
Instant getDeployedAt();
7174

7275
/**
7376
* Returns the isolated classloader for this application. All application classes are loaded
7477
* through this classloader for isolation.
7578
*
7679
* @return the application's classloader
7780
*/
78-
@NonNull ClassLoader getClassLoader();
81+
@NonNull
82+
ClassLoader getClassLoader();
7983

8084
/**
8185
* Returns the dedicated thread pool for this application. Use this for concurrent execution to
8286
* maintain resource isolation.
8387
*
8488
* @return the application's thread pool
8589
*/
86-
@NonNull ThreadPoolExecutor getThreadPool();
90+
@NonNull
91+
ThreadPoolExecutor getThreadPool();
8792

8893
/**
8994
* Returns the security policy for this application. Use this to check permissions before
9095
* performing privileged operations.
9196
*
9297
* @return the application's security policy
9398
*/
94-
@NonNull SecurityPolicy getSecurityPolicy();
99+
@NonNull
100+
SecurityPolicy getSecurityPolicy();
95101

96102
/**
97103
* Returns the resource monitor tracking this application's resource usage. Provides CPU time,
98104
* memory usage, and thread count metrics.
99105
*
100106
* @return the application's resource monitor
101107
*/
102-
@NonNull ResourceMonitor getResourceMonitor();
108+
@NonNull
109+
ResourceMonitor getResourceMonitor();
103110

104111
/**
105112
* Returns the message bus if messaging is enabled for this application.
106113
*
107114
* @return optional message bus, empty if messaging is not enabled
108115
*/
109-
@NonNull Optional<MessageBus> getMessageBus();
116+
@NonNull
117+
Optional<MessageBus> getMessageBus();
110118

111119
/**
112120
* Returns the service registry if messaging is enabled for this application.
113121
*
114122
* @return optional service registry, empty if messaging is not enabled
115123
*/
116-
@NonNull Optional<ServiceRegistry> getServiceRegistry();
124+
@NonNull
125+
Optional<ServiceRegistry> getServiceRegistry();
117126

118127
/**
119128
* Returns the volume manager if volumes are defined for this application. Provides access to
@@ -122,19 +131,22 @@ public interface ApplicationContext {
122131
* @return optional volume manager, empty if no volumes are defined
123132
* @since 2.0
124133
*/
125-
@NonNull Optional<VolumeManager> getVolumeManager();
134+
@NonNull
135+
Optional<VolumeManager> getVolumeManager();
126136

127137
/**
128138
* Returns custom properties configured for this application.
129139
*
130140
* @return immutable map of application properties
131141
*/
132-
@NonNull Map<String, String> getProperties();
142+
@NonNull
143+
Map<String, String> getProperties();
133144

134145
/**
135146
* Returns the application instance if it has been started.
136147
*
137148
* @return the application instance, or null if not yet started
138149
*/
139-
@Nullable Object getApplicationInstance();
150+
@Nullable
151+
Object getApplicationInstance();
140152
}

‎platform-api/src/main/java/org/flossware/platform/api/ServiceRegistry.java‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ <T> void registerService(
7777
* @param serviceInterface the interface class
7878
* @return optional containing the service, or empty if none found
7979
*/
80-
@NonNull <T> Optional<T> getService(@NonNull Class<T> serviceInterface);
80+
@NonNull
81+
<T> Optional<T> getService(@NonNull Class<T> serviceInterface);
8182

8283
/**
8384
* Returns a service that satisfies the minimum version requirement. If multiple compatible
@@ -93,7 +94,8 @@ <T> void registerService(
9394
* @throws NullPointerException if either parameter is null
9495
* @throws IllegalArgumentException if minVersion format is invalid
9596
*/
96-
@NonNull <T> Optional<T> getService(
97+
@NonNull
98+
<T> Optional<T> getService(
9799
@NonNull Class<T> serviceInterface, @NonNull String minVersion);
98100

99101
/**
@@ -103,7 +105,8 @@ <T> void registerService(
103105
* @param serviceInterface the interface class
104106
* @return list of all registered services, empty if none found
105107
*/
106-
@NonNull <T> List<T> getAllServices(@NonNull Class<T> serviceInterface);
108+
@NonNull
109+
<T> List<T> getAllServices(@NonNull Class<T> serviceInterface);
107110

108111
/**
109112
* Unregisters a specific service implementation.

0 commit comments

Comments
 (0)