Download
Magazine
Develop
Account
Download
Magazine
Develop
Login
Forgot Account/Password
Create Account
Language
Help
Language
Help
×
Login
Login Name
Password
×
Forgot Account/Password
Category:
Software
People
PersonalForge
Magazine
Wiki
Search
OSDN
>
Find Software
>
Communications
>
BBS
>
monalipse project
>
Ticket List/Search
>
Ticket #1073
monalipse project
Description
Project Summary
Developer Dashboard
Web Page
Developers
Image Gallery
List of RSS Feeds
Activity
Statistics
History
Downloads
List of Releases
Stats
Source Code
Code Repository list
CVS
View Repository
Ticket
Ticket List
Milestone List
Type List
Component List
List of frequently used tickets/RSS
Submit New Ticket
Documents
Communication
Forums
List of Forums
Help (1)
Open Discussion (8)
Mailing Lists
list of ML
News
Ticket #1073
Ticket List
Submit New Ticket
RSS
Date#parse を消すパッチ
Open Date:
2003-01-20 19:35
Last Update:
2003-01-21 12:56
monitor
ON
OFF
Reporter:
(Anonymous)
Owner:
(None)
Type:
Bugs
Status:
Open
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
1
Details
Reply
「メソッド parse(String) は型 Date で使用すべきではあり
ません。」がうざい方はどうぞ。
Ticket History (2/2 Histories)
2003-01-20 19:35
Updated by: None
File
302: dateparse.patch
is attached
2003-01-21 12:56
Updated by: None
Comment
Reply
Logged In: NO
すいません。
実行ファイルも黙ってしまいます。
修正パッチです。
Index: monalipse/server/LinkedObject.java
===================================================================
RCS file:
/cvsroot/monalipse/monalipse.plugin/src/monalipse/server/LinkedObject.java,v
retrieving revision 1.4
diff -u -r1.4 LinkedObject.java
--- monalipse/server/LinkedObject.java 21 Dec 2002
12:43:22 -0000 1.4
+++ monalipse/server/LinkedObject.java 21 Jan 2003 03:53:57
-0000
@@ -15,11 +15,14 @@
import java.net.SocketTimeoutException;
import java.net.URL;
import java.net.UnknownHostException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.logging.Logger;
@@ -29,6 +32,7 @@
import javax.imageio.stream.ImageInputStream;
import monalipse.MonalipsePlugin;
+
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.GetMethod;
import org.eclipse.core.resources.IFile;
@@ -219,12 +223,13 @@
out.close();
logger.finest("complete");
long mod = 0;
- try
- {
- mod =
Date.parse(get.getResponseHeader("Last-Modified").getValue());
- }
- catch (RuntimeException e)
- {
+ try {
+ String s =
get.getResponseHeader("Last-Modified").getValue();
+ DateFormat fmt = new SimpleDateFormat("EEE, d MMM
yyyy HH:mm:ss z", Locale.US);
+ Date d = fmt.parse(s);
+ mod = d.getTime();
+ } catch (Exception e) {
+ e.printStackTrace();
}
final long lastModified = mod;
final byte[] bytes = out.toByteArray();
Index: monalipse/server/giko/ThreadContentProvider.java
===================================================================
RCS file:
/cvsroot/monalipse/monalipse.plugin/src/monalipse/server/giko/ThreadContentProvider.java,v
retrieving revision 1.17
diff -u -r1.17 ThreadContentProvider.java
--- monalipse/server/giko/ThreadContentProvider.java 19 Jan
2003 15:26:47 -0000 1.17
+++ monalipse/server/giko/ThreadContentProvider.java 21 Jan
2003 03:53:59 -0000
@@ -14,10 +14,13 @@
import java.lang.reflect.InvocationTargetException;
import java.net.MalformedURLException;
import java.net.URL;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.logging.Logger;
import java.util.regex.Matcher;
@@ -883,12 +886,13 @@
contentRange = cin.getRange();
monitor.getRunner().run(null, this);
- try
- {
- serverTime =
Date.parse(method.getResponseHeader("Date").getValue()) / 1000;
- }
- catch (RuntimeException e)
- {
+ try {
+ String s = method.getResponseHeader("Date").getValue();
+ DateFormat fmt = new SimpleDateFormat("EEE, d MMM yyyy
HH:mm:ss z", Locale.US);
+ Date d = fmt.parse(s);
+ serverTime = d.getTime() / 1000;
+ } catch (Exception e) {
+ e.printStackTrace();
}
}
Attachment File List (
1
)
Attachment File List
dateparse.patch
(2KB)
Date#parse を消すパッチ
Edit
Add Comment
You are not logged in.
I you are not logged in, your comment will be treated as an anonymous post. »
Login
Add Comment
Preview
Submit
ません。」がうざい方はどうぞ。