Skip to content

Commit

Permalink
Further code review
Browse files Browse the repository at this point in the history
  • Loading branch information
ajs6f committed Oct 30, 2016
1 parent 334bf48 commit 237d338
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public abstract class AbstractTestPeekInputStream extends BaseTest
@Test public void unread3()
{
PeekInputStream in = make("") ;
in.readByte() ;
/* int ch = */ in.readByte() ;
assertEquals(-1, in.peekByte()) ;
in.pushbackByte('a') ;
contains(in, "a") ;
Expand All @@ -161,7 +161,7 @@ public abstract class AbstractTestPeekInputStream extends BaseTest
@Test public void unread4()
{
PeekInputStream in = make("") ;
in.readByte() ;
/* int ch = */ in.readByte() ;
assertEquals(-1, in.peekByte()) ;
in.pushbackByte('0') ;
in.pushbackByte('1') ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ else if ( WebContent.isMultiPartForm(ct) )
datasetPath = DataAccessPoint.canonical(datasetName) ;
}
action.log.info(format("[%d] Create database : name = %s", action.id, datasetPath)) ;
// System.err.println("'"+datasetPath+"'") ;
// DataAccessPointRegistry.get().forEach((s,dap)->System.err.println("'"+s+"'"));
// ---- Check whether it already exists
if ( action.getDataAccessPointRegistry().isRegistered(datasetPath) )
// And abort.
Expand Down Expand Up @@ -250,14 +248,14 @@ protected JsonValue execPostItem(HttpAction action) {
//dSrv.activate() ;
} else if ( s.equalsIgnoreCase("offline") ) {
action.log.info(format("[%d] OFFLINE DATASET %s", action.id, name)) ;
DataAccessPoint access = action.getDataAccessPoint() ;
//DataAccessPoint access = action.getDataAccessPoint() ;
//access.goOffline() ;
dSrv.goOffline() ; // Affects the target of the name.
setDatasetState(name, FusekiVocab.stateOffline) ;
//dSrv.offline() ;
} else if ( s.equalsIgnoreCase("unlink") ) {
action.log.info(format("[%d] UNLINK ACCESS NAME %s", action.id, name)) ;
DataAccessPoint access = action.getDataAccessPoint() ;
//DataAccessPoint access = action.getDataAccessPoint() ;
ServletOps.errorNotImplemented("unlink: dataset"+action.getDatasetName());
//access.goOffline() ;
// Registry?
Expand All @@ -267,11 +265,11 @@ protected JsonValue execPostItem(HttpAction action) {
return null ;
}

private void assemblerFromBody(HttpAction action, StreamRDF dest) {
private static void assemblerFromBody(HttpAction action, StreamRDF dest) {
bodyAsGraph(action, dest) ;
}

private void assemblerFromForm(HttpAction action, StreamRDF dest) {
private static void assemblerFromForm(HttpAction action, StreamRDF dest) {
String dbType = action.getRequest().getParameter(paramDatasetType) ;
String dbName = action.getRequest().getParameter(paramDatasetName) ;
if ( StringUtils.isBlank(dbType) || StringUtils.isBlank(dbName) )
Expand All @@ -297,7 +295,7 @@ private void assemblerFromForm(HttpAction action, StreamRDF dest) {
RDFDataMgr.parse(dest, new StringReader(template), "http://base/", Lang.TTL) ;
}

private void assemblerFromUpload(HttpAction action, StreamRDF dest) {
private static void assemblerFromUpload(HttpAction action, StreamRDF dest) {
Upload.fileUploadWorker(action, dest);
}

Expand Down Expand Up @@ -361,7 +359,7 @@ protected void execDeleteItem(HttpAction action) {
}

// Persistent state change.
private void setDatasetState(String name, Resource newState) {
private static void setDatasetState(String name, Resource newState) {
boolean committed = false ;
system.begin(ReadWrite.WRITE) ;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ protected String validatorName() {
return "RDF Data" ;
}

// Error handler that records messages
/**
* Error handler that records messages.
*/
@SuppressWarnings("unused")
private static class ErrorHandlerMsg implements ErrorHandler
{
Expand Down

0 comments on commit 237d338

Please sign in to comment.