Skip to content

Commit 0110072

Browse files
authored
Updated JavaDoc to markdown format (#4498)
* Updated JavaDoc to markdown format * Fixed unused import warnings exposed by replacing JavaDocs * Fixed bad quote characters in the project * Fixed whitespace in markdown comments
1 parent 05e1095 commit 0110072

File tree

676 files changed

+123546
-112639
lines changed

Some content is hidden

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

676 files changed

+123546
-112639
lines changed

.github/workflows/scripts-android.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ name: Test Android build scripts
5858
# The token in secrets.CN1SS_GH_TOKEN was generated on
5959
# Oct 16th 2025. If in Oct 2026 builds start failing, it
6060
# means the token needs to be regenerated:
61-
# 1. Go to https://github.com/settings/tokens → “Developer settings” → “Personal access tokens.
61+
# 1. Go to https://github.com/settings/tokens -> "Developer settings" -> "Personal access tokens".
6262
# 2. Choose Fine-grained token (recommended).
6363
# 3. Grant:
64-
# Repository access select Codename One
65-
# Permissions:
66-
# Contents Read and Write
67-
# Pull requests Read and Write
68-
# Issues Read and Write
64+
# * Repository access -> select Codename One
65+
# * Permissions:
66+
# * Contents -> Read and Write
67+
# * Pull requests -> Read and Write
68+
# * Issues -> Read and Write
6969
# 4. Copy the generated token
7070
# 5. Go to https://github.com/codenameone/CodenameOne/settings/secrets/actions
7171
# and edit the CN1SS_GH_TOKEN to use the new token

CodenameOne/src/com/codename1/ads/AdsService.java

Lines changed: 25 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,22 @@
3232
import java.io.IOException;
3333
import java.io.InputStream;
3434

35-
/**
36-
* This is an abstract Ads Service.
37-
* Each supported Ad network needs to extend this Service and to implement
38-
* the initService method
39-
*
40-
* @author Chen Fishbein
41-
*/
35+
/// This is an abstract Ads Service.
36+
/// Each supported Ad network needs to extend this Service and to implement
37+
/// the initService method
38+
///
39+
/// @author Chen Fishbein
4240
public abstract class AdsService extends ConnectionRequest {
4341

4442
private static Class service = InnerActive.class;
4543
private String currentAd;
4644
private boolean initialized = false;
4745

48-
/**
49-
* Empty constructor
50-
*/
46+
/// Empty constructor
5147
protected AdsService() {
5248
}
5349

54-
/**
55-
* Creates a new AdsService to be used by the Ads Component
56-
*/
50+
/// Creates a new AdsService to be used by the Ads Component
5751
public static AdsService createAdsService() {
5852
try {
5953
return (AdsService) service.newInstance();
@@ -66,47 +60,37 @@ public static AdsService createAdsService() {
6660

6761
}
6862

69-
/**
70-
* Sets the provider of the ads service.
71-
*
72-
* @param provider this class needs to extend the AdsService class
73-
*/
63+
/// Sets the provider of the ads service.
64+
///
65+
/// #### Parameters
66+
///
67+
/// - `provider`: this class needs to extend the AdsService class
7468
public static void setAdsProvider(Class provider) {
7569
service = provider;
7670
}
7771

78-
/**
79-
* Initialize the ads service.
80-
*/
72+
/// Initialize the ads service.
8173
public void initialize(Ads adsComponent) {
8274
if (!initialized) {
8375
initService(adsComponent);
8476
initialized = true;
8577
}
8678
}
8779

88-
/**
89-
* init the service requests.
90-
*/
80+
/// init the service requests.
9181
public abstract void initService(Ads adsComponent);
9282

93-
/**
94-
* Returns the last requested ad
95-
*/
83+
/// Returns the last requested ad
9684
public String getCurrentAd() {
9785
return currentAd;
9886
}
9987

100-
/**
101-
* Schedule this service on the Network thread and executes the request
102-
*/
88+
/// Schedule this service on the Network thread and executes the request
10389
public void requestAd() {
10490
NetworkManager.getInstance().addToQueue(this);
10591
}
10692

107-
/**
108-
* {@inheritDoc}
109-
*/
93+
/// {@inheritDoc}
11094
@Override
11195
protected void readResponse(InputStream input) throws IOException {
11296
ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -124,35 +108,29 @@ protected void readResponse(InputStream input) throws IOException {
124108
}
125109
}
126110

127-
/**
128-
* This a callback method to inform to the service the Ad is displayed
129-
*
130-
* @param cmp
131-
*/
111+
/// This a callback method to inform to the service the Ad is displayed
112+
///
113+
/// #### Parameters
114+
///
115+
/// - `cmp`
132116
public void onAdDisplay(HTMLComponent cmp) {
133117
}
134118

135-
/**
136-
* {@inheritDoc}
137-
*/
119+
/// {@inheritDoc}
138120
@Override
139121
protected void handleErrorResponseCode(int code, String message) {
140122
//do nothing, ads failure should not interfere with application flow
141123
System.err.println("error=" + code + " " + message);
142124
}
143125

144-
/**
145-
* {@inheritDoc}
146-
*/
126+
/// {@inheritDoc}
147127
@Override
148128
protected void handleRuntimeException(RuntimeException err) {
149129
//do nothing, ads failure should not interfere with application flow
150130
err.printStackTrace();
151131
}
152132

153-
/**
154-
* {@inheritDoc}
155-
*/
133+
/// {@inheritDoc}
156134
@Override
157135
protected void handleException(Exception err) {
158136
//do nothing, ads failure should not interfere with application flow

CodenameOne/src/com/codename1/ads/InnerActive.java

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@
3030
import java.io.IOException;
3131
import java.io.InputStream;
3232

33-
/**
34-
* This is an Ad service implementation by InnerActive see:
35-
* http://console.inner-active.com/iamp/publisher/register?ref_id=affiliate_CodenameOne
36-
*
37-
* @author Chen
38-
*/
33+
/// This is an Ad service implementation by InnerActive see:
34+
/// http://console.inner-active.com/iamp/publisher/register?ref_id=affiliate_CodenameOne
35+
///
36+
/// @author Chen
3937
public class InnerActive extends AdsService { // PMD Fix: UnusedPrivateField removed obsolete field
4038

4139
private static final String protocolVersion = "Sm2m-1.5.3";
@@ -54,27 +52,25 @@ private static void addParam(ConnectionRequest req, String key, String val) {
5452
}
5553
}
5654

57-
/**
58-
* If true and no ads exists the network will return house holds ads
59-
*
60-
* @param test
61-
*/
55+
/// If true and no ads exists the network will return house holds ads
56+
///
57+
/// #### Parameters
58+
///
59+
/// - `test`
6260
public static void setTestAds(boolean test) {
6361
testAds = test;
6462
}
6563

66-
/**
67-
* Sets this ads type, by default this a banner type.
68-
*
69-
* @param banner sets the ads to banners or text ads
70-
*/
64+
/// Sets this ads type, by default this a banner type.
65+
///
66+
/// #### Parameters
67+
///
68+
/// - `banner`: sets the ads to banners or text ads
7169
public void setBanner(boolean banner) {
7270
this.banner = banner;
7371
}
7472

75-
/**
76-
* initialize the ads service
77-
*/
73+
/// initialize the ads service
7874
@Override
7975
public void initService(Ads ads) {
8076
this.os = Display.getInstance().getPlatformName();
@@ -164,9 +160,7 @@ public boolean equals(Object o) {
164160
(hid == null ? that.hid == null : hid.equals(that.hid));
165161
}
166162

167-
/**
168-
* {@inheritDoc}
169-
*/
163+
/// {@inheritDoc}
170164
@Override
171165
public int hashCode() {
172166
int result = super.hashCode();
@@ -177,9 +171,7 @@ public int hashCode() {
177171
return result;
178172
}
179173

180-
/**
181-
* {@inheritDoc}
182-
*/
174+
/// {@inheritDoc}
183175
@Override
184176
protected void readResponse(InputStream input) throws IOException {
185177
StringBuffer buf = new StringBuffer();
Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
/**
2-
* <p>
3-
* A legacy banner Ads API. This has been replaced by more modern approaches mainly thru <a
4-
* href="https://www.codenameone.com/cn1libs.html">cn1libs</a>.
5-
* </p>
6-
* <p>
7-
* Currently inner-active ads Network is supported
8-
* please refer to
9-
* <a href="http://console.inner-active.com/iamp/publisher/register?ref_id=affiliate_CodenameOne">inner-active</a>
10-
* for more information
11-
* </p>
12-
*/
1+
/// A legacy banner Ads API. This has been replaced by more modern approaches mainly thru [cn1libs](https://www.codenameone.com/cn1libs.html).
2+
///
3+
/// Currently inner-active ads Network is supported
4+
/// please refer to
5+
/// [inner-active](http://console.inner-active.com/iamp/publisher/register?ref_id=affiliate_CodenameOne)
6+
/// for more information
137
package com.codename1.ads;

0 commit comments

Comments
 (0)