Closed. This question is off-topic。它当前不接受答案。
                            
                        
                    
                
            
                    
                
                        
                            
                        
                    
                        
                            想改善这个问题吗? Update the question,所以它是on-topic,用于堆栈溢出。
                        
                        3年前关闭。
                    
                
        

这段Java代码需要转换为javascript吗?

private void validatePartitionSum() throws ProfileUsageException {
    int moSize = maxSizeMO == -1 ? 0 : maxSizeMO;
    int mtSize = maxSizeMT == -1 ? 0 : maxSizeMT;
    if (maxSize > 0 && moSize + mtSize > maxSize) {
      //added to default limit type to Messages when error occurs
      if(this.editPartitionLimitFlag == false) {
      this.limitType = ThresholdType.MESSAGES;
      }
      String errorMessage =
        getFormattedResourceValue(STORAGE_SUM_LARGER_THAN_TOTAL);
      throw new ProfileUsageException(errorMessage,
          MMException.INVALID_PARAMETER);
    }
  }

最佳答案

查看gwt,(不是在线工具)

quote:“使用您选择的Java IDE以Java编写浏览器应用程序”

http://www.gwtproject.org/doc/latest/tutorial/gettingstarted.html

http://www.gwtproject.org/

10-06 07:00