Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf37c1c4

Browse files
committed
Run pgjindent for Java folks.
1 parentb4295d0 commitf37c1c4

File tree

71 files changed

+8890
-8017
lines changed

Some content is hidden

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

71 files changed

+8890
-8017
lines changed

‎src/interfaces/jdbc/example/Unicode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public void runTest()
233233
catch (ClassNotFoundExceptioncnfe)
234234
{
235235
log("Unable to load driver",cnfe);
236-
return;
236+
return;
237237
}
238238
try
239239
{

‎src/interfaces/jdbc/example/basic.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/*
88
*
9-
* $Id: basic.java,v 1.12 2002/07/23 03:59:54 barry Exp $
9+
* $Id: basic.java,v 1.13 2002/09/06 21:23:05 momjian Exp $
1010
*
1111
* This example tests the basic components of the JDBC driver, and shows
1212
* how even the simplest of queries can be implemented.
@@ -137,6 +137,7 @@ public void doexample() throws SQLException
137137
// result if you don't know what column number a value is in
138138

139139

140+
140141
System.out.println("performing another query");
141142
rs =st.executeQuery("select * from basic where b>1");
142143
if (rs !=null)
@@ -164,6 +165,7 @@ public void doexample() throws SQLException
164165
// Now test maxrows by setting it to 3 rows
165166

166167

168+
167169
st.setMaxRows(3);
168170
System.out.println("performing a query limited to " +st.getMaxRows());
169171
rs =st.executeQuery("select a, b from basic");

‎src/interfaces/jdbc/example/corba/StockClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* It has no GUI, just a text frontend to keep it simple.
1111
*
12-
* $Id: StockClient.java,v 1.5 2001/11/1923:19:20 momjian Exp $
12+
* $Id: StockClient.java,v 1.6 2002/09/06 21:23:05 momjian Exp $
1313
*/
1414
publicclassStockClient
1515
{
@@ -35,14 +35,14 @@ public StockClient(String[] args)
3535
if (nameServiceObj ==null)
3636
{
3737
System.err.println("nameServiceObj == null");
38-
return;
38+
return;
3939
}
4040

4141
nameService =org.omg.CosNaming.NamingContextHelper.narrow(nameServiceObj);
4242
if (nameService ==null)
4343
{
4444
System.err.println("nameService == null");
45-
return;
45+
return;
4646
}
4747

4848
// Resolve the dispenser
@@ -53,7 +53,7 @@ public StockClient(String[] args)
5353
if (dispenser ==null)
5454
{
5555
System.err.println("dispenser == null");
56-
return;
56+
return;
5757
}
5858

5959
// Now run the front end.

‎src/interfaces/jdbc/example/corba/StockDispenserImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/*
66
* This class implements the server side of the example.
77
*
8-
* $Id: StockDispenserImpl.java,v 1.4 2001/11/1923:19:20 momjian Exp $
8+
* $Id: StockDispenserImpl.java,v 1.5 2002/09/06 21:23:05 momjian Exp $
99
*/
1010
publicclassStockDispenserImplextendsstock._StockDispenserImplBase
1111
{
@@ -67,11 +67,11 @@ public void releaseItem(stock.StockItem item) throws stock.StockException
6767
{
6868
stock[i].inUse =false;
6969
System.out.println("Releasing slot " +i);
70-
return;
70+
return;
7171
}
7272
}
7373
System.out.println("Reserved object not a member of this dispenser");
74-
return;
74+
return;
7575
}
7676

7777
/*

‎src/interfaces/jdbc/example/corba/StockServer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/*
66
* This class implements the server side of the example.
77
*
8-
* $Id: StockServer.java,v 1.4 2001/11/1923:19:20 momjian Exp $
8+
* $Id: StockServer.java,v 1.5 2002/09/06 21:23:05 momjian Exp $
99
*/
1010
publicclassStockServer
1111
{
@@ -29,14 +29,14 @@ public static void main(String[] args)
2929
if (nameServiceObj ==null)
3030
{
3131
System.err.println("nameServiceObj = null");
32-
return;
32+
return;
3333
}
3434

3535
org.omg.CosNaming.NamingContextnameService =org.omg.CosNaming.NamingContextHelper.narrow(nameServiceObj);
3636
if (nameService ==null)
3737
{
3838
System.err.println("nameService = null");
39-
return;
39+
return;
4040
}
4141

4242
// bind the dispenser into the naming service

‎src/interfaces/jdbc/example/psql.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void processLine(String line) throws SQLException
8282
if (line.startsWith("\\"))
8383
{
8484
processSlashCommand(line);
85-
return;
85+
return;
8686
}
8787

8888
booleantype =st.execute(line);

‎src/interfaces/jdbc/org/postgresql/Driver.java.in

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public class Driver implements java.sql.Driver
3131

3232
public static final int DEBUG = 2;
3333
public static final int INFO = 1;
34-
public static boolean logDebug = false;
35-
public static boolean logInfo = false;
34+
public static boolean logDebug = false;
35+
public static boolean logInfo = false;
3636

3737
static
3838
{
@@ -70,11 +70,11 @@ public class Driver implements java.sql.Driver
7070
* to/from the database to unicode. If multibyte is enabled on the
7171
* server then the character set of the database is used as the default,
7272
* otherwise the jvm character encoding is used as the default.
73-
* loglevel - (optional) Enable logging of messages from the driver.
74-
*The value is an integer from 1 to 2 where:
75-
* INFO = 1, DEBUG = 2
76-
*The output is sent to DriverManager.getPrintWriter() if set,
77-
*otherwise it is sent to System.out.
73+
* loglevel - (optional) Enable logging of messages from the driver.
74+
*The value is an integer from 1 to 2 where:
75+
* INFO = 1, DEBUG = 2
76+
*The output is sent to DriverManager.getPrintWriter() if set,
77+
*otherwise it is sent to System.out.
7878
* compatible - (optional) This is used to toggle
7979
* between different functionality as it changes across different releases
8080
* of the jdbc driver code. The values here are versions of the jdbc
@@ -109,20 +109,23 @@ public class Driver implements java.sql.Driver
109109
{
110110
if ((props = parseURL(url, info)) == null)
111111
{
112-
if (Driver.logDebug) Driver.debug("Error in url" + url);
112+
if (Driver.logDebug)
113+
Driver.debug("Error in url" + url);
113114
return null;
114115
}
115116
try
116117
{
117-
if (Driver.logDebug) Driver.debug("connect " + url);
118+
if (Driver.logDebug)
119+
Driver.debug("connect " + url);
118120

119121
@JDBCCONNECTCLASS@ con = (@JDBCCONNECTCLASS@)(Class.forName("@JDBCCONNECTCLASS@").newInstance());
120122
con.openConnection (host(), port(), props, database(), url, this);
121123
return (java.sql.Connection)con;
122124
}
123125
catch (ClassNotFoundException ex)
124126
{
125-
if (Driver.logDebug) Driver.debug("error", ex);
127+
if (Driver.logDebug)
128+
Driver.debug("error", ex);
126129
throw new PSQLException("postgresql.jvm.version", ex);
127130
}
128131
catch (PSQLException ex1)
@@ -133,7 +136,8 @@ public class Driver implements java.sql.Driver
133136
}
134137
catch (Exception ex2)
135138
{
136-
if (Driver.logDebug) Driver.debug("error", ex2);
139+
if (Driver.logDebug)
140+
Driver.debug("error", ex2);
137141
throw new PSQLException("postgresql.unusual", ex2);
138142
}
139143
}
@@ -177,7 +181,7 @@ public class Driver implements java.sql.Driver
177181
*/
178182
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
179183
{
180-
//This method isn't really implemented
184+
//This method isn't really implemented
181185
Properties p = parseURL(url, info);
182186
return new DriverPropertyInfo[0];
183187
}
@@ -385,16 +389,16 @@ public class Driver implements java.sql.Driver
385389
}
386390

387391
/**
388-
*used to turn logging on to a certain level, can be called
392+
*used to turn logging on to a certain level, can be called
389393
*by specifying fully qualified class ie org.postgresql.Driver.setLogLevel()
390394
*@param int logLevel sets the level which logging will respond to
391-
*INFO being almost no messages
395+
*INFO being almost no messages
392396
*DEBUG most verbose
393397
*/
394398
public static void setLogLevel(int logLevel)
395399
{
396-
logDebug = (logLevel >= DEBUG) ? true : false;
397-
logInfo = (logLevel >= INFO) ? true : false;
400+
logDebug = (logLevel >= DEBUG) ? true : false;
401+
logInfo = (logLevel >= INFO) ? true : false;
398402
}
399403
/*
400404
* logging message at the debug level
@@ -441,7 +445,7 @@ public class Driver implements java.sql.Driver
441445
}
442446
}
443447

444-
//The build number should be incremented for every new build
445-
private static int m_buildNumber = 104;
448+
//The build number should be incremented for every new build
449+
private static int m_buildNumber = 104;
446450

447451
}

‎src/interfaces/jdbc/org/postgresql/PGConnection.java

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -7,74 +7,74 @@
77
importorg.postgresql.fastpath.Fastpath;
88
importorg.postgresql.largeobject.LargeObjectManager;
99

10-
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Attic/PGConnection.java,v 1.2 2002/09/02 03:07:36 barry Exp $
10+
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Attic/PGConnection.java,v 1.3 2002/09/06 21:23:05 momjian Exp $
1111
* This interface defines PostgreSQL extentions to the java.sql.Connection interface.
12-
* Any java.sql.Connection object returned by the driver will also implement this
12+
* Any java.sql.Connection object returned by the driver will also implement this
1313
* interface
1414
*/
1515
publicinterfacePGConnection
1616
{
17-
/*
18-
* Get the character encoding to use for this connection.
19-
*/
20-
publicEncodinggetEncoding()throwsSQLException;
17+
/*
18+
* Get the character encoding to use for this connection.
19+
*/
20+
publicEncodinggetEncoding()throwsSQLException;
2121

22-
/*
23-
* This method returns the java.sql.Types type for a postgres datatype name
24-
*/
25-
publicintgetSQLType(StringpgTypeName)throwsSQLException;
22+
/*
23+
* This method returns the java.sql.Types type for a postgres datatype name
24+
*/
25+
publicintgetSQLType(StringpgTypeName)throwsSQLException;
2626

27-
/*
28-
* This returns the java.sql.Types type for a postgres datatype OID
29-
*/
30-
publicintgetSQLType(intoid)throwsSQLException;
27+
/*
28+
* This returns the java.sql.Types type for a postgres datatype OID
29+
*/
30+
publicintgetSQLType(intoid)throwsSQLException;
3131

32-
/*
33-
* This returns the postgres datatype name from the
34-
* postgres datatype OID
35-
*/
36-
publicStringgetPGType(intoid)throwsSQLException;
32+
/*
33+
* This returns the postgres datatype name from the
34+
* postgres datatype OID
35+
*/
36+
publicStringgetPGType(intoid)throwsSQLException;
3737

38-
/*
39-
* This returns the postgres datatype OID from the
40-
* postgres datatype name
41-
*/
42-
publicintgetPGType(StringtypeName)throwsSQLException;
38+
/*
39+
* This returns the postgres datatype OID from the
40+
* postgres datatype name
41+
*/
42+
publicintgetPGType(StringtypeName)throwsSQLException;
4343

44-
/*
45-
* This returns the LargeObject API for the current connection.
46-
*/
47-
publicLargeObjectManagergetLargeObjectAPI()throwsSQLException;
44+
/*
45+
* This returns the LargeObject API for the current connection.
46+
*/
47+
publicLargeObjectManagergetLargeObjectAPI()throwsSQLException;
4848

49-
/*
50-
* This returns the Fastpath API for the current connection.
51-
*/
52-
publicFastpathgetFastpathAPI()throwsSQLException;
49+
/*
50+
* This returns the Fastpath API for the current connection.
51+
*/
52+
publicFastpathgetFastpathAPI()throwsSQLException;
5353

54-
/*
55-
* This method is used internally to return an object based around
56-
* org.postgresql's more unique data types.
57-
*
58-
* <p>It uses an internal Hashtable to get the handling class. If the
59-
* type is not supported, then an instance of org.postgresql.util.PGobject
60-
* is returned.
61-
*
62-
* You can use the getValue() or setValue() methods to handle the returned
63-
* object. Custom objects can have their own methods.
64-
*
65-
* @return PGobject for this type, and set to value
66-
* @exception SQLException if value is not correct for this type
67-
* @see org.postgresql.util.Serialize
68-
*/
69-
publicObjectgetObject(Stringtype,Stringvalue)throwsSQLException;
54+
/*
55+
* This method is used internally to return an object based around
56+
* org.postgresql's more unique data types.
57+
*
58+
* <p>It uses an internal Hashtable to get the handling class. If the
59+
* type is not supported, then an instance of org.postgresql.util.PGobject
60+
* is returned.
61+
*
62+
* You can use the getValue() or setValue() methods to handle the returned
63+
* object. Custom objects can have their own methods.
64+
*
65+
* @return PGobject for this type, and set to value
66+
* @exception SQLException if value is not correct for this type
67+
* @see org.postgresql.util.Serialize
68+
*/
69+
publicObjectgetObject(Stringtype,Stringvalue)throwsSQLException;
7070

7171

72-
/*
73-
* This method returns any notifications that have been received
74-
* since the last call to this method.
75-
* Returns null if there have been no notifications.
76-
*/
77-
publicPGNotification[]getNotifications();
72+
/*
73+
* This method returns any notifications that have been received
74+
* since the last call to this method.
75+
* Returns null if there have been no notifications.
76+
*/
77+
publicPGNotification[]getNotifications();
7878

7979

8080
}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
packageorg.postgresql;
22

33

4-
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Attic/PGNotification.java,v 1.1 2002/09/02 03:07:36 barry Exp $
4+
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Attic/PGNotification.java,v 1.2 2002/09/06 21:23:05 momjian Exp $
55
* This interface defines PostgreSQL extention for Notifications
66
*/
77
publicinterfacePGNotification
88
{
9-
/*
10-
* Returns name of this notification
11-
*/
12-
publicStringgetName();
9+
/*
10+
* Returns name of this notification
11+
*/
12+
publicStringgetName();
1313

14-
/*
15-
* Returns the process id of the backend process making this notification
16-
*/
17-
publicintgetPID();
14+
/*
15+
* Returns the process id of the backend process making this notification
16+
*/
17+
publicintgetPID();
1818

1919
}
2020

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp