Skip to content

Commit 0371da5

Browse files
murtazahassan123Apache9
authored andcommitted
HBASE-22484 Javadoc Warnings: Fix warnings coming due to @Result tag in TestCoprocessorWhitelistMasterObserver (#256)
1 parent 0fa5519 commit 0371da5

File tree

1 file changed

+32
-56
lines changed

1 file changed

+32
-56
lines changed

hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestCoprocessorWhitelistMasterObserver.java

Lines changed: 32 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,10 @@ public void tearDownTestCoprocessorWhitelistMasterObserver() throws Exception {
8787
}
8888

8989
/**
90-
* Test a table modification adding a coprocessor path
91-
* which is not whitelisted
92-
* @result An IOException should be thrown and caught
93-
* to show coprocessor is working as desired
94-
* @param whitelistedPaths A String array of paths to add in
95-
* for the whitelisting configuration
96-
* @param coprocessorPath A String to use as the
97-
* path for a mock coprocessor
90+
* Test a table modification adding a coprocessor path which is not whitelisted.
91+
* @exception Exception should be thrown and caught to show coprocessor is working as desired
92+
* @param whitelistedPaths A String array of paths to add in for the whitelisting configuration
93+
* @param coprocessorPath A String to use as the path for a mock coprocessor
9894
*/
9995
private static void positiveTestCase(String[] whitelistedPaths, String coprocessorPath)
10096
throws Exception {
@@ -128,14 +124,10 @@ private static void positiveTestCase(String[] whitelistedPaths, String coprocess
128124
}
129125

130126
/**
131-
* Test a table modification adding a coprocessor path
132-
* which is whitelisted
133-
* @result The coprocessor should be added to the table
134-
* descriptor successfully
135-
* @param whitelistedPaths A String array of paths to add in
136-
* for the whitelisting configuration
137-
* @param coprocessorPath A String to use as the
138-
* path for a mock coprocessor
127+
* Test a table modification adding a coprocessor path which is whitelisted. The coprocessor
128+
* should be added to the table descriptor successfully.
129+
* @param whitelistedPaths A String array of paths to add in for the whitelisting configuration
130+
* @param coprocessorPath A String to use as the path for a mock coprocessor
139131
*/
140132
private static void negativeTestCase(String[] whitelistedPaths, String coprocessorPath)
141133
throws Exception {
@@ -169,10 +161,8 @@ private static void negativeTestCase(String[] whitelistedPaths, String coprocess
169161
}
170162

171163
/**
172-
* Test a table modification adding a coprocessor path
173-
* which is not whitelisted
174-
* @result An IOException should be thrown and caught
175-
* to show coprocessor is working as desired
164+
* Test a table modification adding a coprocessor path which is not whitelisted.
165+
* @exception Exception should be thrown and caught to show coprocessor is working as desired
176166
*/
177167
@Test
178168
public void testSubstringNonWhitelisted() throws Exception {
@@ -181,11 +171,9 @@ public void testSubstringNonWhitelisted() throws Exception {
181171
}
182172

183173
/**
184-
* Test a table creation including a coprocessor path
185-
* which is not whitelisted
186-
* @result Coprocessor should be added to table descriptor
187-
* Table is disabled to avoid an IOException due to
188-
* the added coprocessor not actually existing on disk
174+
* Test a table creation including a coprocessor path which is not whitelisted. Coprocessor should
175+
* be added to table descriptor. Table is disabled to avoid an IOException due to the added
176+
* coprocessor not actually existing on disk.
189177
*/
190178
@Test
191179
public void testDifferentFileSystemNonWhitelisted() throws Exception {
@@ -194,11 +182,9 @@ public void testDifferentFileSystemNonWhitelisted() throws Exception {
194182
}
195183

196184
/**
197-
* Test a table modification adding a coprocessor path
198-
* which is whitelisted
199-
* @result Coprocessor should be added to table descriptor
200-
* Table is disabled to avoid an IOException due to
201-
* the added coprocessor not actually existing on disk
185+
* Test a table modification adding a coprocessor path which is whitelisted. Coprocessor should be
186+
* added to table descriptor. Table is disabled to avoid an IOException due to the added
187+
* coprocessor not actually existing on disk.
202188
*/
203189
@Test
204190
public void testSchemeAndDirectorywhitelisted() throws Exception {
@@ -207,23 +193,19 @@ public void testSchemeAndDirectorywhitelisted() throws Exception {
207193
}
208194

209195
/**
210-
* Test a table modification adding a coprocessor path
211-
* which is whitelisted
212-
* @result Coprocessor should be added to table descriptor
213-
* Table is disabled to avoid an IOException due to
214-
* the added coprocessor not actually existing on disk
196+
* Test a table modification adding a coprocessor path which is whitelisted. Coprocessor should be
197+
* added to table descriptor. Table is disabled to avoid an IOException due to the added
198+
* coprocessor not actually existing on disk.
215199
*/
216200
@Test
217201
public void testSchemeWhitelisted() throws Exception {
218202
negativeTestCase(new String[] { "file:///" }, "file:///permitted/couldnotpossiblyexist.jar");
219203
}
220204

221205
/**
222-
* Test a table modification adding a coprocessor path
223-
* which is whitelisted
224-
* @result Coprocessor should be added to table descriptor
225-
* Table is disabled to avoid an IOException due to
226-
* the added coprocessor not actually existing on disk
206+
* Test a table modification adding a coprocessor path which is whitelisted. Coprocessor should be
207+
* added to table descriptor. Table is disabled to avoid an IOException due to the added
208+
* coprocessor not actually existing on disk.
227209
*/
228210
@Test
229211
public void testDFSNameWhitelistedWorks() throws Exception {
@@ -232,11 +214,9 @@ public void testDFSNameWhitelistedWorks() throws Exception {
232214
}
233215

234216
/**
235-
* Test a table modification adding a coprocessor path
236-
* which is whitelisted
237-
* @result Coprocessor should be added to table descriptor
238-
* Table is disabled to avoid an IOException due to
239-
* the added coprocessor not actually existing on disk
217+
* Test a table modification adding a coprocessor path which is whitelisted. Coprocessor should be
218+
* added to table descriptor. Table is disabled to avoid an IOException due to the added
219+
* coprocessor not actually existing on disk.
240220
*/
241221
@Test
242222
public void testDFSNameNotWhitelistedFails() throws Exception {
@@ -245,21 +225,18 @@ public void testDFSNameNotWhitelistedFails() throws Exception {
245225
}
246226

247227
/**
248-
* Test a table modification adding a coprocessor path
249-
* which is whitelisted
250-
* @result Coprocessor should be added to table descriptor
251-
* Table is disabled to avoid an IOException due to
252-
* the added coprocessor not actually existing on disk
228+
* Test a table modification adding a coprocessor path which is whitelisted. Coprocessor should be
229+
* added to table descriptor. Table is disabled to avoid an IOException due to the added
230+
* coprocessor not actually existing on disk.
253231
*/
254232
@Test
255233
public void testBlanketWhitelist() throws Exception {
256234
negativeTestCase(new String[] { "*" }, "hdfs:///permitted/couldnotpossiblyexist.jar");
257235
}
258236

259237
/**
260-
* Test a table creation including a coprocessor path
261-
* which is not whitelisted
262-
* @result Table will not be created due to the offending coprocessor
238+
* Test a table creation including a coprocessor path which is not whitelisted. Table will not be
239+
* created due to the offending coprocessor.
263240
*/
264241
@Test
265242
public void testCreationNonWhitelistedCoprocessorPath() throws Exception {
@@ -303,9 +280,8 @@ public Optional<RegionObserver> getRegionObserver() {
303280
}
304281

305282
/**
306-
* Test a table creation including a coprocessor path
307-
* which is on the classpath
308-
* @result Table will be created with the coprocessor
283+
* Test a table creation including a coprocessor path which is on the classpath. Table will be
284+
* created with the coprocessor.
309285
*/
310286
@Test
311287
public void testCreationClasspathCoprocessor() throws Exception {

0 commit comments

Comments
 (0)