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

Commit ea0f2d7

Browse files
authored
Change package-private constructors to protected constructors
* Update SimpleHttpServer.java * Update SimpleHttpExchange.java * Update SimpleHttpsServer.java * Update pom.xml * update javadoc +typos * typos * fix indent Co-authored-by: Katsute <[email protected]>
1 parent aad1086 commit ea0f2d7

File tree

7 files changed

+21
-11
lines changed

7 files changed

+21
-11
lines changed

.github/release-drafter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ categories:
1414
- "documentation"
1515
- "website"
1616
- title: "❌ Removed"
17+
labels:
1718
- "depreciated"
1819
- title: "🐞 Bug Fixes"
1920
labels:

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.00</version>
9+
<version>03.04.01</version>
1010
<packaging>jar</packaging>
1111

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

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
package com.kttdevelopment.simplehttpserver;
22

3+
import com.sun.net.httpserver.HttpExchange;
4+
35
import java.util.HashMap;
46

57
/**
68
* A session keeps track of a single client across multiple exchanges. This is typically used for login persistence.
79
*
810
* @since 02.00.00
9-
* @version 02.00.00
11+
* @version 03.04.01
1012
* @author Ktt Development
1113
*/
1214
public abstract class HttpSession {
1315

1416
static final HashMap<String,HttpSession> sessions = new HashMap<>();
1517

1618
/**
17-
* Creates an empty {@link HttpSession}. Applications don't use this method.
19+
* Creates an empty {@link HttpSession}. Sessions are usually created by {@link HttpSessionHandler#getSession(HttpExchange)}.
1820
*
1921
* @since 02.00.00
2022
* @author Ktt Development
2123
*/
22-
HttpSession(){ }
24+
protected HttpSession(){ }
2325

2426
//
2527

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public final HttpSession getSession(final HttpExchange exchange){
7777
final String sessionId;
7878
final HttpSession session;
7979

80+
@SuppressWarnings("SpellCheckingInspection")
8081
final String rcookies = exchange.getRequestHeaders().getFirst("Cookie");
8182
final Map<String,String> cookies = new HashMap<>();
8283

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public abstract class SimpleHttpExchange {
5959
* @since 02.00.00
6060
* @author Ktt Development
6161
*/
62-
SimpleHttpExchange() { }
62+
protected SimpleHttpExchange() { }
6363

6464
//
6565

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,23 @@
1717
* @see SimpleHttpsServer
1818
* @see SimpleHttpHandler
1919
* @since 02.00.00
20-
* @version 03.04.00
20+
* @version 03.04.01
2121
* @author Ktt Development
2222
*/
2323
@SuppressWarnings("SpellCheckingInspection")
2424
public abstract class SimpleHttpServer {
2525

2626
/**
27-
* Create an empty {@link SimpleHttpServer}. Applications don't use this method.
27+
* Creates an empty {@link SimpleHttpServer}. Server is created using {@link #create()}, {@link #create(int)}, or {@link #create(int, int)}.
2828
*
29+
* @see #create()
30+
* @see #create(int)
31+
* @see #create(int, int)
2932
* @see SimpleHttpServerImpl#createHttpServer(Integer, Integer)
3033
* @since 02.00.00
3134
* @author Ktt Development
3235
*/
33-
SimpleHttpServer(){ }
36+
protected SimpleHttpServer(){ }
3437

3538
//
3639

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,22 @@
1515
* @see SimpleHttpServer
1616
* @see SimpleHttpHandler
1717
* @since 02.00.00
18-
* @version 03.04.00
18+
* @version 03.04.01
1919
* @author Ktt Development
2020
*/
2121
public abstract class SimpleHttpsServer extends SimpleHttpServer {
2222

2323
/**
24-
* Create an empty {@link SimpleHttpsServer}. Applications don't use this method.
24+
* Creates an empty {@link SimpleHttpsServer}. Server is created using {@link #create()}, {@link #create(int)}, or {@link #create(int, int)}.
2525
*
26+
* @see #create()
27+
* @see #create(int)
28+
* @see #create(int, int)
2629
* @see SimpleHttpsServerImpl#createSimpleHttpsServer(Integer, Integer)
2730
* @since 02.00.00
2831
* @author Ktt Development
2932
*/
30-
SimpleHttpsServer(){ }
33+
protected SimpleHttpsServer(){ }
3134

3235
//
3336

0 commit comments

Comments
 (0)