diff options
| author | Tom Tromey <tromey@redhat.com> | 2003-04-19 21:14:05 +0000 |
|---|---|---|
| committer | Tom Tromey <tromey@redhat.com> | 2003-04-19 21:14:05 +0000 |
| commit | e35c51f1cdf543bd208d1fa69b3af32750790a6a (patch) | |
| tree | 7f0f68add1c8f4f9d728a0a8c7ada579263c8c1a /java/sql | |
| parent | a00414523d0313541f8bc2bd8f415efc3c7f3f0d (diff) | |
| download | classpath-e35c51f1cdf543bd208d1fa69b3af32750790a6a.tar.gz | |
* java/sql/Timestamp.java: Formatting fix.
* java/sql/Time.java: Formatting fixes.
* java/sql/DriverManager.java: Formatting fix.
* java/sql/Date.java: Formatting fixes.
Diffstat (limited to 'java/sql')
| -rw-r--r-- | java/sql/Date.java | 28 | ||||
| -rw-r--r-- | java/sql/DriverManager.java | 7 | ||||
| -rw-r--r-- | java/sql/Time.java | 29 | ||||
| -rw-r--r-- | java/sql/Timestamp.java | 6 |
4 files changed, 40 insertions, 30 deletions
diff --git a/java/sql/Date.java b/java/sql/Date.java index 1ba21a190..67d5eb7af 100644 --- a/java/sql/Date.java +++ b/java/sql/Date.java @@ -1,5 +1,5 @@ /* Date.java -- Wrapper around java.util.Date - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -88,7 +88,8 @@ public class Date extends java.util.Date * @throws IllegalArgumentException when it's called. * @deprecated */ - public int getHours() throws IllegalArgumentException { + public int getHours() throws IllegalArgumentException + { throw new IllegalArgumentException(); } @@ -98,7 +99,8 @@ public class Date extends java.util.Date * @throws IllegalArgumentException when it's called. * @deprecated */ - public int getMinutes() throws IllegalArgumentException { + public int getMinutes() throws IllegalArgumentException + { throw new IllegalArgumentException(); } @@ -108,7 +110,8 @@ public class Date extends java.util.Date * @throws IllegalArgumentException when it's called. * @deprecated */ - public int getSeconds() throws IllegalArgumentException { + public int getSeconds() throws IllegalArgumentException + { throw new IllegalArgumentException(); } @@ -118,7 +121,8 @@ public class Date extends java.util.Date * @throws IllegalArgumentException when it's called. * @deprecated */ - public void setHours(int newValue) throws IllegalArgumentException { + public void setHours(int newValue) throws IllegalArgumentException + { throw new IllegalArgumentException(); } @@ -128,7 +132,8 @@ public class Date extends java.util.Date * @throws IllegalArgumentException when it's called. * @deprecated */ - public void setMinutes(int newValue) throws IllegalArgumentException { + public void setMinutes(int newValue) throws IllegalArgumentException + { throw new IllegalArgumentException(); } @@ -138,7 +143,8 @@ public class Date extends java.util.Date * @throws IllegalArgumentException when it's called. * @deprecated */ - public void setSeconds(int newValue) throws IllegalArgumentException { + public void setSeconds(int newValue) throws IllegalArgumentException + { throw new IllegalArgumentException(); } @@ -157,12 +163,10 @@ public class Date extends java.util.Date { java.util.Date d = (java.util.Date) sdf.parseObject(str); - if (d == null) { + if (d == null) throw new IllegalArgumentException(str); - } - else { - return(new Date(d.getTime())); - } + else + return new Date(d.getTime()); } catch (ParseException e) { diff --git a/java/sql/DriverManager.java b/java/sql/DriverManager.java index f022758d3..649c5ae73 100644 --- a/java/sql/DriverManager.java +++ b/java/sql/DriverManager.java @@ -1,5 +1,5 @@ /* DriverManager.java -- Manage JDBC drivers - Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -103,7 +103,10 @@ public class DriverManager { Class.forName(driver_classname); // The driver registers itself } - catch (Exception e) { ; } // Ignore not founds + catch (Exception e) + { + // Ignore not founds + } } } diff --git a/java/sql/Time.java b/java/sql/Time.java index ca1510bf1..9200ee3ca 100644 --- a/java/sql/Time.java +++ b/java/sql/Time.java @@ -1,5 +1,5 @@ /* Time.java -- Wrapper around java.util.Date - Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -62,7 +62,8 @@ public class Time extends java.util.Date * @throws IllegalArgumentException when it's called. * @deprecated */ - public int getDate() throws IllegalArgumentException { + public int getDate() throws IllegalArgumentException + { throw new IllegalArgumentException(); } @@ -72,7 +73,8 @@ public class Time extends java.util.Date * @throws IllegalArgumentException when it's called. * @deprecated */ - public int getDay() throws IllegalArgumentException { + public int getDay() throws IllegalArgumentException + { throw new IllegalArgumentException(); } @@ -82,7 +84,8 @@ public class Time extends java.util.Date * @throws IllegalArgumentException when it's called. * @deprecated */ - public int getMonth() throws IllegalArgumentException { + public int getMonth() throws IllegalArgumentException + { throw new IllegalArgumentException(); } @@ -92,7 +95,8 @@ public class Time extends java.util.Date * @throws IllegalArgumentException when it's called. * @deprecated */ - public int getYear() throws IllegalArgumentException { + public int getYear() throws IllegalArgumentException + { throw new IllegalArgumentException(); } @@ -102,7 +106,8 @@ public class Time extends java.util.Date * @throws IllegalArgumentException when it's called. * @deprecated */ - public void setDate(int newValue) throws IllegalArgumentException { + public void setDate(int newValue) throws IllegalArgumentException + { throw new IllegalArgumentException(); } @@ -112,7 +117,8 @@ public class Time extends java.util.Date * @throws IllegalArgumentException when it's called. * @deprecated */ - public void setMonth(int newValue) throws IllegalArgumentException { + public void setMonth(int newValue) throws IllegalArgumentException + { throw new IllegalArgumentException(); } @@ -122,7 +128,8 @@ public class Time extends java.util.Date * @throws IllegalArgumentException when it's called. * @deprecated */ - public void setYear(int newValue) throws IllegalArgumentException { + public void setYear(int newValue) throws IllegalArgumentException + { throw new IllegalArgumentException(); } @@ -141,12 +148,10 @@ public class Time extends java.util.Date { java.util.Date d = (java.util.Date) sdf.parseObject(str); - if (d == null) { + if (d == null) throw new IllegalArgumentException(str); - } - else { + else return new Time(d.getTime()); - } } catch (ParseException e) { diff --git a/java/sql/Timestamp.java b/java/sql/Timestamp.java index 6177b5b17..b5f0523df 100644 --- a/java/sql/Timestamp.java +++ b/java/sql/Timestamp.java @@ -83,12 +83,10 @@ public class Timestamp extends java.util.Date { Date d = (Date) parse_sdf.parseObject(str); - if (d == null) { + if (d == null) throw new IllegalArgumentException(str); - } - else { + else return new Timestamp(d.getTime()); - } } catch (ParseException e) { |
