You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2013/08/21 10:43:41 UTC

svn commit: r1516112 - /commons/proper/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java

Author: sebb
Date: Wed Aug 21 08:43:40 2013
New Revision: 1516112

URL: http://svn.apache.org/r1516112
Log:
Oops - remove debug accidentally committed as part of a different commit

Modified:
    commons/proper/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java

Modified: commons/proper/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java
URL: http://svn.apache.org/viewvc/commons/proper/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java?rev=1516112&r1=1516111&r2=1516112&view=diff
==============================================================================
--- commons/proper/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java (original)
+++ commons/proper/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java Wed Aug 21 08:43:40 2013
@@ -216,10 +216,7 @@ public final class EclipseJavaCompiler e
 
                 //log.debug("finding compoundTypeName=" + result.toString());
 
-                final String string = result.toString();
-                final NameEnvironmentAnswer findType = findType(string);
-                System.err.println("findType: "+string+" "+findType);
-                return findType;
+                return findType(result.toString());
             }
 
             public NameEnvironmentAnswer findType( final char[] pTypeName, final char[][] pPackageName ) {
@@ -308,7 +305,6 @@ public final class EclipseJavaCompiler e
                     } catch (final IOException ie) {
                         log.error("could not close input stream", ie);
                     } 
-                    System.err.println("isPackage1: " + pClazzName+ " false");
                     return false;
                 }
 
@@ -316,11 +312,9 @@ public final class EclipseJavaCompiler e
                 final String source = pClazzName.replace('.', '/') + ".java";
                 if (pReader.isAvailable(source)) {
                     log.debug("found the source " + source + " for " + pClazzName + " - no package ");
-                    System.err.println("isPackage2: " + source+ " false");
                     return false;
                 }
 
-                System.err.println("isPackage3: " + pClazzName+ " true");
                 return true;
             }
 
@@ -337,15 +331,11 @@ public final class EclipseJavaCompiler e
 
 //                log.debug("isPackage parentPackageName=" + result.toString() + " packageName=" + new String(packageName));
 
-                System.err.println(">>parentPackage: "+result.toString());
                 if (parentPackageName != null && parentPackageName.length > 0) {
                     result.append('.');
                 }
                 result.append(pPackageName);
-                final String string = result.toString();
-                final boolean is = isPackage(string);
-                System.err.println("<<ispackage: "+string+" => "+is);
-                return is;
+                return isPackage(result.toString());
             }
 
             public void cleanup() {



Re: svn commit: r1516112 - /commons/proper/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java

Posted by sebb <se...@gmail.com>.
On 21 August 2013 09:48, Benedikt Ritter <br...@apache.org> wrote:
> If you are using Eclipse you can use conditional breakpoints for debug
> logging.
> Simply write to System.err and then return false in the break point
> condition.
> Works pretty well for simple debug messages.

Thanks, I'll give that a try.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1516112 - /commons/proper/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java

Posted by Benedikt Ritter <br...@apache.org>.
If you are using Eclipse you can use conditional breakpoints for debug
logging.
Simply write to System.err and then return false in the break point
condition.
Works pretty well for simple debug messages.


2013/8/21 <se...@apache.org>

> Author: sebb
> Date: Wed Aug 21 08:43:40 2013
> New Revision: 1516112
>
> URL: http://svn.apache.org/r1516112
> Log:
> Oops - remove debug accidentally committed as part of a different commit
>
> Modified:
>
> commons/proper/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java
>
> Modified:
> commons/proper/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java
> URL:
> http://svn.apache.org/viewvc/commons/proper/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java?rev=1516112&r1=1516111&r2=1516112&view=diff
>
> ==============================================================================
> ---
> commons/proper/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java
> (original)
> +++
> commons/proper/jci/trunk/compilers/eclipse/src/main/java/org/apache/commons/jci/compilers/EclipseJavaCompiler.java
> Wed Aug 21 08:43:40 2013
> @@ -216,10 +216,7 @@ public final class EclipseJavaCompiler e
>
>                  //log.debug("finding compoundTypeName=" +
> result.toString());
>
> -                final String string = result.toString();
> -                final NameEnvironmentAnswer findType = findType(string);
> -                System.err.println("findType: "+string+" "+findType);
> -                return findType;
> +                return findType(result.toString());
>              }
>
>              public NameEnvironmentAnswer findType( final char[]
> pTypeName, final char[][] pPackageName ) {
> @@ -308,7 +305,6 @@ public final class EclipseJavaCompiler e
>                      } catch (final IOException ie) {
>                          log.error("could not close input stream", ie);
>                      }
> -                    System.err.println("isPackage1: " + pClazzName+ "
> false");
>                      return false;
>                  }
>
> @@ -316,11 +312,9 @@ public final class EclipseJavaCompiler e
>                  final String source = pClazzName.replace('.', '/') +
> ".java";
>                  if (pReader.isAvailable(source)) {
>                      log.debug("found the source " + source + " for " +
> pClazzName + " - no package ");
> -                    System.err.println("isPackage2: " + source+ " false");
>                      return false;
>                  }
>
> -                System.err.println("isPackage3: " + pClazzName+ " true");
>                  return true;
>              }
>
> @@ -337,15 +331,11 @@ public final class EclipseJavaCompiler e
>
>  //                log.debug("isPackage parentPackageName=" +
> result.toString() + " packageName=" + new String(packageName));
>
> -                System.err.println(">>parentPackage: "+result.toString());
>                  if (parentPackageName != null && parentPackageName.length
> > 0) {
>                      result.append('.');
>                  }
>                  result.append(pPackageName);
> -                final String string = result.toString();
> -                final boolean is = isPackage(string);
> -                System.err.println("<<ispackage: "+string+" => "+is);
> -                return is;
> +                return isPackage(result.toString());
>              }
>
>              public void cleanup() {
>
> --
> http://people.apache.org/~britter/
> http://www.systemoutprintln.de/
> http://twitter.com/BenediktRitter
> http://github.com/britter
>