List of usage examples for java.lang InternalError InternalError
public InternalError(Throwable cause)
From source file:com.hadoop.compression.fourmc.zstd.ZstdStreamDecompressor.java
public synchronized int decompress(byte[] b, int off, int len) throws IOException { if (b == null) { throw new NullPointerException(); }/* ww w . jav a 2 s. com*/ if (off < 0 || len < 0 || off > b.length - len) { throw new ArrayIndexOutOfBoundsException(); } int numBytes = 0; numBytes = oBuff.remaining(); if (numBytes > 0) { numBytes = Math.min(numBytes, len); ((ByteBuffer) oBuff).get(b, off, numBytes); return numBytes; } // Check if there is data to decompress. When an end of frame is reached, decompress shall not call // decompressStream without initStream. if (srcPos < iBuffLen || (iBuffLen == toRead && !finished)) { // Re-initialize the ZstdStream's output direct-buffer oBuff.rewind(); oBuff.limit(oBuffSize); dstPos = 0; // Decompress data, all the input should be consumed toRead = decompressStream(dStream, oBuff, oBuffSize, iBuff, iBuffLen); if (Zstd.isError(toRead)) { throw new InternalError("ZSTD decompressStream failed, due to: " + Zstd.getErrorName(toRead)); } // If toRead is 0, then we have finished decoding a frame. Finished should be set to true. finished = toRead == 0; // Check if all data in iBuff is consumed. if (srcPos >= iBuffLen) { srcPos = 0; iBuffLen = 0; iBuff.clear(); // toRead being 1 is a special case, meaning: // 1. zstd really need another one byte. // 2. zstd don't flush all the data into oBuff when oBuff is small. // When all the input is consumed and dstPos > 0, then toRead = 1 only happens in case 2. // This exception will be eliminated in later versions of zstd(>1.0.0). The following line then can // be safely removed or kept untouched as it will not be triggered. toRead = (toRead == 1 && dstPos != 0) ? 0 : toRead; } // Read most iBuffSize, works even for skippable frame(toRead can be any sizes between 1 to 4GB-1 // in a skippable frame) toRead = Math.min(toRead, iBuffSize); numBytes = oBuffLen; oBuff.limit(numBytes); // Return atmost 'len' bytes numBytes = Math.min(numBytes, len); ((ByteBuffer) oBuff).get(b, off, numBytes); } return numBytes; }
From source file:com.clustercontrol.accesscontrol.dialog.SystemPrivilegeDialog.java
/** * ????//from ww w. ja va 2 s . co m * * @param parent ? * * @see com.clustercontrol.dialog.CommonDialog#customizeDialog(org.eclipse.swt.widgets.Composite) */ @Override protected void customizeDialog(Composite parent) { Shell shell = this.getShell(); // shell.setText(Messages.getString("dialog.accesscontrol.system.privilege.setting")); // ?? RoleInfo info = null; try { AccessEndpointWrapper wrapper = AccessEndpointWrapper.getWrapper(this.managerName); info = wrapper.getRoleInfo(this.roleId); } catch (InvalidRole_Exception e) { MessageDialog.openInformation(null, Messages.getString("message"), Messages.getString("message.accesscontrol.16")); throw new InternalError(e.getMessage()); } catch (Exception e) { m_log.warn("customizeDialog(), " + e.getMessage(), e); MessageDialog.openError(null, Messages.getString("failed"), Messages.getString("message.hinemos.failure.unexpected") + ", " + HinemosMessage.replace(e.getMessage())); throw new InternalError(e.getMessage()); } // GridLayout layout = new GridLayout(1, true); layout.marginWidth = 10; layout.marginHeight = 10; layout.numColumns = WIDTH; parent.setLayout(layout); /* * ?? */ // Label label = new Label(parent, SWT.NONE); WidgetTestUtil.setTestId(this, null, label); GridData gridData = new GridData(); gridData.horizontalSpan = WIDTH; gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; label.setLayoutData(gridData); label.setText(Messages.getString("role.name") + " : " + info.getRoleName()); /* * ?? */ Composite compositeNotRole = new Composite(parent, SWT.NONE); WidgetTestUtil.setTestId(this, "all", compositeNotRole); layout = new GridLayout(1, true); layout.numColumns = 1; compositeNotRole.setLayout(layout); gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.verticalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; gridData.grabExcessVerticalSpace = true; gridData.horizontalSpan = 6; gridData.verticalSpan = 2; compositeNotRole.setLayoutData(gridData); // ? label = new Label(compositeNotRole, SWT.NONE); WidgetTestUtil.setTestId(this, "systemprivilegelist", label); gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; label.setLayoutData(gridData); label.setText(Messages.getString("SystemPrivilegeDialog.not_role_system_privilege")); // ? this.listNotRoleSystemPrivilege = new List(compositeNotRole, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL); WidgetTestUtil.setTestId(this, "all", listNotRoleSystemPrivilege); gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; gridData.heightHint = this.listNotRoleSystemPrivilege.getItemHeight() * 12; this.listNotRoleSystemPrivilege.setLayoutData(gridData); /* * ?? */ Composite compositeButton = new Composite(parent, SWT.NONE); WidgetTestUtil.setTestId(this, "button", compositeButton); layout = new GridLayout(1, true); layout.numColumns = 1; compositeButton.setLayout(layout); gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.verticalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; gridData.grabExcessVerticalSpace = true; gridData.horizontalSpan = 3; compositeButton.setLayoutData(gridData); // label = new Label(compositeButton, SWT.NONE); WidgetTestUtil.setTestId(this, "blank", label); gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; label.setLayoutData(gridData); // ? Label dummy = new Label(compositeButton, SWT.NONE); WidgetTestUtil.setTestId(this, "dummy", dummy); this.buttonRoleSystemPrivilege = this.createButton(compositeButton, Messages.getString("SystemPrivilegeDialog.role_system_privilege_button")); WidgetTestUtil.setTestId(this, "assign", buttonRoleSystemPrivilege); this.buttonRoleSystemPrivilege.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { String[] items = listNotRoleSystemPrivilege.getSelection(); for (String item : items) { listNotRoleSystemPrivilege.remove(item); listRoleSystemPrivilege.add(item); } } }); // ? dummy = new Label(compositeButton, SWT.NONE); WidgetTestUtil.setTestId(this, "notrolesystemprivilege", dummy); this.buttonNotRoleSystemPrivilege = this.createButton(compositeButton, Messages.getString("SystemPrivilegeDialog.not_role_system_privilege_button")); WidgetTestUtil.setTestId(this, "unassign", buttonNotRoleSystemPrivilege); this.buttonNotRoleSystemPrivilege.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { String[] items = listRoleSystemPrivilege.getSelection(); for (String item : items) { listRoleSystemPrivilege.remove(item); listNotRoleSystemPrivilege.add(item); } } }); // dummy = new Label(compositeButton, SWT.NONE); WidgetTestUtil.setTestId(this, "buttonsortfunction", dummy); this.buttonSortFunction = this.createButton(compositeButton, Messages.getString("SystemPrivilegeDialog.sort_function_button")); WidgetTestUtil.setTestId(this, "sortfunction", buttonSortFunction); this.buttonSortFunction.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { listRoleSystemPrivilege = sortFunctionPrivilege(listRoleSystemPrivilege, true); listNotRoleSystemPrivilege = sortFunctionPrivilege(listNotRoleSystemPrivilege, true); } }); // ? dummy = new Label(compositeButton, SWT.NONE); WidgetTestUtil.setTestId(this, "buttonsortrole", dummy); this.buttonSortRole = this.createButton(compositeButton, Messages.getString("SystemPrivilegeDialog.sort_privilege_button")); WidgetTestUtil.setTestId(this, "sortrole", buttonSortRole); this.buttonSortRole.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { listRoleSystemPrivilege = sortFunctionPrivilege(listRoleSystemPrivilege, false); listNotRoleSystemPrivilege = sortFunctionPrivilege(listNotRoleSystemPrivilege, false); } }); // label = new Label(compositeButton, SWT.NONE); WidgetTestUtil.setTestId(this, null, label); gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; label.setLayoutData(gridData); /* * ?? */ Composite compositeRole = new Composite(parent, SWT.NONE); WidgetTestUtil.setTestId(this, null, compositeRole); layout = new GridLayout(1, true); layout.numColumns = 1; compositeRole.setLayout(layout); gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.verticalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; gridData.grabExcessVerticalSpace = true; gridData.horizontalSpan = 6; gridData.verticalSpan = 2; compositeRole.setLayoutData(gridData); // ? label = new Label(compositeRole, SWT.NONE); WidgetTestUtil.setTestId(this, "systemprivilege", label); gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; label.setLayoutData(gridData); label.setText(Messages.getString("SystemPrivilegeDialog.role_system_privilege")); // ? this.listRoleSystemPrivilege = new List(compositeRole, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL); WidgetTestUtil.setTestId(this, null, listRoleSystemPrivilege); gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; gridData.heightHint = this.listRoleSystemPrivilege.getItemHeight() * 12; this.listRoleSystemPrivilege.setLayoutData(gridData); // ? // ???????????????????? shell.pack(); shell.setSize(new Point(550, shell.getSize().y)); // ?? Display display = shell.getDisplay(); shell.setLocation((display.getBounds().width - shell.getSize().x) / 2, (display.getBounds().height - shell.getSize().y) / 2); this.setInputData(this.managerName, info); }
From source file:org.apache.tajo.master.exec.DDLExecutor.java
public void createIndex(final QueryContext queryContext, final CreateIndexNode createIndexNode) throws DuplicateIndexException, UndefinedTableException, UndefinedDatabaseException { String databaseName, simpleIndexName, qualifiedIndexName; if (IdentifierUtil.isFQTableName(createIndexNode.getIndexName())) { String[] splits = IdentifierUtil.splitFQTableName(createIndexNode.getIndexName()); databaseName = splits[0];//w w w . ja v a2 s. c om simpleIndexName = splits[1]; qualifiedIndexName = createIndexNode.getIndexName(); } else { databaseName = queryContext.getCurrentDatabase(); simpleIndexName = createIndexNode.getIndexName(); qualifiedIndexName = IdentifierUtil.buildFQName(databaseName, simpleIndexName); } if (catalog.existIndexByName(databaseName, simpleIndexName)) { throw new DuplicateIndexException(simpleIndexName); } ScanNode scanNode = PlannerUtil.findTopNode(createIndexNode, NodeType.SCAN); if (scanNode == null) { throw new InternalError("Cannot find the table of the relation"); } IndexDesc indexDesc = new IndexDesc(databaseName, IdentifierUtil.extractSimpleName(scanNode.getTableName()), simpleIndexName, createIndexNode.getIndexPath(), createIndexNode.getKeySortSpecs(), createIndexNode.getIndexMethod(), createIndexNode.isUnique(), false, scanNode.getLogicalSchema()); catalog.createIndex(indexDesc); LOG.info("Index " + qualifiedIndexName + " is created for the table " + scanNode.getTableName() + "."); }
From source file:com.clustercontrol.agent.ReceiveTopic.java
public void releaseLatch() { if (countDownLatch == null) { m_log.info("latch is null"); throw new InternalError("CountDownLatch is null"); }/*from ww w. ja v a2s. c o m*/ countDownLatch.countDown(); }
From source file:org.shredzone.cilla.plugin.social.manager.SocialHandlerInvoker.java
/** * URL encodes the given string, using utf-8 encoding. * <p>/*from ww w. j a v a2s. c o m*/ * This is just a wrapper of {@link URLEncoder#encode(String, String)} with the * exception being handled internally. * * @param url * URL to encode * @return encoded URL */ private static String urlencode(String url) { try { return URLEncoder.encode(url, "utf-8"); } catch (UnsupportedEncodingException ex) { throw new InternalError("no utf-8"); } }
From source file:com.clustercontrol.jobmanagement.view.action.StopJobAction.java
/** * ??/*from w w w. j a va2 s.c om*/ * * @param managerName ??? * @param sessionId ID * @param jobunitId ?ID * @param jobId ID * @param facilityId ID * @return ?? * */ private Property getStopProperty(String managerName, String sessionId, String jobunitId, String jobId, String facilityId) { Locale locale = Locale.getDefault(); //ID Property session = new Property(JobOperationConstant.SESSION, Messages.getString("session.id", locale), PropertyDefineConstant.EDITOR_TEXT); session.setValue(sessionId); //ID Property jobUnit = new Property(JobOperationConstant.JOB_UNIT, Messages.getString("jobunit.id", locale), PropertyDefineConstant.EDITOR_TEXT); jobUnit.setValue(jobunitId); //ID Property job = new Property(JobOperationConstant.JOB, Messages.getString("job.id", locale), PropertyDefineConstant.EDITOR_TEXT); job.setValue(jobId); //ID Property facility = new Property(JobOperationConstant.FACILITY, Messages.getString("facility.id", locale), PropertyDefineConstant.EDITOR_TEXT); ArrayList<Property> endList = new ArrayList<Property>(); if (facilityId != null && facilityId.length() > 0) { facility.setValue(facilityId); } else { facility.setValue(""); } // Property endStatus = null; if (facilityId == null) { endStatus = new Property(JobOperationConstant.END_STATUS, Messages.getString("end.status", locale), PropertyDefineConstant.EDITOR_SELECT); Object endStatusList[][] = { { "", EndStatusMessage.STRING_NORMAL, EndStatusMessage.STRING_WARNING, EndStatusMessage.STRING_ABNORMAL }, { "", EndStatusConstant.TYPE_NORMAL, EndStatusConstant.TYPE_WARNING, EndStatusConstant.TYPE_ABNORMAL } }; endStatus.setSelectValues(endStatusList); endStatus.setValue(""); endList.add(endStatus); } // Property endValue = new Property(JobOperationConstant.END_VALUE, Messages.getString("end.value", locale), PropertyDefineConstant.EDITOR_NUM, DataRangeConstant.SMALLINT_HIGH, DataRangeConstant.SMALLINT_LOW); endValue.setValue(""); endList.add(endValue); // Property control = new Property(JobOperationConstant.CONTROL, Messages.getString("control", locale), PropertyDefineConstant.EDITOR_SELECT); HashMap<String, Object> mainteEndMap = new HashMap<String, Object>(); mainteEndMap.put("value", OperationMessage.STRING_STOP_MAINTENANCE); mainteEndMap.put("property", endList); HashMap<String, Object> forceEndMap = new HashMap<String, Object>(); forceEndMap.put("value", OperationMessage.STRING_STOP_FORCE); forceEndMap.put("property", endList); List<Integer> values1 = null; try { JobEndpointWrapper wrapper = JobEndpointWrapper.getWrapper(managerName); values1 = wrapper.getAvailableStopOperation(sessionId, jobunitId, jobId, facilityId); } catch (InvalidRole_Exception e) { MessageDialog.openInformation(null, Messages.getString("message"), Messages.getString("message.accesscontrol.16")); throw new InternalError("values1 is null"); } catch (Exception e) { m_log.warn("getStopProperty(), " + e.getMessage(), e); MessageDialog.openError(null, Messages.getString("failed"), Messages.getString("message.hinemos.failure.unexpected") + ", " + HinemosMessage.replace(e.getMessage())); throw new InternalError("values1 is null"); } ArrayList<Object> values2 = new ArrayList<Object>(); if (values1.contains(OperationConstant.TYPE_STOP_AT_ONCE)) { values2.add(OperationMessage.STRING_STOP_AT_ONCE); } if (values1.contains(OperationConstant.TYPE_STOP_SUSPEND)) { values2.add(OperationMessage.STRING_STOP_SUSPEND); } if (values1.contains(OperationConstant.TYPE_STOP_WAIT)) { values2.add(OperationMessage.STRING_STOP_WAIT); } if (values1.contains(OperationConstant.TYPE_STOP_SKIP)) { values2.add(OperationMessage.STRING_STOP_SKIP); } if (values1.contains(OperationConstant.TYPE_STOP_MAINTENANCE)) { values2.add(mainteEndMap); } if (values1.contains(OperationConstant.TYPE_STOP_FORCE)) { values2.add(forceEndMap); } List<String> stringValues = new ArrayList<String>(); for (Integer type : values1) { stringValues.add(OperationMessage.typeToString(type)); } Object controlValues[][] = { stringValues.toArray(), values2.toArray() }; control.setSelectValues(controlValues); if (stringValues.size() >= 1) { control.setValue(stringValues.get(0)); } else { control.setValue(""); } //??/?? session.setModify(PropertyDefineConstant.MODIFY_NG); jobUnit.setModify(PropertyDefineConstant.MODIFY_NG); job.setModify(PropertyDefineConstant.MODIFY_NG); facility.setModify(PropertyDefineConstant.MODIFY_NG); control.setModify(PropertyDefineConstant.MODIFY_OK); if (endStatus != null) { endStatus.setModify(PropertyDefineConstant.MODIFY_OK); } endValue.setModify(PropertyDefineConstant.MODIFY_OK); // ?? Property property = new Property(null, null, ""); property.removeChildren(); property.addChildren(session); property.addChildren(jobUnit); property.addChildren(job); if (facilityId != null) { property.addChildren(facility); } property.addChildren(control); String controlStr = (String) control.getValue(); if (OperationMessage.STRING_STOP_MAINTENANCE.equals(controlStr) || OperationMessage.STRING_STOP_FORCE.equals(controlStr)) { if (endStatus != null) { control.addChildren(endStatus); } control.addChildren(endValue); } return property; }
From source file:com.hadoop.compression.fourmc.zstd.ZstdStreamCompressor.java
public synchronized int compress(byte[] b, int off, int len) throws IOException { if (b == null) { throw new NullPointerException(); }//from w w w. java 2s . com if (off < 0 || len < 0 || off > b.length - len) { throw new ArrayIndexOutOfBoundsException(); } int n = oBuff.remaining(); if (n > 0) { n = Math.min(n, len); ((ByteBuffer) oBuff).get(b, off, n); bytesWritten += n; return n; } // Happens when oBuffSize is small, zstd cannot flush content in the internal buffer just once. // The code will not be triggered if we use Zstd.cStreamInSize/Zstd.cStreamOutSize as input/output buffer size if (remainingToFlush > 0) { oBuff.rewind(); remainingToFlush = endStream(cStream, oBuff, 0, oBuff.capacity()); if (Zstd.isError(remainingToFlush)) { throw new InternalError("Zstd endStream failed, due to: " + Zstd.getErrorName(remainingToFlush)); } finished = remainingToFlush == 0; oBuff.limit(oBuffLen); n = Math.min(oBuffLen, len); bytesWritten += n; ((ByteBuffer) oBuff).get(b, off, n); return n; } if (0 == iBuff.position()) { setInputFromSavedData(); if (0 == iBuff.position()) { finished = true; return 0; } } oBuff.rewind(); oBuff.limit(oBuffSize); // iBuffLen = iBuffSize in most times. iBuffLen can be < iBuffSize if compress() is called after finish(); // oBuff is cleared before this call. int toRead = compressStream(cStream, oBuff, oBuffSize, iBuff, iBuffLen); if (Zstd.isError(toRead)) { throw new InternalError("ZSTD compressStream failed, due to: " + Zstd.getErrorName(toRead)); } boolean inputConsumedAll = srcPos >= iBuffLen; // If all the data in iBuff is consumed, then iBuff should be reset. // Otherwise, data in iBuff remains intact and will be consumed by compressStream in the next compress() call if (inputConsumedAll) { iBuff.clear(); srcPos = 0; iBuffLen = 0; } // finish() is called, all the data in iBuffLen is consumed, then a endFrame epilogue should be wrote. if (finish && userBufLen <= 0 && inputConsumedAll) { int oBuffOffset = oBuffLen; remainingToFlush = endStream(cStream, oBuff, oBuffOffset, oBuff.capacity() - oBuffOffset); if (Zstd.isError(remainingToFlush)) { throw new InternalError("Zstd endStream failed, due to: " + Zstd.getErrorName(remainingToFlush)); } finished = remainingToFlush == 0; } oBuff.limit(oBuffLen); n = Math.min(oBuffLen, len); bytesWritten += n; ((ByteBuffer) oBuff).get(b, off, n); return n; }
From source file:com.clustercontrol.repository.composite.NodeFilterComposite.java
/** * ????//from w ww . j av a 2 s . c om * <p> * * ???????????????? ??? <br> * ????????????? */ @Override public void update() { // ? List<NodeInfo> list = null; Map<String, String> errorMsgs = new ConcurrentHashMap<>(); if (assignFlag) { List<NodeInfo> allList = null; // ? // ? if (this.condition == null) { this.statuslabel.setText(""); allList = new GetNodeList().getAll(this.managerName); } else { this.statuslabel.setText(Messages.getString("filtered.list")); allList = new GetNodeList().get(this.managerName, this.condition); } // ???????? try { RepositoryEndpointWrapper wrapper = RepositoryEndpointWrapper.getWrapper(this.managerName); List<NodeInfo> assignedList = wrapper.getNodeList(this.scopeId, 1); list = new ArrayList<NodeInfo>(); for (NodeInfo node : allList) { boolean flag = true; for (NodeInfo assignedNode : assignedList) { if (node.getFacilityId().equals(assignedNode.getFacilityId())) { flag = false; break; } } if (flag) { list.add(node); } } } catch (InvalidRole_Exception e) { errorMsgs.put(managerName, Messages.getString("message.accesscontrol.16")); throw new InternalError(e.getMessage()); } catch (Exception e) { m_log.warn("getAll(), " + e.getMessage(), e); errorMsgs.put(managerName, Messages.getString("message.hinemos.failure.unexpected") + ", " + HinemosMessage.replace(e.getMessage())); throw new InternalError(e.getMessage()); } } else { // ? this.statuslabel.setText(""); list = new ArrayList<NodeInfo>(); RepositoryEndpointWrapper wrapper = RepositoryEndpointWrapper.getWrapper(this.managerName); try { // RepositoryControllerBean.ONE_LEVEL = 1 list = wrapper.getNodeList(this.scopeId, 1); } catch (InvalidRole_Exception e) { // ?????? errorMsgs.put(managerName, Messages.getString("message.accesscontrol.16")); throw new InternalError(e.getMessage()); } catch (Exception e) { m_log.warn("update(), " + e.getMessage(), e); errorMsgs.put(managerName, Messages.getString("message.hinemos.failure.unexpected") + ", " + HinemosMessage.replace(e.getMessage())); throw new InternalError(e.getMessage()); } } // if (0 < errorMsgs.size()) { StringBuffer msg = new StringBuffer(); for (Map.Entry<String, String> e : errorMsgs.entrySet()) { String eol = System.getProperty("line.separator"); msg.append("MANAGER[" + e.getKey() + "] : " + eol + " " + e.getValue() + eol + eol); } MessageDialog.openInformation(null, Messages.getString("message"), msg.toString()); } ArrayList<Object> listInput = new ArrayList<Object>(); for (NodeInfo node : list) { ArrayList<Object> a = new ArrayList<Object>(); a.add(managerName); a.add(node.getFacilityId()); a.add(node.getFacilityName()); a.add(node.getPlatformFamily()); if (node.getIpAddressVersion() == 6) { a.add(node.getIpAddressV6()); } else { a.add(node.getIpAddressV4()); } a.add(node.getDescription()); a.add(node.getOwnerRoleId()); a.add(null); listInput.add(a); } // this.tableViewer.setInput(listInput); // ? String[] args = { String.valueOf(list.size()) }; String message = null; if (assignFlag) { if (this.condition == null) { message = Messages.getString("records", args); } else { message = Messages.getString("filtered.records", args); } } else { message = Messages.getString("records", args); } this.totalLabel.setText(message); }
From source file:com.commsen.apropos.core.PropertiesManager.java
/** * Returns a clone of {@link PropertyPackage} called <code>name</code>. If no such * {@link PropertyPackage} exists it will return <code>null</code>. * //from www . jav a2 s .c o m * @return a {@link PropertyPackage} called <code>name</code> or <code>null</code>. */ public static PropertyPackage getPropertyPackage(String name) { try { PropertyPackage propertyPackage = allPackages.get(name); return propertyPackage == null ? null : (PropertyPackage) propertyPackage.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(e.getMessage()); } }
From source file:com.google.uzaygezen.core.LongBitVector.java
@Override public LongBitVector clone() { try {/*from w ww.ja v a 2 s. c o m*/ return (LongBitVector) super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError("Cloning error. "); } }