Skip to content

Commit

Permalink
LPS-56835 Fix incorrect line breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
hhuijser authored and brianchandotcom committed Jul 8, 2015
1 parent 7187243 commit fd2e068
Show file tree
Hide file tree
Showing 28 changed files with 99 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,8 @@ public static Long[] getClassTypeIds(

Long[] classTypeIds = ArrayUtil.toArray(
StringUtil.split(
portletPreferences.getValue(
"classTypeIds" + className, null), 0L));
portletPreferences.getValue("classTypeIds" + className, null),
0L));

if (classTypeIds != null) {
return classTypeIds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ public DLEditFileEntryDisplayContext getDLEditFileEntryDisplayContext(
catch (PortalException pe) {
throw new SystemException(
"Unable to build GoogleDocsDLViewFileVersionDisplayContext " +
"for shortcut " + fileShortcut.getPrimaryKey(), pe);
"for shortcut " + fileShortcut.getPrimaryKey(),
pe);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public IGViewFileVersionDisplayContext getIGViewFileVersionDisplayContext(
catch (PortalException pe) {
throw new SystemException(
"Unable to build GoogleDocsDLViewFileVersionDisplayContext " +
"for shortcut " + fileShortcut.getPrimaryKey(), pe);
"for shortcut " + fileShortcut.getPrimaryKey(),
pe);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,9 @@ nameField, createValuesList("Paul", "Joe"),

Assert.assertEquals(
"Name_INSTANCE_rztm,Phone_INSTANCE_ovho,Phone_INSTANCE_krvx," +
"Name_INSTANCE_rght,Phone_INSTANCE_latb,Phone_INSTANCE_jewp," +
"Phone_INSTANCE_mkar", fieldsDisplayField.getValue());
"Name_INSTANCE_rght,Phone_INSTANCE_latb," +
"Phone_INSTANCE_jewp,Phone_INSTANCE_mkar",
fieldsDisplayField.getValue());
}
}

Expand Down Expand Up @@ -367,9 +368,8 @@ public void testConversionWithRepeatableField() throws Exception {

testField(
nameField, createValuesList("Name 1", "Name 2", "Name 3"),
createValuesList(
"Nome 1", "Nome 2", "Nome 3"), _availableLocales,
LocaleUtil.US);
createValuesList("Nome 1", "Nome 2", "Nome 3"),
_availableLocales, LocaleUtil.US);

Field fieldsDisplayField = fields.get(DDMImpl.FIELDS_DISPLAY_NAME);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ protected void initRegexps() {

regexps.put(
"(^|\\p{Punct}|\\p{Space})((\\p{Lu}\\p{Ll}+){2,})" +
"(\\z|\\n|\\p{Punct}|\\p{Space})", " [[$2]] ");
"(\\z|\\n|\\p{Punct}|\\p{Space})",
" [[$2]] ");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ protected void getFile(
catch (Exception e) {
_log.error(
"Error formatting the wiki page " + page.getPageId() +
" with the format " + page.getFormat(), e);
" with the format " + page.getFormat(),
e);
}

StringBundler sb = new StringBundler(17);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ protected void setRedirectAttribute(ActionRequest actionRequest) {
SessionMessages.add(
actionRequest,
PortalUtil.getPortletId(actionRequest) +
SessionMessages.KEY_SUFFIX_CLOSE_REDIRECT, closeRedirect);
SessionMessages.KEY_SUFFIX_CLOSE_REDIRECT,
closeRedirect);
}

actionRequest.setAttribute(WebKeys.REDIRECT, redirect);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ protected InetSocketAddress getConfiguredPortalInetSocketAddress(
catch (UnknownHostException uhe) {
throw new IllegalArgumentException(
"Unable to parse the portal instance host name and port from " +
portalInstanceInetSocketAddress, uhe);
portalInstanceInetSocketAddress,
uhe);
}

