Skip to content

Commit 691094c

Browse files
author
Steve Peters
committed
Add @Override annotations
1 parent f94da5a commit 691094c

File tree

5 files changed

+27
-0
lines changed

5 files changed

+27
-0
lines changed

aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/AwsProxySecurityContextWriter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class AwsProxySecurityContextWriter implements SecurityContextWriter<AwsP
3535
// Implementation - SecurityContextWriter
3636
//-------------------------------------------------------------
3737

38+
@Override
3839
public SecurityContext writeSecurityContext(AwsProxyRequest event, Context lambdaContext) {
3940
currentContext = new AwsProxySecurityContext(lambdaContext, event);
4041

aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/jaxrs/AwsProxySecurityContext.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public AwsProxySecurityContext(final Context lambdaContext, final AwsProxyReques
8484
// Implementation - SecurityContext
8585
//-------------------------------------------------------------
8686

87+
@Override
8788
public Principal getUserPrincipal() {
8889
if (getAuthenticationScheme() == null) {
8990
return () -> null;
@@ -120,16 +121,19 @@ public Principal getUserPrincipal() {
120121
}
121122

122123

124+
@Override
123125
public boolean isUserInRole(String role) {
124126
return (role.equals(event.getRequestContext().getIdentity().getUserArn()));
125127
}
126128

127129

130+
@Override
128131
public boolean isSecure() {
129132
return getAuthenticationScheme() != null;
130133
}
131134

132135

136+
@Override
133137
public String getAuthenticationScheme() {
134138
switch (event.getRequestSource()) {
135139
case API_GATEWAY:

aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/servlet/AwsFilterChainManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public class AwsFilterChainManager extends FilterChainManager<AwsServletContext>
4040
* Returns the filter holders stored in the <code>AwsServletContext</code> object
4141
* @return The map of filter holders
4242
*/
43+
@Override
4344
protected Map<String, FilterHolder> getFilterHolders() {
4445
return servletContext.getFilterHolders();
4546
}

aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/servlet/AwsProxyHttpServletRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,7 @@ public String getServerName() {
567567
.append(".amazonaws.com").toString();
568568
}
569569

570+
@Override
570571
public int getServerPort() {
571572
if (request.getMultiValueHeaders() == null) {
572573
return 443;

aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/model/MultiValuedTreeMap.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ public MultiValuedTreeMap(Comparator<Key> comparator) {
3636
map = new TreeMap<>(comparator);
3737
}
3838

39+
@Override
3940
public void add(Key key, Value value) {
4041
List<Value> values = findKey(key);
4142
values.add(value);
4243
}
4344

45+
@Override
4446
public Value getFirst(Key key) {
4547
List<Value> values = get(key);
4648
if (values == null || values.size() == 0) {
@@ -49,24 +51,29 @@ public Value getFirst(Key key) {
4951
return values.get(0);
5052
}
5153

54+
@Override
5255
public void putSingle(Key key, Value value) {
5356
List<Value> values = findKey(key);
5457
values.clear();
5558
values.add(value);
5659
}
5760

61+
@Override
5862
public void clear() {
5963
map.clear();
6064
}
6165

66+
@Override
6267
public boolean containsKey(Object key) {
6368
return map.containsKey(key);
6469
}
6570

71+
@Override
6672
public boolean containsValue(Object value) {
6773
return map.containsValue(value);
6874
}
6975

76+
@Override
7077
public Set<Entry<Key, List<Value>>> entrySet() {
7178
return map.entrySet();
7279
}
@@ -75,6 +82,7 @@ public boolean equals(Object o) {
7582
return map.equals(o);
7683
}
7784

85+
@Override
7886
public List<Value> get(Object key) {
7987
return map.get(key);
8088
}
@@ -83,46 +91,56 @@ public int hashCode() {
8391
return map.hashCode();
8492
}
8593

94+
@Override
8695
public boolean isEmpty() {
8796
return map.isEmpty();
8897
}
8998

99+
@Override
90100
public Set<Key> keySet() {
91101
return map.keySet();
92102
}
93103

104+
@Override
94105
public List<Value> put(Key key, List<Value> value) {
95106
return map.put(key, value);
96107
}
97108

109+
@Override
98110
public void putAll(Map<? extends Key, ? extends List<Value>> t) {
99111
map.putAll(t);
100112
}
101113

114+
@Override
102115
public List<Value> remove(Object key) {
103116
return map.remove(key);
104117
}
105118

119+
@Override
106120
public int size() {
107121
return map.size();
108122
}
109123

124+
@Override
110125
public Collection<List<Value>> values() {
111126
return map.values();
112127
}
113128

129+
@Override
114130
public void addAll(Key key, Value... newValues) {
115131
for (Value value : newValues) {
116132
add(key, value);
117133
}
118134
}
119135

136+
@Override
120137
public void addAll(Key key, List<Value> valueList) {
121138
for (Value value : valueList) {
122139
add(key, value);
123140
}
124141
}
125142

143+
@Override
126144
public void addFirst(Key key, Value value) {
127145
List<Value> values = get(key);
128146
if (values == null) {
@@ -133,6 +151,7 @@ public void addFirst(Key key, Value value) {
133151
}
134152
}
135153

154+
@Override
136155
public boolean equalsIgnoreValueOrder(MultivaluedMap<Key, Value> vmap) {
137156
if (this == vmap) {
138157
return true;
@@ -163,6 +182,7 @@ private List<Value> findKey(Key key) {
163182
return values;
164183
}
165184

185+
@Override
166186
@SuppressFBWarnings("CN_IDIOM_NO_SUPER_CALL")
167187
public MultiValuedTreeMap<Key, Value> clone() {
168188
MultiValuedTreeMap<Key, Value> clone = new MultiValuedTreeMap<>();

0 commit comments

Comments
 (0)