Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit f9f7a05

Browse files
committed
Fixed dereference
1 parent 3978e8e commit f9f7a05

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.kttdevelopment</groupId>
88
<artifactId>simplehttpserver</artifactId>
9-
<version>03.04.02</version>
9+
<version>03.04.03</version>
1010
<packaging>jar</packaging>
1111

1212
<url>https://github.com/Ktt-Development/simplehttpserver</url>

src/main/java/com/kttdevelopment/simplehttpserver/SimpleHttpServerImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @see SimpleHttpServer
1515
* @since 02.00.00
16-
* @version 03.04.00
16+
* @version 03.04.03
1717
* @author Ktt Development
1818
*/
1919
@SuppressWarnings("SpellCheckingInspection")
@@ -188,9 +188,9 @@ public synchronized final void removeContext(final HttpContext context){
188188

189189
@Override
190190
public final HttpHandler getContextHandler(final String path){
191-
for(final HttpContext context : contexts.keySet())
192-
if(context.getPath().equals(getContext(path)))
193-
return context.getHandler();
191+
for(final Map.Entry<HttpContext, HttpHandler> entry : contexts.entrySet())
192+
if(entry.getKey().getPath().equals(getContext(path)))
193+
return entry.getValue();
194194
return null;
195195
}
196196

src/main/java/com/kttdevelopment/simplehttpserver/SimpleHttpsServerImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @see SimpleHttpsServer
1515
* @since 03.04.00
16-
* @version 03.04.02
16+
* @version 03.04.03
1717
* @author Ktt Development
1818
*/
1919
final class SimpleHttpsServerImpl extends SimpleHttpsServer {
@@ -203,9 +203,9 @@ public synchronized final void removeContext(final HttpContext context){
203203

204204
@Override
205205
public final HttpHandler getContextHandler(final String path){
206-
for(final HttpContext context : contexts.keySet())
207-
if(context.getPath().equals(getContext(path)))
208-
return context.getHandler();
206+
for(final Map.Entry<HttpContext, HttpHandler> entry : contexts.entrySet())
207+
if(entry.getKey().getPath().equals(getContext(path)))
208+
return entry.getValue();
209209
return null;
210210
}
211211

0 commit comments

Comments
 (0)