int port = -1;
Expand All @@ -385,7 +386,8 @@ protected InetSocketAddress getConfiguredPortalInetSocketAddress(
catch (NumberFormatException nfe) {
throw new IllegalArgumentException(
"Unable to parse portal InetSocketAddress port from " +
portalInstanceInetSocketAddress, nfe);
portalInstanceInetSocketAddress,
nfe);
}

return new InetSocketAddress(hostInetAddress, port);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ public void testMultipleModulesOutput() throws Exception {
assertContains("'foo@13.2.23': '/foo-13.2.23'", content);
assertContains(
"'foo/foo.es':{'dependencies':['exports','foo@13.2.23/fum.es'," +
"'jquery@2.15.3/jquery.js']}", content);
"'jquery@2.15.3/jquery.js']}",
content);
assertContains(
"'foo@13.2.23/foo.es':{'dependencies':['exports'," +
"'foo@13.2.23/fum.es','jquery@2.15.3/jquery.js']}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public void start(BundleContext bundleContext) throws Exception {
try {
_cxfConfiguration = configurationAdmin.createFactoryConfiguration(
"com.liferay.portal.cxf.common.configuration." +
"CXFEndpointPublisherConfiguration", null);
"CXFEndpointPublisherConfiguration",
null);

Dictionary<String, Object> properties = new Hashtable<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public Class<?> resolve(
if (className.startsWith(restrictedPackageName)) {
throw new TemplateException(
"Instantiating " + className + " is not allowed in the " +
"template for security reasons", environment);
"template for security reasons",
environment);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ public void testProcessTemplate2() throws Exception {
public void testProcessTemplate3() throws Exception {
Template template = new FreeMarkerTemplate(
new StringTemplateResource(
_WRONG_TEMPLATE_ID, _TEST_TEMPLATE_CONTENT), null, null,
_configuration, _templateContextHelper, false,
_WRONG_TEMPLATE_ID, _TEST_TEMPLATE_CONTENT),
null, null, _configuration, _templateContextHelper, false,
_freemarkerEngineConfiguration.resourceModificationCheck());

template.put(_TEST_KEY, _TEST_VALUE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ public void init() throws Exception {
_logger.log(
Logger.LOG_ERROR,
"Catastrophic initialization failure! Shutting down " +
_contextName + " WAB due to: " + e.getMessage(), e);
_contextName + " WAB due to: " + e.getMessage(),
e);

destroy();

Expand Down
3 changes: 2 additions & 1 deletion portal-impl/src/com/liferay/portal/dao/db/PostgreSQLDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ protected String reword(String data) throws IOException {

line = StringUtil.replace(
"alter table @table@ rename @old-column@ to " +
"@new-column@;", REWORD_TEMPLATE, template);
"@new-column@;",
REWORD_TEMPLATE, template);
}
else if (line.startsWith(ALTER_COLUMN_TYPE)) {
String[] template = buildColumnTypeTokens(line);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,8 @@ protected static Class<?> toClass(
return (Class<?>)_defineClassMethod.invoke(
classLoader,
StringUtil.replace(
classNode.name, CharPool.SLASH, CharPool.PERIOD), data, 0,
data.length);
classNode.name, CharPool.SLASH, CharPool.PERIOD),
data, 0, data.length);
}
catch (Exception e) {
throw new RuntimeException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ protected void deleteExportImportConfiguration(
else {
deleteExportImportConfigurationIds = StringUtil.split(
ParamUtil.getString(
actionRequest, "deleteExportImportConfigurationIds"), 0L);
actionRequest, "deleteExportImportConfigurationIds"),
0L);
}

List<TrashedModel> trashedModels = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,8 @@ public void updateRolePermissions(
actionRequest, "modelResource");
long[] roleIds = StringUtil.split(
ParamUtil.getString(
actionRequest, "rolesSearchContainerPrimaryKeys"), 0L);
actionRequest, "rolesSearchContainerPrimaryKeys"),
0L);

