Bug 3642 - 2001.09.15 build does not compile in JDK1.2; dependency on JDK1.3
Summary: 2001.09.15 build does not compile in JDK1.2; dependency on JDK1.3
Status: CLOSED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-16 09:48 UTC by khammond25
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
Patch for UrlConfig.java; file contains the diff (769 bytes, patch)
2001-09-16 11:14 UTC, khammond25
Details | Diff
Patch for MainFrame.java; file contains the diff (663 bytes, patch)
2001-09-16 12:14 UTC, khammond25
Details | Diff
Patch for HtmlParser.java; file contains the diff (2.22 KB, patch)
2001-09-17 05:50 UTC, khammond25
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description khammond25 2001-09-16 09:48:30 UTC
As of the 2001.09.15 nightly build
==================================

According to the documentation 
(http://jakarta.apache.org/jmeter/installing.html), JMeter runs in a Java 1.2 
environment.

JMeter currently depends on JDK 1.3 for the following reasons:

1. File: org.apache.gui.MainFrame.java 
   Method: addThemAll()
   Introduced: File Version 1.7 

This method calls JSplitPane.setResizeWeight(double), which is a new method in 
JDK 1.3.

2. File: org.apache.protocol.http.parser.HtmlParser.java
   Method: createUrlFromAnchor(String, URL)
   Introduced: File Version 1.8

This method calls URL.getPath(), which is a new method in JDK 1.3.

3. File: org.apache.protocol.http.config.UrlConfig.java
   Method: parseArguments(String)
   Introduced: File Version 1.19

This method calls URLDecoder.decode(String). In JDK 1.2, the decode() method 
has a throws clause: "throws Exception". In JDK 1.3, the method does not have a 
throws clause. So, in order to be JDK 1.2 compliant, we need to add a try/catch 
around the method call.  

FYI: Looking at the source code, I see two places where runtime exceptions can 
be thrown.  First, an IllegalArgumentException is thrown if the URL-encoded 
value is an invalid hex number. Second, the method has a call to String.getBytes
(String), which throws an UnsupportedEncodingException if the named encoding 
(in this case, 8859_1) is not supported.
Comment 1 khammond25 2001-09-16 11:14:18 UTC
Created attachment 556 [details]
Patch for UrlConfig.java; file contains the diff
Comment 2 khammond25 2001-09-16 12:14:37 UTC
Created attachment 557 [details]
Patch for MainFrame.java; file contains the diff
Comment 3 khammond25 2001-09-17 05:50:55 UTC
Created attachment 559 [details]
Patch for HtmlParser.java; file contains the diff
Comment 4 khammond25 2001-09-17 05:55:58 UTC
With the three patches I have attached, the code (up to 2001.09.15 nightly 
build) now compiles and runs in JDK1.2! Let's be careful so that we do not 
introduce any more JDK1.3+ functionality.
Comment 5 khammond25 2001-09-27 23:12:18 UTC
Bug fixed 2001.09.27.
Comment 6 Jordi Salvat i Alabart 2002-12-27 16:14:30 UTC
Marking all bugs RESOLVED before JMeter 1.8's release date as VERIFIED.
Yes, it's pretty poor QA procedure, but there's bugs here lingering since JMeter
1.6, and we need to clean up a little.
Comment 7 Jordi Salvat i Alabart 2002-12-29 14:19:43 UTC
Bulk-closing all bugs RESOLVED before JMeter 1.8 release date.
Comment 8 The ASF infrastructure team 2022-09-24 20:37:26 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/765