Skip to content

Commit 70d15ac

Browse files
authored
Merge pull request #447 from arjantijms/clean-up
General amount of cleanups
2 parents 4050ba3 + 8806525 commit 70d15ac

File tree

1,187 files changed

+14711
-7574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,187 files changed

+14711
-7574
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ log
3737
.DS_Store
3838
cms-db-schema/liquibase.properties
3939
**/META-INF
40-
**/main/java/META-INF
40+
**/main/java/META-INF
41+
*.class

mq/main/bridge/bridge-admin/src/main/java/com/sun/messaging/bridge/admin/BridgeContextImpl.java

+37-6
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,14 @@ public BridgeContextImpl(BridgeBaseContext bc, String name) {
6666
*
6767
* @return true if it's embeded in a broker process
6868
*/
69+
@Override
6970
public boolean isEmbeded() {
7071
return _bc.isEmbeded();
7172
}
7273

7374
/**
7475
*/
76+
@Override
7577
public boolean doBind() {
7678
return _bc.doBind();
7779
}
@@ -80,6 +82,7 @@ public boolean doBind() {
8082
*
8183
* @return true if the broker does not have its own JVM
8284
*/
85+
@Override
8386
public boolean isEmbededBroker() {
8487
return _bc.isEmbededBroker();
8588
}
@@ -88,20 +91,23 @@ public boolean isEmbededBroker() {
8891
*
8992
* @return true if running on nucleus
9093
*/
94+
@Override
9195
public boolean isRunningOnNucleus() {
9296
return _bc.isRunningOnNucleus();
9397
}
9498

9599
/**
96100
* @return true if should disable console logging
97101
*/
102+
@Override
98103
public boolean isSilentMode() {
99104
return _bc.isSilentMode();
100105
}
101106

102107
/**
103108
* @return null if PUService not enabled
104109
*/
110+
@Override
105111
public Object getPUService() {
106112
return _bc.getPUService();
107113
}
@@ -110,18 +116,22 @@ public Object getPUService() {
110116
*
111117
* @return the runtime configuration for a bridge service
112118
*/
119+
@Override
113120
public Properties getConfig() {
114121
return _config;
115122
}
116123

124+
@Override
117125
public String getRootDir() {
118126
return _config.getProperty(_config.getProperty(BRIDGE_PROP_PREFIX) + ".varhome");
119127
}
120128

129+
@Override
121130
public String getLibDir() {
122131
return _config.getProperty(_config.getProperty(BRIDGE_PROP_PREFIX) + ".libhome");
123132
}
124133

134+
@Override
125135
public String getProperty(String suffix) {
126136
return _config.getProperty(_config.getProperty(BRIDGE_PROP_PREFIX) + "." + suffix);
127137

@@ -133,6 +143,7 @@ public String getProperty(String suffix) {
133143
*
134144
* @return a JMS connection factory for the bridge service
135145
*/
146+
@Override
136147
public javax.jms.ConnectionFactory getConnectionFactory(Properties props) throws Exception {
137148

138149
com.sun.messaging.ConnectionFactory cf = new com.sun.messaging.ConnectionFactory();
@@ -143,7 +154,7 @@ public javax.jms.ConnectionFactory getConnectionFactory(Properties props) throws
143154
while (en.hasMoreElements()) {
144155
name = (String) en.nextElement();
145156
if (!name.equals(com.sun.messaging.ConnectionConfiguration.imqAddressList)) {
146-
cf.setProperty(name, (String) props.getProperty(name));
157+
cf.setProperty(name, props.getProperty(name));
147158
}
148159
}
149160
}
@@ -160,6 +171,7 @@ public javax.jms.ConnectionFactory getConnectionFactory(Properties props) throws
160171
*
161172
* @return a JMS XA connection factory for the bridge service
162173
*/
174+
@Override
163175
public javax.jms.XAConnectionFactory getXAConnectionFactory(Properties props) throws Exception {
164176

165177
com.sun.messaging.XAConnectionFactory cf = new com.sun.messaging.XAConnectionFactory();
@@ -170,7 +182,7 @@ public javax.jms.XAConnectionFactory getXAConnectionFactory(Properties props) th
170182
while (en.hasMoreElements()) {
171183
name = (String) en.nextElement();
172184
if (!name.equals(com.sun.messaging.ConnectionConfiguration.imqAddressList)) {
173-
cf.setProperty(name, (String) props.getProperty(name));
185+
cf.setProperty(name, props.getProperty(name));
174186
}
175187
}
176188
}
@@ -185,6 +197,7 @@ public javax.jms.XAConnectionFactory getXAConnectionFactory(Properties props) th
185197
*
186198
* @return a JMS connection factory for the bridge service
187199
*/
200+
@Override
188201
public javax.jms.ConnectionFactory getAdminConnectionFactory(Properties props) throws Exception {
189202

190203
com.sun.messaging.ConnectionFactory cf = new com.sun.messaging.ConnectionFactory();
@@ -195,7 +208,7 @@ public javax.jms.ConnectionFactory getAdminConnectionFactory(Properties props) t
195208
while (en.hasMoreElements()) {
196209
name = (String) en.nextElement();
197210
if (!name.equals(com.sun.messaging.ConnectionConfiguration.imqAddressList)) {
198-
cf.setProperty(name, (String) props.getProperty(name));
211+
cf.setProperty(name, props.getProperty(name));
199212
}
200213
}
201214
}
@@ -218,13 +231,15 @@ public javax.jms.ConnectionFactory getAdminConnectionFactory(Properties props) t
218231
*
219232
* @return true if the method actually did something with the error
220233
*/
234+
@Override
221235
public boolean handleGlobalError(Throwable ex, String reason) {
222236
return _bc.handleGlobalError(ex, reason);
223237
}
224238

225239
/**
226240
* Register (optional) a service with host
227241
*/
242+
@Override
228243
public void registerService(String protocol, String type, int port, HashMap props) {
229244

230245
_bc.registerService(_name, protocol, type, port, props);
@@ -235,6 +250,7 @@ public void registerService(String protocol, String type, int port, HashMap prop
235250
*
236251
* @return the default configuration properties for SSLContext
237252
*/
253+
@Override
238254
public Properties getDefaultSSLContextConfig() throws Exception {
239255
return _bc.getDefaultSSLContextConfig(_name);
240256
}
@@ -244,21 +260,25 @@ public Properties getDefaultSSLContextConfig() throws Exception {
244260
*
245261
* @return an unique identifier for this instance
246262
*/
263+
@Override
247264
public String getIdentityName() throws Exception {
248265
return _bc.getIdentityName();
249266
}
250267

268+
@Override
251269
public String getBrokerHostName() {
252270
return _bc.getBrokerHostName();
253271
}
254272

273+
@Override
255274
public String getTransactionManagerClass() throws Exception {
256275
Properties props = _bc.getBridgeConfig();
257276

258277
String key = props.getProperty(BridgeBaseContext.PROP_PREFIX) + "." + _name + ".tm.class";
259278
String value = props.getProperty(key);
260-
if (value != null)
279+
if (value != null) {
261280
return value;
281+
}
262282

263283
key = BridgeBaseContext.PROP_PREFIX + ".tm.class";
264284
return props.getProperty(key);
@@ -267,6 +287,7 @@ public String getTransactionManagerClass() throws Exception {
267287
/**
268288
* return an empty Properties object if no property set
269289
*/
290+
@Override
270291
public Properties getTransactionManagerProps() throws Exception {
271292
Properties tmp = new Properties();
272293
Properties props = _bc.getBridgeConfig();
@@ -277,8 +298,9 @@ public Properties getTransactionManagerProps() throws Exception {
277298
key = props.getProperty(BridgeBaseContext.PROP_PREFIX) + "." + _name + ".tm.props";
278299
List<String> plist1 = BridgeUtil.getListProperty(key, props);
279300

280-
if (plist0 == null && plist1 == null)
301+
if (plist0 == null && plist1 == null) {
281302
return tmp;
303+
}
282304

283305
if (plist0 != null) {
284306
for (String value : plist0) {
@@ -301,56 +323,65 @@ public Properties getTransactionManagerProps() throws Exception {
301323
return tmp;
302324
}
303325

326+
@Override
304327
public boolean isJDBCStoreType() throws Exception {
305328
return _bc.isJDBCStoreType();
306329
}
307330

331+
@Override
308332
public Object getJDBCStore(String type) throws Exception {
309333
if (type.toUpperCase(Locale.getDefault()).equals("JMS")) {
310-
return (JMSBridgeStore) _bc.getJDBCStore();
334+
return _bc.getJDBCStore();
311335
}
312336
return null;
313337
}
314338

315339
/**
316340
* @return true if ok to allocate size bytes of mem
317341
*/
342+
@Override
318343
public boolean allocateMemCheck(long size) {
319344
return _bc.allocateMemCheck(size);
320345
}
321346

347+
@Override
322348
public boolean getPoodleFixEnabled() {
323349
return _bc.getPoodleFixEnabled();
324350
}
325351

352+
@Override
326353
public String[] getKnownSSLEnabledProtocols() {
327354
return _bc.getKnownSSLEnabledProtocols();
328355
}
329356

330357
/**
331358
* Logging method for Bridge Service Manager
332359
*/
360+
@Override
333361
public void logError(String message, Throwable t) {
334362
_bc.logError(message, t);
335363
}
336364

337365
/**
338366
* Logging method for Bridge Service Manager
339367
*/
368+
@Override
340369
public void logWarn(String message, Throwable t) {
341370
_bc.logWarn(message, t);
342371
}
343372

344373
/**
345374
* Logging method for Bridge Service Manager
346375
*/
376+
@Override
347377
public void logInfo(String message, Throwable t) {
348378
_bc.logInfo(message, t);
349379
}
350380

351381
/**
352382
* Logging method for Bridge Service Manager
353383
*/
384+
@Override
354385
public void logDebug(String message, Throwable t) {
355386
_bc.logDebug(message, t);
356387
}

0 commit comments

Comments
 (0)