Revision: 463
http://svn.sourceforge.net/japi/?rev=463&view=rev
Author: christianhujer
Date: 2007-06-30 01:56:52 -0700 (Sat, 30 Jun 2007)
Log Message:
-----------
Added some missing @NotNull / @Nullable annotations.
Modified Paths:
--------------
tools/cstyle/trunk/src/net/sf/japi/cstyle/CStyle.java
Modified: tools/cstyle/trunk/src/net/sf/japi/cstyle/CStyle.java
===================================================================
--- tools/cstyle/trunk/src/net/sf/japi/cstyle/CStyle.java 2007-06-30 08:54:18 UTC (rev 462)
+++ tools/cstyle/trunk/src/net/sf/japi/cstyle/CStyle.java 2007-06-30 08:56:52 UTC (rev 463)
@@ -86,7 +86,7 @@
* @param filename Name of the file to read from.
* @throws IOException In case of I/O problems.
*/
- public void check(final String filename) throws IOException {
+ public void check(@NotNull final String filename) throws IOException {
check(new File(filename));
}
@@ -94,7 +94,7 @@
* @param file File to read from.
* @throws IOException In case of I/O problems.
*/
- public void check(final File file) throws IOException {
+ public void check(@NotNull final File file) throws IOException {
final InputStream in = new FileInputStream(file);
try {
check(in);
@@ -107,7 +107,7 @@
* @param stream Stream to read from.
* @throws IOException In case of I/O problems.
*/
- public void check(final InputStream stream) throws IOException {
+ public void check(@NotNull final InputStream stream) throws IOException {
final BufferedReader in = new BufferedReader(new InputStreamReader(stream, encoding));
check(in);
}
@@ -116,7 +116,7 @@
* @param in Reader to read from.
* @throws IOException In case of I/O problems.
*/
- public void check(final Reader in) throws IOException {
+ public void check(@NotNull final Reader in) throws IOException {
physicalMode = PhysicalMode.NORMAL;
for (int c; (c = in.read()) != -1;) {
parse((char) c);
@@ -194,8 +194,14 @@
assert false;
}
// Step 2: Tokenize
- switch (physicalMode) {
- case NORMAL:
+ if (physicalMode == PhysicalMode.NORMAL && previousPhysicalMode == PhysicalMode.NORMAL) {
+ currentToken.append(c);
+ // tokens to detect:
+ // keyword
+ // symbol
+ // operator
+ // literal
+ // separator
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|