Skip to content

Commit

Permalink
Minor updates required by fixes in the consistency checker.
Browse files Browse the repository at this point in the history
Cherry picked: 0b71131
  • Loading branch information
thobe committed Dec 12, 2011
1 parent 5ed0f28 commit 6ec596f
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 3 deletions.
57 changes: 57 additions & 0 deletions kernel/src/main/java/org/neo4j/helpers/Args.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,61 @@ private void parseArgs( String[] args )
}
}
}

/* public void printUntouched( PrintStream out )
{
boolean first = true;
for ( Map.Entry<String, String> parameter : map.entrySet() )
{
if ( touchedParameters.contains( parameter ) ) continue;
if ( first )
{
first = false;
out.println( "Untouched parameters:" );
}
out.println( " " + parameter.getKey() + ":" + parameter.getValue() );
}
first = true;
for ( int i = 0; i < orphans.size(); i++ )
{
if ( touchedOrphans.get( i ) ) continue;
if ( first )
{
first = false;
out.println( "Untouched orphans:" );
}
out.println( "(" + i + "):" + orphans.get( i ) );
}
}
public Map<String, String> getUntouchedParameters()
{
return null;
}
public Iterable<String> getUntouchedOrphans()
{
return null;
}*/

public static String jarUsage( Class<?> main, String... params )
{
StringBuilder usage = new StringBuilder( "USAGE: java [-cp ...] " );
try
{
String jar = main.getProtectionDomain().getCodeSource().getLocation().getPath();
usage.append( "-jar " ).append( jar );
}
catch ( Exception ex )
{
// ignore
}
usage.append( main.getCanonicalName() );
for ( String param : params )
{
usage.append( ' ' ).append( param );
}
return usage.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ public String toString()
{
StringBuilder buf = new StringBuilder();
buf.append( "Property[" ).append( getId() ).append( ",used=" ).append( inUse() ).append( ",prev=" ).append(
prevProp ).append( ",next=" ).append( nextProp ).append( ", Value[" );
prevProp ).append( ",next=" ).append( nextProp );
if ( entityId != -1 ) buf.append( nodeIdSet ? ",node=" : ",rel=" ).append( entityId );
buf.append( ", Value[" );
Iterator<PropertyBlock> itr = blockRecords.iterator();
while ( itr.hasNext() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ public NeoStoreXaDataSource( Map<Object,Object> config ) throws IOException,
2 );
for ( TransactionInterceptorProvider provider : Service.load( TransactionInterceptorProvider.class ) )
{
Object conf = config.get( provider.getClass().getSimpleName()
+ "." + provider.name() );
Object conf = config.get( TransactionInterceptorProvider.class.getSimpleName() + "." + provider.name() );
if ( conf != null )
{
providers.add( Pair.of( provider, conf ) );
Expand Down

0 comments on commit 6ec596f

Please sign in to comment.