Skip to content

Commit

Permalink
Fixed javadoc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
torakiki committed Oct 25, 2014
1 parent 6ffaade commit 3e36c7f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public boolean isFallback() {

/**
* @param footprint
* @param the
* module requesting
* @param module
* the module requesting
* @return a request to set the destination for the task to the given file
*/
public static SetDestinationRequest requestDestination(File footprint, String module) {
Expand All @@ -59,8 +59,8 @@ public static SetDestinationRequest requestDestination(File footprint, String mo

/**
* @param footprint
* @param the
* module requesting
* @param module
* the module requesting
* @return a request to set the destination as fallback for the task to the given file
*/
public static SetDestinationRequest requestFallbackDestination(File footprint, String module) {
Expand Down
19 changes: 9 additions & 10 deletions pdfsam-gui/src/main/java/org/pdfsam/ui/log/TextAreaAppender.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

import javafx.application.Platform;

import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;

Expand All @@ -42,21 +41,21 @@
import ch.qos.logback.core.AppenderBase;

/**
* A Logback appender that dispatch the log event as a {@link LogMessageEvent} after the message has been formatted.
* A Logback appender appending log messages to a {@link LogListView}.
*
* @author Andrea Vacondio
*
*/
@Named
public class TextAreaAppender extends AppenderBase<ILoggingEvent> {

@Inject
private LogListView logListView;
private PatternLayoutEncoder encoder;
@Inject
public LogListView logListView;

@PostConstruct
public void init() {
@Inject
TextAreaAppender(LogListView logListView, PatternLayoutEncoder encoder) {
this.logListView = logListView;
this.encoder = encoder;
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
encoder.setContext(loggerContext);
encoder.start();
Expand Down Expand Up @@ -84,10 +83,10 @@ private void doAppendMessage(String message, ILoggingEvent event) {
logListView.appendLog(LogLevel.toLogLevel(event.getLevel().toInt()), scanner.nextLine());
}
}
if (event.getLevel().isGreaterOrEqual(Level.ERROR)) {
eventStudio().broadcast(new ErrorLoggedEvent());
}
});
if (event.getLevel().isGreaterOrEqual(Level.ERROR)) {
Platform.runLater(() -> eventStudio().broadcast(new ErrorLoggedEvent()));
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class TextAreaAppenderTest {
static class Config {
@Bean
public TextAreaAppender victim() {
return new TextAreaAppender();
return new TextAreaAppender(view(), encoder());
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public void close() {
* Request to load a collection of documents
*
* @param event
* @throws InterruptedException
*/
@EventListener
public void request(PdfLoadRequestEvent<? extends PdfDocumentDescriptor> event) {
Expand Down

0 comments on commit 3e36c7f

Please sign in to comment.