String selResource = PortletConstants.getRootPortletId(portletResource);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ public void addTrashSessionMessages(
SessionMessages.add(
actionRequest,
PortalUtil.getPortletId(actionRequest) +
SessionMessages.KEY_SUFFIX_DELETE_SUCCESS_DATA, data);
SessionMessages.KEY_SUFFIX_DELETE_SUCCESS_DATA,
data);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public void test2() throws Exception {
Template template = TemplateManagerUtil.getTemplate(
TemplateConstants.LANG_TYPE_FTL,
new StringTemplateResource(
"123.ftl", "<#if httpUtil??>FAIL<#else>PASS</#if>"), false);
"123.ftl", "<#if httpUtil??>FAIL<#else>PASS</#if>"),
false);

UnsyncStringWriter unsyncStringWriter = new UnsyncStringWriter();

Expand All @@ -90,7 +91,8 @@ public void test3() throws Exception {
Template template = TemplateManagerUtil.getTemplate(
TemplateConstants.LANG_TYPE_FTL,
new StringTemplateResource(
"123.ftl", "<#if !httpUtil??>PASS</#if>"), false);
"123.ftl", "<#if !httpUtil??>PASS</#if>"),
false);

UnsyncStringWriter unsyncStringWriter = new UnsyncStringWriter();

Expand All @@ -106,7 +108,8 @@ public void test4() throws Exception {
Template template = TemplateManagerUtil.getTemplate(
TemplateConstants.LANG_TYPE_FTL,
new StringTemplateResource(
"123.ftl", "<#if languageUtil??>PASS</#if>"), false);
"123.ftl", "<#if languageUtil??>PASS</#if>"),
false);

UnsyncStringWriter unsyncStringWriter = new UnsyncStringWriter();

Expand All @@ -122,7 +125,8 @@ public void test5() throws Exception {
Template template = TemplateManagerUtil.getTemplate(
TemplateConstants.LANG_TYPE_FTL,
new StringTemplateResource(
"123.ftl", "<#assign sum = (5 + 6)>${sum}"), false);
"123.ftl", "<#assign sum = (5 + 6)>${sum}"),
false);

UnsyncStringWriter unsyncStringWriter = new UnsyncStringWriter();

Expand Down Expand Up @@ -153,7 +157,8 @@ public void test7() throws Exception {
Template template = TemplateManagerUtil.getTemplate(
TemplateConstants.LANG_TYPE_VM,
new StringTemplateResource(
"123.vm", "#if ($httpUtil) FAIL #else PASS #end"), false);
"123.vm", "#if ($httpUtil) FAIL #else PASS #end"),
false);

UnsyncStringWriter unsyncStringWriter = new UnsyncStringWriter();

