* org.onap.dmaap
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2019 IBM.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public List<DR_Sub> getAllDr_Subs() {
logger.debug( "enter getAllDR_Subs()");
- return new ArrayList<DR_Sub>(dr_subs.values());
+ return new ArrayList<>(dr_subs.values());
}
public ArrayList<DR_Sub> getDr_SubsByFeedId( String pubId ) {
- ArrayList<DR_Sub> someSubs = new ArrayList<DR_Sub>();
+ ArrayList<DR_Sub> someSubs = new ArrayList<>();
for( DR_Sub sub : dr_subs.values() ) {
if ( pubId.equals( sub.getFeedId() )) {
someSubs.add( sub );
prov = new DrProvConnection();
prov.makeSubPostConnection( provURL );
String resp = prov.doPostDr_Sub( sub, apiError );
- if ( unit_test.equals( "Yes" ) ) {
+ if ( "Yes".equals(unit_test) ) {
resp = simulateResp( sub, "POST" );
- apiError.setCode(200);
+ apiError.setCode(201);
}
logger.debug( "addDr_Sub resp=" + resp );
snew.setLastMod();
addEgressRoute( snew, apiError );
dr_subs.put( snew.getSubId(), snew );
- apiError.setCode(200);
+ apiError.setCode(201);
} else {
apiError.setCode(400);
}