Skip to content

Commit 54d5042

Browse files
committed
update javadoc comments
1 parent 7334420 commit 54d5042

File tree

10 files changed

+33
-21
lines changed

10 files changed

+33
-21
lines changed

src/main/java/com/tagtraum/perf/gcviewer/ctrl/GCModelLoaderGroupTracker.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*/
1414
public interface GCModelLoaderGroupTracker extends PropertyChangeListener {
1515
/**
16+
* @param listener The PropertyChangeListener to be added
1617
* @see java.beans.PropertyChangeSupport#addPropertyChangeListener(java.beans.PropertyChangeListener)
1718
*/
1819
void addPropertyChangeListener(PropertyChangeListener listener);
@@ -36,6 +37,7 @@ public interface GCModelLoaderGroupTracker extends PropertyChangeListener {
3637
void propertyChange(PropertyChangeEvent evt);
3738

3839
/**
40+
* @param listener The PropertyChangeListener to be removed
3941
* @see java.beans.PropertyChangeSupport#removePropertyChangeListener(java.beans.PropertyChangeListener)
4042
*/
4143
void removePropertyChangeListener(PropertyChangeListener listener);

src/main/java/com/tagtraum/perf/gcviewer/ctrl/impl/ViewMenuController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class ViewMenuController implements ActionListener, PropertyChangeListene
2424
private GCViewerGui gui;
2525

2626
/**
27-
* @param gui
27+
* @param gui gui to listen for actions
2828
*/
2929
public ViewMenuController(GCViewerGui gui) {
3030
this.gui = gui;

src/main/java/com/tagtraum/perf/gcviewer/imp/AbstractDataReaderSun.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ public abstract class AbstractDataReaderSun extends AbstractDataReader {
5555
protected GcLogType gcLogType;
5656

5757
/**
58-
* Create an instance of this class passing an inputStream an the type of the logfile.
58+
* Create an instance of this class passing an inputStream and the type of the logfile.
59+
*
60+
* @param gcResource information about the resource to be parsed
5961
* @param in inputstream to the log file
6062
* @param gcLogType type of the logfile
6163
* @throws UnsupportedEncodingException if ASCII is not supported

src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderFacade.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public GCModel loadModel(GCResource gcResource) throws DataReaderException {
8585
*
8686
* @param gcResource the {@link GcResourceSeries} to load
8787
* @return a {@link GCModel} containing all events found in the given {@link GCResource}s that were readable
88-
* @throws DataReaderException
88+
* @throws DataReaderException thrown in case of some parser failure
8989
*/
9090
protected GCModel loadModelFromSeries(GcResourceSeries gcResource) throws DataReaderException {
9191
GcSeriesLoader seriesLoader = new GcSeriesLoader(this);
@@ -106,12 +106,12 @@ private GCModel readModel(GcResourceFile gcResource) throws IOException {
106106
InputStream in = null;
107107
try {
108108
if (url.getProtocol().startsWith("http")) {
109-
AtomicLong cl = new AtomicLong();
109+
AtomicLong atomicContentLength = new AtomicLong();
110110
URLConnection conn = url.openConnection();
111111
in = HttpUrlConnectionHelper.openInputStream((HttpURLConnection) conn,
112112
HttpUrlConnectionHelper.GZIP,
113-
cl);
114-
contentLength = cl.get();
113+
atomicContentLength);
114+
contentLength = atomicContentLength.get();
115115
}
116116
else {
117117
in = url.openStream();

src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderIBMi5OS1_4_2.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ public class DataReaderIBMi5OS1_4_2 extends AbstractDataReader {
2727

2828
/**
2929
* Constructor for the IBM i5/OS GC reader.
30+
* @param gcResource information about the resource to be parsed
3031
* @param in InputStream delivering the GC data
31-
* @throws UnsupportedEncodingException
32+
* @throws UnsupportedEncodingException thrown in case the desired encoding is not supported
3233
*/
3334
public DataReaderIBMi5OS1_4_2(GCResource gcResource, InputStream in) throws UnsupportedEncodingException {
3435
super(gcResource, in);

src/main/java/com/tagtraum/perf/gcviewer/model/AbstractGCEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ public String toString() {
669669
* <li><code>GC</code>: just the name of the event type</li>
670670
* <li><code>PAUSE</code>: length of a pause</li>
671671
* <li><code>DURATION</code>: cycle time of a (usually concurrent) event</li>
672-
* <li><code>MEMORY</code>: information about heap changes</li></li>
672+
* <li><code>MEMORY</code>: information about heap changes</li>
673673
* <li><code>REGION</code>: information about number of regions used (only G1 up to now)</li>
674674
* </ul>
675675
*/

src/main/java/com/tagtraum/perf/gcviewer/util/HttpUrlConnectionHelper.java

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,14 @@ private static String readAndCloseErrorStream(InputStream in,
9696
/**
9797
* Sets request properties, connects and opens the input stream depending on the HTTP response.
9898
*
99-
* @param httpConn The HTTP connection
100-
* @param acceptEncoding Content-encoding (gzip,defate or null)
99+
* @param httpConn The HTTP connection
100+
* @param acceptEncoding Content-encoding (gzip, deflate or null)
101+
* @param contentLength length of content (output parameter)
101102
* @return The input stream
102103
* @throws IOException if problem occured.
103104
*/
104-
public static InputStream openInputStream(HttpURLConnection httpConn,
105-
String acceptEncoding,
106-
AtomicLong cl)
107-
throws IOException {
105+
public static InputStream openInputStream(HttpURLConnection httpConn, String acceptEncoding, AtomicLong contentLength)
106+
throws IOException {
108107

109108
// set request properties
110109
httpConn.setRequestProperty(ACCEPT_ENCODING, acceptEncoding);
@@ -113,20 +112,20 @@ public static InputStream openInputStream(HttpURLConnection httpConn,
113112
// from here we're reading the server's response
114113
String contentEncoding = httpConn.getContentEncoding();
115114
String contentType = httpConn.getContentType();
116-
long contentLength = httpConn.getContentLengthLong();
115+
long contentLengthLong = httpConn.getContentLengthLong();
117116
long lastModified = httpConn.getLastModified();
118-
LOGGER.log(Level.INFO, "Reading " + (contentLength < 0L
117+
LOGGER.log(Level.INFO, "Reading " + (contentLengthLong < 0L
119118
? "?"
120-
: Long.toString(contentLength) ) + " bytes from " + httpConn.getURL() +
119+
: Long.toString(contentLengthLong) ) + " bytes from " + httpConn.getURL() +
121120
"; contentType = " + contentType +
122121
"; contentEncoding = " + contentEncoding +
123122
"; last modified = " + (lastModified <= 0L ? "-" : new Date(lastModified).toString()));
124123

125124
final int responseCode = httpConn.getResponseCode();
126125
if (responseCode/100 == 2) {
127-
if (cl != null) {
126+
if (contentLength != null) {
128127
// abuse of AtomicLong, but I need a pointer to long (or FileInformation)
129-
cl.set(contentLength);
128+
contentLength.set(contentLengthLong);
130129
}
131130
} else {
132131
String responseMessage = httpConn.getResponseMessage();

src/main/java/com/tagtraum/perf/gcviewer/view/GCViewerGuiMenuBar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public void addToWindowMenuGroup(JCheckBoxMenuItem menuItem) {
120120

121121
/**
122122
* Remove a menuItem from the window menu including removal of the group.
123-
* @param menuItem
123+
* @param menuItem menuItem to be removed
124124
*/
125125
public void removeFromWindowMenuGroup(JMenuItem menuItem) {
126126
windowMenu.remove(menuItem);

src/main/java/com/tagtraum/perf/gcviewer/view/StayOpenCheckBoxMenuItem.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,41 +38,50 @@ public StayOpenCheckBoxMenuItem() {
3838
}
3939

4040
/**
41+
* @param a action, where properties are taken from to create MenuItem
4142
* @see JCheckBoxMenuItem#JCheckBoxMenuItem(Action)
4243
*/
4344
public StayOpenCheckBoxMenuItem(Action a) {
4445
super(a);
4546
}
4647

4748
/**
49+
* @param icon icon for menu item
4850
* @see JCheckBoxMenuItem#JCheckBoxMenuItem(Icon)
4951
*/
5052
public StayOpenCheckBoxMenuItem(Icon icon) {
5153
super(icon);
5254
}
5355

5456
/**
57+
* @param text text for menu item
5558
* @see JCheckBoxMenuItem#JCheckBoxMenuItem(String)
5659
*/
5760
public StayOpenCheckBoxMenuItem(String text) {
5861
super(text);
5962
}
6063

6164
/**
65+
* @param text text for menu item
66+
* @param selected initial state of checkbox
6267
* @see JCheckBoxMenuItem#JCheckBoxMenuItem(String, boolean)
6368
*/
6469
public StayOpenCheckBoxMenuItem(String text, boolean selected) {
6570
super(text, selected);
6671
}
6772

6873
/**
74+
* @param text text for menu item
75+
* @param icon icon for menu item
6976
* @see JCheckBoxMenuItem#JCheckBoxMenuItem(String, Icon)
7077
*/
7178
public StayOpenCheckBoxMenuItem(String text, Icon icon) {
7279
super(text, icon);
7380
}
7481

7582
/**
83+
* @param text text for menu item
84+
* @param selected initial state for checkbox
7685
* @see JCheckBoxMenuItem#JCheckBoxMenuItem(String, Icon, boolean)
7786
*/
7887
public StayOpenCheckBoxMenuItem(String text, Icon icon, boolean selected) {

src/main/java/com/tagtraum/perf/gcviewer/view/model/GCResourceGroup.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
/**
1818
* <p>Holds a group of resource names (those displayed in the same GCDocument).</p>
19-
* <p>
2019
* <p>This class was refactored from "URLSet".</p>
2120
*
2221
* @author <a href="mailto:gcviewer@gmx.ch">Joerg Wuethrich</a>

0 commit comments

Comments
 (0)