Expand Down Expand Up @@ -184,8 +189,8 @@ public void test8() throws Exception {
public void test9() throws Exception {
Template template = TemplateManagerUtil.getTemplate(
TemplateConstants.LANG_TYPE_VM,
new StringTemplateResource(
"123.vm", "#if ($languageUtil)PASS#end"), false);
new StringTemplateResource("123.vm", "#if ($languageUtil)PASS#end"),
false);

UnsyncStringWriter unsyncStringWriter = new UnsyncStringWriter();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public class SQLServerLimitStringUtilTest {
public void testInnerOrderBy() throws Exception {
String sql = SQLServerLimitStringUtil.getLimitString(
"SELECT articleId, userName FROM JournalArticle" +
" ORDER BY modifiedDate ASC", 10, 30);
" ORDER BY modifiedDate ASC",
10, 30);

Assert.assertTrue(sql.indexOf("30") > 0);
Assert.assertTrue(sql.indexOf("11") > 0);
Expand All @@ -37,7 +38,8 @@ public void testInnerOrderBy() throws Exception {
public void testNoInnerOrderBy() throws Exception {
String sql = SQLServerLimitStringUtil.getLimitString(
"SELECT articleId, userName FROM JournalArticle" +
" ORDER BY userName ASC", 10, 30);
" ORDER BY userName ASC",
10, 30);

Assert.assertTrue(sql.indexOf("30") > 0);
Assert.assertTrue(sql.indexOf("11") > 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public void testSelect() {

Collection<FabricAgent> fabricAgents = fabricAgentSelector.select(
new ArrayList<FabricAgent>(
Arrays.asList(fabricAgent1, fabricAgent2)), null);
Arrays.asList(fabricAgent1, fabricAgent2)),
null);

Assert.assertEquals(1, fabricAgents.size());

Expand All @@ -77,7 +78,8 @@ public void testSelect() {

fabricAgents = fabricAgentSelector.select(
new ArrayList<FabricAgent>(
Arrays.asList(fabricAgent1, fabricAgent2)), null);
Arrays.asList(fabricAgent1, fabricAgent2)),
null);

Assert.assertEquals(1, fabricAgents.size());

Expand All @@ -92,7 +94,8 @@ public void testSelect() {

fabricAgents = fabricAgentSelector.select(
new ArrayList<FabricAgent>(
Arrays.asList(fabricAgent1, fabricAgent2)), null);
Arrays.asList(fabricAgent1, fabricAgent2)),
null);

Assert.assertEquals(1, fabricAgents.size());

Expand All @@ -107,7 +110,8 @@ public void testSelect() {

fabricAgents = fabricAgentSelector.select(
new ArrayList<FabricAgent>(
Arrays.asList(fabricAgent1, fabricAgent2)), null);
Arrays.asList(fabricAgent1, fabricAgent2)),
null);

Assert.assertEquals(1, fabricAgents.size());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public void testSelect() {

Collection<FabricAgent> fabricAgents = fabricAgentSelector.select(
new ArrayList<FabricAgent>(
Arrays.asList(fabricAgent1, fabricAgent2)), null);
Arrays.asList(fabricAgent1, fabricAgent2)),
null);

Assert.assertEquals(1, fabricAgents.size());

Expand All @@ -77,7 +78,8 @@ public void testSelect() {

fabricAgents = fabricAgentSelector.select(
new ArrayList<FabricAgent>(
Arrays.asList(fabricAgent1, fabricAgent2)), null);
Arrays.asList(fabricAgent1, fabricAgent2)),
null);

Assert.assertEquals(1, fabricAgents.size());

Expand All @@ -92,7 +94,8 @@ public void testSelect() {

fabricAgents = fabricAgentSelector.select(
new ArrayList<FabricAgent>(
Arrays.asList(fabricAgent1, fabricAgent2)), null);
Arrays.asList(fabricAgent1, fabricAgent2)),
null);

Assert.assertEquals(1, fabricAgents.size());

Expand All @@ -107,7 +110,8 @@ public void testSelect() {

fabricAgents = fabricAgentSelector.select(
new ArrayList<FabricAgent>(
Arrays.asList(fabricAgent1, fabricAgent2)), null);
Arrays.asList(fabricAgent1, fabricAgent2)),
null);

Assert.assertEquals(1, fabricAgents.size());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,8 @@ protected ClassLoader getOperatingClassloader() {

Assert.assertEquals(
"Not registering SPI " + mockSPI1 + " because it duplicates " +
mockSPI1, logRecord.getMessage());
mockSPI1,
logRecord.getMessage());

// Duplicate register, without log

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ public void testDLFileEntryWithBrokenIndexer() throws Exception {

Assert.assertEquals(
"Search index is stale and contains entry {" + entryClassPK +
"}", logRecord.getMessage());
"}",
logRecord.getMessage());

Assert.assertEquals(
SearchTestUtil.ATTACHMENT_OWNER_CLASS_NAME,
Expand Down
Loading

0 comments on commit fd2e068

Please sign in to comment.